8 Replies Latest reply on May 27, 2008 11:09 AM by j-pro

    4.2.2 GA: service=JNDIView call causes NPE

    j-pro

      Good afternoon, dear JBoss gurus!

      Since I've updated to JBoss 4.2.0 GA to 4.2.2 GA, I'm unable to see my JNDI bindings in jmx-console. In 4.2.0 GA everything was ok. I should mention that my enterprise app(EJB3), deployed in 4.2.2 GA, works fine.

      In 4.2.2 GA I open http://localhost:8080/jmx-console/ without any problem. But when I clik on "http://localhost:8080/jmx-console/" at "jboss" section, I have this exception:

      18:03:44,953 ERROR [[/jmx-console]] Exception sending request destroyed lifecycle event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
      java.lang.NullPointerException
       at com.sun.faces.application.WebappLifecycleListener.syncSessionScopedBeans(WebappLifecycleListener.java:312)
       at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:87)
       at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:240)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:619)
      18:03:48,562 ERROR [[/jmx-console]] Exception sending request destroyed lifecycle event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
      java.lang.NullPointerException
       at com.sun.faces.application.WebappLifecycleListener.syncSessionScopedBeans(WebappLifecycleListener.java:312)
       at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:87)
       at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:240)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:619)



      What do I do wrong?

      Thanks for your help in advance.

        • 1. Re: 4.2.2 GA: service=JNDIView call causes NPE
          jaikiran

          Do you see this exception when your application is not deployed? I haven't seen such exception on my local JBoss-4.2.2 GA, which i have been using for quite some time now.

          • 2. Re: 4.2.2 GA: service=JNDIView call causes NPE
            j-pro

            Yes, jaikiran, this exception appears even if my app is undeployed.

            Please, help me to solve this problem. If you need - I can upload my server directory anywhere.

            Thanks in advance.

            • 3. Re: 4.2.2 GA: service=JNDIView call causes NPE
              jaikiran

              How did you install JBoss-4.2.2 GA? Was it through the JEMS installer or did you use the zip archive? Have you modified anything in the server after installing JBoss? Which version of Java is being used and which operating system? When JBoss is starting, you will see the Java version being printed out, post it here. Also, post the log that you see on the console, from the time you start JBoss till you see this error (do this on a clean installation of JBoss which does not have your application).

              • 4. Re: 4.2.2 GA: service=JNDIView call causes NPE
                j-pro

                Thanks, jaikiran, for your help. I've made all you've requested, please, ask for more if you need to:

                "jaikiran" wrote:
                How did you install JBoss-4.2.2 GA? Was it through the JEMS installer or did you use the zip archive?

                I just downloaded zip-archive and extracted it at C:\Java\jboss-4.2.2.GA.

                "jaikiran" wrote:
                Have you modified anything in the server after installing JBoss?

                Yes:
                1. Updated JSF version to 1.2_07
                2. Added 2 datasources in one file: mssql-ds.xml
                3. Added sqljdbc.jar and sqljdbc_auth.dll in server\default\lib\
                4. Deployed my app.
                5. One more difference in clean server zip and my server dir which I don't know(maybe it's some working files like in tmp and work dirs?): [url=http://img81.imageshack.us/my.php?image=jbrl0.png][img=http://img81.imageshack.us/img81/8346/jbrl0.th.png][/url]

                "jaikiran" wrote:
                Which version of Java is being used and which operating system?

                I use jre1.6.0_05, but in MyEclipse(from where I run my JBoss) I use jdk1.6.0_01.
                System: Windows XP SP2 x86

                "jaikiran" wrote:
                When JBoss is starting, you will see the Java version being printed out, post it here.


                22:04:37,359 INFO [ServerInfo] Java version: 1.6.0_01,Sun Microsystems Inc.
                22:04:37,359 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0_01-b06,Sun Microsystems Inc.
                22:04:37,359 INFO [ServerInfo] OS-System: Windows XP 5.1,x86


                "jaikiran" wrote:
                Also, post the log that you see on the console, from the time you start JBoss till you see this error (do this on a clean installation of JBoss which does not have your application).

                22:08:39,734 INFO [Server] Starting JBoss (MX MicroKernel)...
                22:08:39,734 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
                22:08:39,734 INFO [Server] Home Dir: C:\Java\jboss-4.2.2.GA
                22:08:39,734 INFO [Server] Home URL: file:/C:/Java/jboss-4.2.2.GA/
                22:08:39,734 INFO [Server] Patch URL: null
                22:08:39,734 INFO [Server] Server Name: default
                22:08:39,734 INFO [Server] Server Home Dir: C:\Java\jboss-4.2.2.GA\server\default
                22:08:39,734 INFO [Server] Server Home URL: file:/C:/Java/jboss-4.2.2.GA/server/default/
                22:08:39,734 INFO [Server] Server Log Dir: C:\Java\jboss-4.2.2.GA\server\default\log
                22:08:39,734 INFO [Server] Server Temp Dir: C:\Java\jboss-4.2.2.GA\server\default\tmp
                22:08:39,734 INFO [Server] Root Deployment Filename: jboss-service.xml
                22:08:40,234 INFO [ServerInfo] Java version: 1.6.0_01,Sun Microsystems Inc.
                22:08:40,234 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0_01-b06,Sun Microsystems Inc.
                22:08:40,234 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
                22:08:40,640 INFO [Server] Core system initialized
                22:08:43,328 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
                22:08:43,343 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
                22:08:44,031 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
                22:08:44,031 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
                22:08:44,296 INFO [TransactionManagerService] Starting recovery manager
                22:08:44,453 INFO [TransactionManagerService] Recovery manager started
                22:08:44,453 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
                22:08:47,781 INFO [EJB3Deployer] Starting java:comp multiplexer
                22:08:48,203 INFO [STDOUT] no object for null
                22:08:48,203 INFO [STDOUT] no object for null
                22:08:48,234 INFO [STDOUT] no object for null
                22:08:48,296 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
                22:08:48,312 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
                22:08:51,078 INFO [NativeServerConfig] JBoss Web Services - Native
                22:08:51,078 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
                22:08:52,421 INFO [Embedded] Catalina naming disabled
                22:08:52,687 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.6.0_01\bin
                22:08:52,796 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
                22:08:52,796 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
                22:08:52,796 INFO [Catalina] Initialization processed in 379 ms
                22:08:52,796 INFO [StandardService] Starting service jboss.web
                22:08:52,812 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
                22:08:52,875 INFO [Catalina] Server startup in 73 ms
                22:08:53,031 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
                22:08:54,109 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
                22:08:54,296 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
                22:08:54,453 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
                22:08:55,562 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
                22:08:56,203 INFO [MailService] Mail Service bound to java:/Mail
                22:08:56,468 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
                22:08:56,546 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
                22:08:56,625 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
                22:08:56,687 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
                22:08:56,765 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
                22:08:56,828 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
                22:08:56,906 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
                22:08:56,921 INFO [QuartzResourceAdapter] start quartz!!!
                22:08:57,031 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
                22:08:57,062 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
                22:08:57,078 INFO [RAMJobStore] RAMJobStore initialized.
                22:08:57,078 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
                22:08:57,078 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
                22:08:57,078 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
                22:08:58,500 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                22:08:58,859 INFO [A] Bound to JNDI name: queue/A
                22:08:58,875 INFO [B] Bound to JNDI name: queue/B
                22:08:58,875 INFO [C] Bound to JNDI name: queue/C
                22:08:58,875 INFO [D] Bound to JNDI name: queue/D
                22:08:58,875 INFO [ex] Bound to JNDI name: queue/ex
                22:08:58,906 INFO [testTopic] Bound to JNDI name: topic/testTopic
                22:08:58,906 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
                22:08:58,906 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
                22:08:58,906 INFO [testQueue] Bound to JNDI name: queue/testQueue
                22:08:58,968 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
                22:08:59,031 INFO [DLQ] Bound to JNDI name: queue/DLQ
                22:08:59,218 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                22:08:59,359 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MSSQLDS' to JNDI name 'java:MSSQLDS'
                22:08:59,375 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MSSQLDS1' to JNDI name 'java:MSSQLDS1'
                22:08:59,437 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                22:08:59,750 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
                22:08:59,765 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                22:08:59,781 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 20s:31ms


                If you need the FULL log with DEBUG information(there are some !exceptions!), here it is(750kb): http://www.gigasize.com/get.php?d=y0dch32x0hb

                All things I've done with 4.2.2 version, I already did once with 4.2.0 version(except JSF - there it was 1.2_04) and everything worked(and works) fine. If you need, I can post here logs from 4.2.0 version.

                Thanks in advance!

                • 5. Re: 4.2.2 GA: service=JNDIView call causes NPE
                  jaikiran

                   

                  "J-Pro" wrote:

                  "jaikiran" wrote:
                  How did you install JBoss-4.2.2 GA? Was it through the JEMS installer or did you use the zip archive?

                  I just downloaded zip-archive and extracted it at C:\Java\jboss-4.2.2.GA.


                  That should be good, because there have been some issues reported when JEMS installer was used.

                  "J-Pro" wrote:

                  "jaikiran" wrote:
                  Have you modified anything in the server after installing JBoss?

                  Yes:
                  1. Updated JSF version to 1.2_07
                  2. Added 2 datasources in one file: mssql-ds.xml
                  3. Added sqljdbc.jar and sqljdbc_auth.dll in server\default\lib\
                  4. Deployed my app.
                  5. One more difference in clean server zip and my server dir which I don't know(maybe it's some working files like in tmp and work dirs?): [url=http://img81.imageshack.us/my.php?image=jbrl0.png][img=http://img81.imageshack.us/img81/8346/jbrl0.th.png][/url]



                  #2 and #3 dont seem to be a problem (though i am not sure why the sqljdbc_auth.dll is required). However, i would revert back #1. More so because the exception that you posted, does show something related to JSF. How exactly did you update the JSF version? Which all files did you change and where?

                  "J-Pro" wrote:

                  "jaikiran" wrote:
                  Which version of Java is being used and which operating system?

                  I use jre1.6.0_05, but in MyEclipse(from where I run my JBoss) I use jdk1.6.0_01.
                  System: Windows XP SP2 x86

                  "jaikiran" wrote:
                  When JBoss is starting, you will see the Java version being printed out, post it here.


                  22:04:37,359 INFO [ServerInfo] Java version: 1.6.0_01,Sun Microsystems Inc.
                  22:04:37,359 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0_01-b06,Sun Microsystems Inc.
                  22:04:37,359 INFO [ServerInfo] OS-System: Windows XP 5.1,x86


                  JBoss-4.2.x is not yet certified to run with Java 1.6. Use Java 1.5 instead.

                  Undo the changes to the JSF jars and use Java 1.5 and try accessing the JNDIView. See if it works. Post back with details, if it doesn't.


                  • 6. Re: 4.2.2 GA: service=JNDIView call causes NPE
                    j-pro

                     

                    "jaikiran" wrote:
                    "J-Pro" wrote:

                    "jaikiran" wrote:
                    Have you modified anything in the server after installing JBoss?

                    Yes:
                    1. Updated JSF version to 1.2_07
                    2. Added 2 datasources in one file: mssql-ds.xml
                    3. Added sqljdbc.jar and sqljdbc_auth.dll in server\default\lib\
                    4. Deployed my app.
                    5. One more difference in clean server zip and my server dir which I don't know(maybe it's some working files like in tmp and work dirs?): [url=http://img81.imageshack.us/my.php?image=jbrl0.png][img=http://img81.imageshack.us/img81/8346/jbrl0.th.png][/url]



                    #2 and #3 dont seem to be a problem (though i am not sure why the sqljdbc_auth.dll is required). However, i would revert back #1. More so because the exception that you posted, does show something related to JSF. How exactly did you update the JSF version? Which all files did you change and where?


                    I've just downloaded new version form mojarra and overwrited two libs here: jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer\jsf-libs\


                    "jaikiran" wrote:


                    ...

                    Undo the changes to the JSF jars and use Java 1.5 and try accessing the JNDIView. See if it works. Post back with details, if it doesn't.

                    Ok, here are the results:

                    1. With JSF 1.2_04 and JDK 1.5.0_09-b01 - there is NO exceptions.
                    2. With JSF 1.2_07 and JDK 1.5.0_09-b01 - there is this exception :(

                    It's very sad, because I can't work with JSF 1.2_04 because my App uses JBoss RichFaces version which needs JSF 1.2_07 for bugless work.

                    How do you think, jaikiran, should I report this exception to mojarra or it's JBoss app server fault?


                    And thank you for your help very much. At least we know now where the problem lies...

                    • 7. Re: 4.2.2 GA: service=JNDIView call causes NPE
                      jaikiran

                       

                      "J-Pro" wrote:

                      I've just downloaded new version form mojarra and overwrited two libs here: jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer\jsf-libs\


                      "jaikiran" wrote:


                      ...

                      Undo the changes to the JSF jars and use Java 1.5 and try accessing the JNDIView. See if it works. Post back with details, if it doesn't.

                      Ok, here are the results:

                      1. With JSF 1.2_04 and JDK 1.5.0_09-b01 - there is NO exceptions.
                      2. With JSF 1.2_07 and JDK 1.5.0_09-b01 - there is this exception :(



                      I tried these steps using JSF_1.2_07 on JBoss-4.2.2 (replaced the jsf-api.jar and jsf-impl.jar in %JBOSS_HOME%\server\default\deploy\jboss-web.deployer\jsf-libs) with this HelloJSF example http://wiki.jboss.org/wiki/HelloJSF. I do see the same exception when accessing the JNDIView. The HelloJSF application seems to be working fine.

                      I then downloaded the JSF_1.2_08 version from the Mojarra site https://javaserverfaces.dev.java.net/download.html and followed the same steps. This time i am able to access the JNDIView without any exceptions and even the HelloJSF application seems to be working fine.

                      So, upgrade to JSF_1.2_08 and see if it works for you too.


                      • 8. Re: 4.2.2 GA: service=JNDIView call causes NPE
                        j-pro

                         

                        "jaikiran" wrote:
                        So, upgrade to JSF_1.2_08 and see if it works for you too.

                        Upgraded - no exception, you're right. And it would be ok if JSF 1.2_08 had no one serious bug, which is well known on mojarra. This bug affects RichFaces too. It's already in their issue manager and it will be fixed in 1.2_09.

                        Well, it seems that my problem is clear now: while there is no JSF 1.2_09, I should forget either about JNDIView, or about RichFaces :)

                        Thank you very much, jaikiran, your help was really useful!