Null pointer exception

Splash Forums PrettyFaces Users Null pointer exception

This topic contains 9 replies, has 3 voices, and was last updated by  Christian Kaltepoth 6 years, 6 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #17742

    giorgiofran2
    Participant

    Hi all, I have a strange error using Pretty Faces.

    The error is:

    HTTP 500

    type Exception report

    message

    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

    exception

    java.lang.NullPointerException

    It is quite strange because it was working. I moved from Netbeans 7.0 beta to beta2 and now it is giving this problem. Same application server (now its is glassfish 3.1 b41, old version should be b29, but i’m not sure)

    In the server log I found this:

    GRAVE: WebModule[/px]PWC1321: Error invoking requestInitialized method on ServletRequestListener com.ocpsoft.pretty.faces.config.PrettyConfigListener

    java.lang.NullPointerException

    at com.sun.faces.application.ServletContextSensitiveSingletonStore.<init>(ServletContextSensitiveSingletonStore.java:83)

    at com.sun.faces.application.ApplicationFactoryImpl.getApplication(ApplicationFactoryImpl.java:92)

    at com.ocpsoft.pretty.faces.util.FacesFactory.getApplication(FacesFactory.java:31)

    at com.ocpsoft.pretty.faces.config.PrettyConfigListener.requestInitialized(PrettyConfigListener.java:34)

    at org.apache.catalina.core.StandardContext.fireRequestInitializedEvent(StandardContext.java:4551)

    at org.apache.catalina.core.StandardHostValve.preInvoke(StandardHostValve.java:626)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)

    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)

    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)

    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)

    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)

    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)

    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)

    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

    at java.lang.Thread.run(Thread.java:662)

    I tried to remove the Pretty faces jar from the project, and it works.

    I tried also with Pretty faces 3.1.0, but I had the same error.

    Any help?

    Regards,

    Giorgio

    #19946

    Hey Giorgio,

    this is a very strange issue you are seeing. Perhaps some kind of incompatibility between one of the latest Mojarra versions and PrettyFaces? Do you have any idea which Mojarra version Glassfish is using? I think this is mentioned in the logs somewhere.

    Thanks for reporting this

    Christian

    #19947

    giorgiofran2
    Participant

    Hi,

    probably that is the cause.

    In the log I found this:

    Initializing Mojarra 2.1.0 (FCS 2.1.0-b11)

    Regards,

    Giorgio

    #19948

    Hey Giorgio,

    thank you very much. Could you perhaps open a ticket for this issue? This way you will be kept up to date regarding this.

    http://code.google.com/p/prettyfaces/issues/list

    I’ll take a look at this as soon as I find some time.

    Christian

    #19949

    giorgiofran2
    Participant

    Done,

    thanks in advance.

    Giorgio

    #19950

    albatros
    Participant

    Hi everybody,

    I have the same Problem. I’ve just read the interesting article of Christian in the Java Magazin and wanted to try PrettyFaces. Unfortunately I got the same null-pointer exception. I’m using the same versions of Netbeans and Glassfish.

    Did you fix the problem?

    Thanks

    #19951

    albatros
    Participant

    I’ve just downloaded the newest Mojarra release into my Glassfish and now my app starts without problem. :-)

    #19952

    I’m glad to hear you got it working. :)

    Could you perhaps tell us how you updated the Mojarra JARs in Glassfish? I think there are some other people suffering from this issue and I guess they would love to hear how you resolved it.

    Perhaps you could attach the info to the corresponding issue:

    http://code.google.com/p/prettyfaces/issues/detail?id=90

    Thanks :)

    #19953

    albatros
    Participant

    I’ve just replaced the two libraries jsf-api.jar and jsf-impl.jar in glassfish-3.1-b41/glassfish/modules/ with those from the new Mojarra release 2.1.1.

    That’s it.

    Fouad

    #19954

    Thanks for sharing your solution! :)

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Comments are closed.