0 Replies Latest reply on Sep 25, 2005 11:08 PM by Paul Chan

    NullPointerException when startup Hibernate Service

    Paul Chan Newbie

      Hi all i am using JBoss 4.0.2 with following configuration

      commons-collections-2.1.1.jar is put at
      jboss\server\default\deploy\jboss-hibernate.deployer


      jboss\server\default\deploy\hibernate-service.xml

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!-- $Id$ -->
      
      <!-- ===================================================================== -->
      <!-- -->
      <!-- Hibernate Service Configuration -->
      <!-- -->
      <!-- ===================================================================== -->
      
      <server>
       <mbean code="org.jboss.hibernate.jmx.Hibernate"
       name="jboss.har:service=Hibernate">
       <attribute name="DatasourceName">java:/MSSQLDS</attribute>
       <attribute name="Dialect">org.hibernate.dialect.SQLServerDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
       <attribute name="CacheProviderClass">
       org.hibernate.cache.HashtableCacheProvider
       </attribute>
       <!-- <attribute name="Hbm2ddlAuto">create-drop</attribute> -->
       </mbean>
      </server>
      


      However, i got NullPointerExcetpion when i startup JBoss
      10:51:54,203 INFO [Hibernate] Using JDBC batch size : null
      10:51:54,218 ERROR [Hibernate] Starting failed jboss.har:service=Hibernate
      java.lang.NullPointerException
       at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:
      595)
       at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:578)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:272)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:222)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:249)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:897)