Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fairly easy classpath/setup question 1

Status
Not open for further replies.

thrybergh

MIS
Feb 10, 2003
52
GB
Hello.

I have a servlet which is supposed to create an HTML page using Xalan. It is working fine on my tomcat setup on my local PC, but on the webhost I get this error:

Code:
java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:141)
	at org.apache.xalan.serialize.SerializerFactory.getSerializer(SerializerFactory.java:131)
	at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1048)
	at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:975)
	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1124)
	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
	at flan.predictions.servlet.RequestHandler.outputXML(RequestHandler.java:138)
	at flan.predictions.servlet.SignIn$SignInRequestHandler.formatOutput(SignIn.java:117)
	at flan.predictions.servlet.PredictionsServlet.doRequest(PredictionsServlet.java:89)
	at flan.predictions.servlet.PredictionsServlet.doGet(PredictionsServlet.java:110)

Is it because it cannot see the Xalan jars? If so, how does it know which line numbers to report the error for?


Thank you.
 
>>> Is it because it cannot see the Xalan jars?
I doubt it ... I expect you have some conflict with in your setup (things to check are : you don't have multiple copies of jar files /classes on your CLASSPATH, that your JavaSoft JRE (in C:/Program Files/JavaSoft I think) is the same version as your JDK, that all resources required by your classes are available, that your code has not been compiled on one version of JDK, and run on different version number, and so on)

Good luck !


Signals that an unexpected exception has occurred in a static initializer. An ExceptionInInitializerError is thrown to indicate that an exception occurred during evaluation of a static initializer or the initializer for a static variable.

As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The "saved throwable object" that may be provided at construction time and accessed via the getException() method is now known as the cause, and may be accessed via the Throwable.getCause() method, as well as the aforementioned "legacy method."
 
Thanks for the tips.

I think there are several things that apply to my situation, such as the different versions of the JDK and the multiple copies on the classpath. I will investigate.
 
It was the JDK version!

I had compiled with 1.4.1_02 and tried to run it with 1.4.2 on the server.


Cheers.

[2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top