Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Null pointer exception when deploying to Orion apps server

843842Jul 1 2005 — edited Aug 19 2007
I am using JSF 1.1_01 and when I deploy to Orion 2.0.5 I get the following exception:

500 Internal Server Error

java.lang.NullPointerException

at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)

at com.evermind[Orion/2.0.5 (build 11234)]._ay._lse(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ay._cbd(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ay._nnc(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ax._luc(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ax._ucb(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._bf.run(Unknown Source)

I have the following libraries in my application:

activation.jar
log4j-1.2.8.jar
commons-beanutils.jar
jaxen-full.jar
mailapi.jar
commons-collections.jar
jcommon-0.8.0.jar
poi-2.5.1-final-20040804.jar
commons-digester.jar
jsf-api.jar
saxpath.jar
commons-logging.jar
jsf-impl.jar
smtp.jar
dbutil.jar
jstl.jar
standard.jar

I have checked the forums and most of the web and most people have suggested adding

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

to my deployment descriptor, which I have done and it has not fixed the problem. I have also stopped the FacesServlet loading on start-up - again it has not had any effect.

Another thing I tried was creating a series of files in my classes/META-INF/services directory called:

javax.faces.application.ApplicationFactory
javax.faces.context.FacesContextFactory
javax.faces.lifecycle.LifecycleFactory
javax.faces.render.RenderKitFactory
javax.xml.parsers.SAXParserFactory

containing the names of the appropriate classes from the JSF reference implementation (and org.apache.crimson.jaxp.SAXParserFactoryImpl for the SAX one). This changed the error to:

Error with the factory files there:

java.lang.IllegalStateException: ApplicationAssociate ctor not called in same callstack as ConfigureListener.contextInitialized()

at com.sun.faces.application.ApplicationAssociate.<init>(ApplicationAssociate.java:102)

at com.sun.faces.application.ApplicationImpl.<init>(ApplicationImpl.java:95)

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

at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)

at com.evermind[Orion/2.0.5 (build 11234)]._ay._lse(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ay._cbd(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ay._nnc(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ax._luc(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._ax._ucb(Unknown Source)

at com.evermind[Orion/2.0.5 (build 11234)]._bf.run(Unknown Source)

Finally, I tried recompiling the source of the reference implementation and at least part of the problem appears to stem from the getServletContextDuringInitialize() in the ConfigureListener class. It is returning null, instead of the context it was intialized with. I am guessing that there is some sort of "different thread" problem going on here, but I can't fathom it.

Please, please, please can anybody help me with this?

I have tried all of the fixes I have found that anyone has posted, and like many others I suspect, I have been unable to solve it. I have been working on a system for several months and I desperately need to get it deployed to OracleAS within the next day or so (I am using a local instance of Orion to nail it down more quickly) and I am just about at my wits end.

DG
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2007
Added on Jul 1 2005
10 comments
565 views