8 Replies Latest reply on Oct 4, 2005 3:05 AM by Manu

    null after lookup in jboss4.0.2

    Pawel Polyakov Newbie

      I have wrote HAR and after deployment into jboss4.0.2 default conf. I have such output

      13:14:27,234 INFO [Hibernate] Using JDBC batch size : null
      13:14:27,234 INFO [Configuration] Searching for mapping documents in jar: DealerService.har
      13:14:27,234 INFO [Configuration] Found mapping documents in jar: ru/zenith/dealer/service/hibernate/Operatio.hbm.xml
      13:14:27,296 INFO [HbmBinder] Mapping class: ru.zenith.dealer.service.hibernate.Operatio -> OPERATIO
      13:14:27,296 INFO [Configuration] Found mapping documents in jar: ru/zenith/dealer/service/hibernate/PriceUpdateSoapBean.hbm.xml
      13:14:27,328 INFO [HbmBinder] Mapping class: ru.zenith.dealer.service.hibernate.PriceUpdateSoapBean -> PriceUpdateSoapBean
      13:14:27,328 INFO [Configuration] Found mapping documents in jar: ru/zenith/dealer/service/hibernate/Refgood.hbm.xml
      13:14:27,359 INFO [HbmBinder] Mapping class: ru.zenith.dealer.service.hibernate.Refgood -> REFGOOD
      13:14:27,390 INFO [Configuration] Found mapping documents in jar: ru/zenith/dealer/service/hibernate/Serno.hbm.xml
      13:14:27,406 INFO [HbmBinder] Mapping class: ru.zenith.dealer.service.hibernate.Serno -> SERNO
      13:14:27,421 INFO [Configuration] Found mapping documents in jar: ru/zenith/dealer/service/hibernate/Specific.hbm.xml
      13:14:27,437 INFO [HbmBinder] Mapping class: ru.zenith.dealer.service.hibernate.Specific -> SPECIFIC
      13:14:27,453 INFO [Configuration] processing extends queue
      13:14:27,453 INFO [Configuration] processing collection mappings
      13:14:27,453 INFO [HbmBinder] Mapping collection: ru.zenith.dealer.service.hibernate.Operatio.specific -> SPECIFIC
      13:14:27,453 INFO [HbmBinder] Mapping collection: ru.zenith.dealer.service.hibernate.Specific.serno -> SERNO
      13:14:27,453 INFO [Configuration] processing association property references
      13:14:27,453 INFO [Configuration] processing foreign key constraints
      13:14:27,453 INFO [NamingHelper] JNDI InitialContext properties:{}
      13:14:27,468 INFO [DatasourceConnectionProvider] Using datasource: java:/OracleDS
      13:14:27,468 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
      With the Partitioning, OLAP and Oracle Data Mining options
      JServer Release 9.2.0.1.0 - Production
      13:14:27,468 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.3.0
      13:14:27,484 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
      13:14:27,484 INFO [SettingsFactory] JDBC batch size: 15
      13:14:27,484 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      13:14:27,484 INFO [SettingsFactory] Scrollable result sets: enabled
      13:14:27,484 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
      13:14:27,484 INFO [SettingsFactory] Aggressive release : enabled
      13:14:27,484 INFO [SettingsFactory] Default schema: TRATE
      13:14:27,484 INFO [SettingsFactory] Default batch fetch size: 1
      13:14:27,484 INFO [SettingsFactory] Generate SQL with comments: disabled
      13:14:27,484 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      13:14:27,484 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      13:14:27,484 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      13:14:27,484 INFO [SettingsFactory] Query language substitutions: {}
      13:14:27,484 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
      13:14:27,484 INFO [NamingHelper] JNDI InitialContext properties:{}
      13:14:27,484 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      13:14:27,484 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      13:14:27,484 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      13:14:27,484 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      13:14:27,484 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
      13:14:27,484 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
      13:14:27,484 INFO [SettingsFactory] Second-level cache: enabled
      13:14:27,484 INFO [SettingsFactory] Query cache: disabled
      13:14:27,484 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
      13:14:27,484 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      13:14:27,484 INFO [SettingsFactory] Structured second-level cache entries: enabled
      13:14:27,484 INFO [SettingsFactory] Echoing all SQL to stdout
      13:14:27,515 INFO [SettingsFactory] Statistics: disabled
      13:14:27,515 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      13:14:27,515 INFO [SettingsFactory] Default entity-mode: pojo
      13:14:27,531 INFO [SessionFactoryImpl] building session factory
      13:14:28,531 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      13:14:28,531 INFO [NamingHelper] JNDI InitialContext properties:{}
      13:14:28,531 INFO [SessionFactoryImpl] Checking 0 named queries
      13:14:28,546 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/DealerServiceFactory]
      java:/hibernate/DealerServiceFactory
      

      As you can see the last string is about the JNDI name of my SessionFactory.
      After that I try to lookup this factory object in ejbCreate() of my stateless session bean :
       InitialContext ctx;
       try {
       ctx = new InitialContext();
       SessionFactory sessionFactory =(SessionFactory)
       ctx.lookup("java:/hibernate/DealerServiceFactory");
       if (this.sessionFactory==null){
       logger.error("sessionFactory is null");
       }
       } catch (NamingException e) {
       logger.error(e);
       }
      

      and my session factory is null.

        • 1. Re: null after lookup in jboss4.0.2
          Pawel Polyakov Newbie

          In addition I want to say that I have downloaded the jboss4guide and build it's CaveatEmptor.har - it didn't deploy into default conf of jboss 4.0.2:

          11:00:11,843 INFO [Environment] Hibernate 3.0.2
          11:00:11,875 INFO [Environment] hibernate.properties not found
          11:00:11,875 INFO [Environment] using CGLIB reflection optimizer
          11:00:11,875 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
          11:00:12,187 INFO [Hibernate] Using JDBC batch size : null
          11:00:12,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(ServiceMBeanSupport.java:272)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
           at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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(ServiceController.java:897)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:418)
           at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy4.start(Unknown Source)
           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
           at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy8.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
          11:00:12,218 WARN [ServiceController] Problem starting service 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(ServiceMBeanSupport.java:272)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
           at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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(ServiceController.java:897)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:418)
           at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy4.start(Unknown Source)
           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
           at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy8.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
          

          This is the modified hibernate-service.xml(I have modified it in order to work correctly with Oracle)
          <server>
           <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
           <attribute name="DatasourceName">java:/OracleDS</attribute>
           <attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
           <attribute name="SessionFactoryName">java:/hibernate/CaveatEmptorSessionFactory</attribute>
           <attribute name="CacheProviderClass"> net.sf.hibernate.cache.HashtableCacheProvider </attribute>
           <attribute name="ShowSqlEnabled">true</attribute>
           </mbean>
          </server>
          

          I have tried a lot of different changes in this config but nothing happens - the exception is still there.

          • 2. Re: null after lookup in jboss4.0.2
            Pawel Polyakov Newbie

            Sorry guys, it's my fault. Everything works fine)

            • 3. Re: null after lookup in jboss4.0.2
              srinivas vasu Newbie

              Hi,
              I am getting the simiklar kind of error. Can anybody help me in this?

              java.lang.NullPointerException
              at org.jboss.hibernate.session.HibernateContext.getSession(HibernateContext.java:79)
              at login.ConnectionFactory.getSession(ConnectionFactory.java:45)
              at login.ItemService.addUser(ItemService.java:77)
              at login.LoginAction.execute(LoginAction.java:37)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

              The above error i am getting . I tried the same suing Initialcontext also
              Which is also giving the same error.

              And also I found this log message before above error
              16:58:49,187 WARN [SessionFactoryObjectFactory] Not found: 4028810903ea680b0103ea680fb00000


              But when deploying which is giving the following success message

              16:56:58,000 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]

              It seemz JNDI name is not lookup to the SessionFactory .

              Can anybody help me in this . how to processed.

              Vasu...

              • 4. Re: null after lookup in jboss4.0.2
                gerd oberlechner Newbie

                i think my problem fits right into this topic.
                is was migrating my webapplication from jboss 4.0.1 to 4.0.2 and from hibernate 2.x to 3.0.3 when i came up with a strange problem. during the deployment of a hibernate archive i got those logmessages:

                15:43:19,286 DEBUG [SessionFactoryObjectFactory] registered: 0f4de0b003eab2a80103eae4e5f60003 (unnamed)
                15:43:19,286 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
                15:43:19,286 DEBUG [SessionFactoryImpl] instantiated session factory
                15:43:19,286 DEBUG [SessionFactoryImpl] obtaining JTA TransactionManager
                15:43:19,287 INFO [NamingHelper] JNDI InitialContext properties:{}
                15:43:19,287 INFO [SessionFactoryImpl] Checking 0 named queries
                15:43:19,301 DEBUG [SessionFactoryImpl] Returning a Reference to the SessionFactory
                


                interesting was the first line ending with (unnamed) instead of the JNDI bindname configured in the hibernate-service.xml

                <server>
                 <mbean code="org.jboss.hibernate.jmx.Hibernate"
                 name="jboss.har:service=Hibernate">
                 <attribute name="DatasourceName">java:/lvonline</attribute>
                 <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
                 <attribute name="Dialect">org.hibernate.dialect.OracleDialect</attribute>
                 <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
                 </mbean>
                </server>
                


                exactly the same har had worked fine with jboss 4.0.1

                as a consecutive fault i get null if i perfom a lookup for the SessionFactory

                InitialContext ctx = new InitialContext();
                SessionFactory sf = ((SessionFactory)ctx.lookup("java:/hibernate/SessionFactory"));
                


                perhaps somebody can help me out here
                best regards
                gerd oberlechner

                • 5. Re: null after lookup in jboss4.0.2
                  Kirill Protsenko Newbie

                  Hello,

                  Did you get it working guys?
                  I have the same problem

                  Thanks
                  Kirill.

                  • 6. Re: null after lookup in jboss4.0.2
                    srinivas vasu Newbie

                    Hi ,
                    The following is the log messag which i got . Can anyone help me
                    on this issue?

                    I am giving my Folder structure here.

                    My ear file contans

                    1)cdviewer.war
                    2)cdviewer.har
                    3)jboss-app.xml
                    4)application.xml

                    My ear file doesn't have any ejbs.

                    The following is the code i am using to get sessionfactory.

                    InitialContext ctx= new InitialContext();
                    SessionFactory sessionFactory=(SessionFactory)ctx.lookup("java:/hibernate/SessionFactory");
                    System.out.println("sessionFactory :===============>"+sessionFactory);

                    Anyone please help me . What could be the problem? I guess SessionFactory is not binding with jndi. But while deploying which gave
                    the following message .

                    INFO [SessionFactoryImpl] Checking 0 named queries
                    INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]



                    Vasu.



                    21:40:33,703 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.5.0
                    21:40:33,781 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
                    21:40:33,968 INFO [SettingsFactory] JDBC batch size: 15
                    21:40:33,968 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
                    21:40:33,984 INFO [SettingsFactory] Scrollable result sets: enabled
                    21:40:33,984 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
                    21:40:33,984 INFO [SettingsFactory] Aggressive release : enabled
                    21:40:33,984 INFO [SettingsFactory] Default batch fetch size: 1
                    21:40:33,984 INFO [SettingsFactory] Generate SQL with comments: disabled
                    21:40:33,984 INFO [SettingsFactory] Order SQL updates by primary key: disabled
                    21:40:34,000 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
                    21:40:34,015 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
                    21:40:34,015 INFO [SettingsFactory] Query language substitutions: {}
                    21:40:34,015 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
                    21:40:34,046 INFO [NamingHelper] JNDI InitialContext properties:{}
                    21:40:34,062 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransa
                    21:40:34,078 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
                    21:40:34,078 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransa
                    21:40:34,093 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
                    21:40:34,093 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
                    21:40:34,093 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
                    21:40:34,093 INFO [SettingsFactory] Second-level cache: enabled
                    21:40:34,093 INFO [SettingsFactory] Query cache: disabled
                    21:40:34,093 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
                    21:40:34,109 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
                    21:40:34,140 INFO [SettingsFactory] Structured second-level cache entries: enabled
                    21:40:34,156 INFO [SettingsFactory] Echoing all SQL to stdout
                    21:40:34,156 INFO [SettingsFactory] Statistics: disabled
                    21:40:34,156 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
                    21:40:34,171 INFO [SettingsFactory] Default entity-mode: pojo
                    21:40:34,734 INFO [SessionFactoryImpl] building session factory
                    21:40:35,812 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
                    21:40:35,859 INFO [NamingHelper] JNDI InitialContext properties:{}
                    21:40:35,859 INFO [SessionFactoryImpl] Checking 0 named queries
                    21:40:35,859 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]
                    21:40:35,906 INFO [TomcatDeployer] deploy, ctxPath=/cdviewer, warUrl=file:/D:/jboss-4.0.2/server/default/tmp/deploy/tmp4990cdview
                    21:40:38,359 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
                    21:40:38,359 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
                    21:40:39,687 INFO [PropertyMessageResources] Initializing, config='MessageResources', returnNull=true
                    21:40:39,828 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml'
                    21:40:40,359 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml'
                    21:40:40,562 INFO [EARDeployer] Started J2EE application: file:/D:/jboss-4.0.2/server/default/deploy/cdviewer.ear
                    21:40:40,875 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
                    21:40:41,062 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                    21:40:41,234 INFO [JkMain] Jk running ID=0 time=0/203 config=null
                    21:40:41,250 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 2m:2s:672ms
                    21:41:43,609 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
                    21:41:43,734 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
                    21:41:43,796 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
                    21:41:43,906 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
                    21:41:44,031 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.bean.LocalStrings', returnNull=true
                    21:41:44,328 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
                    21:41:44,328 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
                    21:41:44,406 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
                    21:41:52,312 INFO [STDOUT] Get CurrentDate :
                    21:41:52,328 INFO [STDOUT] Get CurrentDate Time Stamp :2005-05-17 21:41:52.312
                    21:41:52,640 WARN [SessionFactoryObjectFactory] Not found: 4028810903eb6bb60103eb6bbb850000
                    21:41:52,640 INFO [STDOUT] sessionFactory :===============>null
                    21:41:52,671 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
                    21:41:52,671 ERROR [[action]] Servlet.service() for servlet action threw exception
                    java.lang.NullPointerException
                    at login.ConnectionFactory.getSession(ConnectionFactory.java:61)
                    at login.ItemService.addUser(ItemService.java:77)
                    at login.LoginAction.execute(LoginAction.java:37)
                    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
                    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
                    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
                    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
                    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                    at java.lang.Thread.run(Thread.java:534)

                    • 7. Re: null after lookup in jboss4.0.2
                      Wylie van den Akker Newbie

                      I have the same problem that is explained in the origional post. Anyone figure out what the fix was?

                      • 8. Re: null after lookup in jboss4.0.2
                        Manu Newbie

                        Hi,

                        We also had encountered the same error as mentioned below.

                        [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)


                        The error went away when we we did the following:
                        1. The har was put in jarred form( not in exploded form)
                        2. The meta-inf in the .har was put in all CAPS. It should be META-INF and not meta-inf

                        Regards
                        Manu