Topic
  • 5 replies
  • Latest Post - ‏2012-05-08T04:16:37Z by Shawn_Jiang
SystemAdmin
SystemAdmin
2233 Posts

Pinned topic WebApplicationNameBasedSingletonService NULL pointer

‏2012-05-03T15:30:31Z |
Hi all,
I'm trying to deploy and ear, containing one jar and a war module, into WebSphere CE 3. With glassfish everything works fine but with WSCE i get the following error (from the web interface seems that the deploy is completed correctly though):

java.lan.NullPointerException:
org.apache.geronimo.openwebbeans.WebApplicationNameBasedSingletonService.get(WebApplicationNameBasedSingletonService.java :35)
......

When i try to open the .xhtml page contained into the war file i get a 500 error page with the error i have just posted...

Anyone knows what might be the problem?
Updated on 2012-05-08T04:16:37Z at 2012-05-08T04:16:37Z by Shawn_Jiang
  • X75J_Li_Yanli
    X75J_Li_Yanli
    45 Posts

    Re: WebApplicationNameBasedSingletonService NULL pointer

    ‏2012-05-04T02:49:36Z  
    Hello,

    Could you provider some info of your sample that can help reproduce this problem?

    Thanks!
  • Shawn_Jiang
    Shawn_Jiang
    154 Posts

    Re: WebApplicationNameBasedSingletonService NULL pointer

    ‏2012-05-04T02:56:28Z  
    Your sample to recreate would be helpful for us to find out the root cause, before that, please try following:

    1, If you are using WASCE 3.0.0.0, please change to the latest WASCE 3.0.0.1 version.
    2, you can try to disable webbeans deployer if you are not using CDI(web beans) in your application. to disable it, you can open CE_HOME/var/config/config.xml, locate openwebbeans-deployer, add a load = "false" attribute to it like this:

    <module load="false" name="org.apache.geronimo.configs/openwebbeans-deployer/3.0-w20111014/car"></module>

    Good luck.
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: WebApplicationNameBasedSingletonService NULL pointer

    ‏2012-05-07T15:35:19Z  
    Your sample to recreate would be helpful for us to find out the root cause, before that, please try following:

    1, If you are using WASCE 3.0.0.0, please change to the latest WASCE 3.0.0.1 version.
    2, you can try to disable webbeans deployer if you are not using CDI(web beans) in your application. to disable it, you can open CE_HOME/var/config/config.xml, locate openwebbeans-deployer, add a load = "false" attribute to it like this:

    <module load="false" name="org.apache.geronimo.configs/openwebbeans-deployer/3.0-w20111014/car"></module>

    Good luck.
    thanks Shawn, disabling the webbeans deployer did the trick. Out of curiosity, is this a bug? If i need to use CDI, do you know what i have to do?

    btw.. My application was really simple: one .xhtml page that called a backing bean in which was injected and Ejb (with @EJB annotation). The structure is something like the following:

    MyApp.ear

    |- src
    | |_ conf
     

    | |_java
    | |_application.xml
     

    |_ MyApp-war
    | |_src
     

    | | |_java
    | | |_ BackingBean.java
     
     

    | |_web
    | |_WEB-INF
     
     

    | | |_ beans.xml, geronimo-application.xml, web.xml
    | |
     
     

    | |_ index.xhtml
    |
     
     

    |_ MyApp-ejb
    |_ src
     
     

    |_java
    |_ MyEjb.java
     
     

  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: WebApplicationNameBasedSingletonService NULL pointer

    ‏2012-05-07T15:41:58Z  
    thanks Shawn, disabling the webbeans deployer did the trick. Out of curiosity, is this a bug? If i need to use CDI, do you know what i have to do?

    btw.. My application was really simple: one .xhtml page that called a backing bean in which was injected and Ejb (with @EJB annotation). The structure is something like the following:

    MyApp.ear

    |- src
    | |_ conf
     

    | |_java
    | |_application.xml
     

    |_ MyApp-war
    | |_src
     

    | | |_java
    | | |_ BackingBean.java
     
     

    | |_web
    | |_WEB-INF
     
     

    | | |_ beans.xml, geronimo-application.xml, web.xml
    | |
     
     

    | |_ index.xhtml
    |
     
     

    |_ MyApp-ejb
    |_ src
     
     

    |_java
    |_ MyEjb.java
     
     

    Sorry for the last part of the post, the text was formatted differently before publishing it...
  • Shawn_Jiang
    Shawn_Jiang
    154 Posts

    Re: WebApplicationNameBasedSingletonService NULL pointer

    ‏2012-05-08T04:16:37Z  
    Sorry for the last part of the post, the text was formatted differently before publishing it...
    Are you using WASCE 3.0.0.0 or latest 3.0.0.1 ? what's your OS and JDK ?

    You can upload your app with "Attach Files" button when posting message. We'll take a look