Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

issue with jdk1.5 + tomcat 5

 
samurfriend sam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In our application we were using crimson xml apis, with jre 1.5 and
tomcat 4.1.27.

Now, i am trying to migrate it to Tomcat 5.0+, and 5.0.27 to be
precise. And, For my application to work, i need to have the
crimson.jar in the classpath.

With jre1.5 the tomcat is not starting and throws this exception :
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.adventnet.nms.util.RunJSPModule.startJSPModule(RunJSPModule.java:83)
at com.adventnet.nms.util.RunJSPModule.main(RunJSPModule.java:115)
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not
found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
Source)
at org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:284)
at org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(Mbe
ansDescriptorsDOMSource.java:130)
at org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescrip
tors(MbeansDescriptorsDOMSource.java
:120)
at org.apache.commons.modeler.Registry.load(Registry.java:819)
at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
at org.apache.commons.modeler.Registry.findDescriptor(Registry.java:992)
at org.apache.commons.modeler.Registry.findManagedBean(Registry.java:696)
at org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1047)
at org.apache.commons.modeler.Registry.registerComponent(Registry.java:859)
at org.apache.catalina.loader.WebappLoader.init(WebappLoader.java:612)
at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:644)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4231)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
.. 12 more

But using jre 1.4 / tomcat5.0.27 / with Crimson.jar in classpath and
other things remaining the same , there are no issues at all.

But, I need get this combo (jre 1.5/tomcat5.0.27/with Crimson.jar ) up
and running.

Moreover i dont understand the issue very clear myself. Because, i
keep the Crimson.jar in classpath and the class
"org.apache.crimson.jaxp.DocumentBuilderFactoryImpl" is also being
loaded by the system classloader. But, Still i get this peculiar
"class not found" as the cause from the Tomcat classloader.

Where am i missing the point. Some one please enlighten me on this.

Any help is very much appreciated.

Note: I have solved this problem by following the java endorsed standard mechanism. But i want a direct solution and not a workaround......

And also any one explain the root cause behind this exception.

thanks and regards,
Sam.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

Web apps won't load things from the CLASSPATH environment variable, if that's what you're saying; you need to actually install crimson.jar in the right place in Tomcat. For a single Web app, you can just put it in the Web app's WEB-INF/lib directory. If you want it to be shared by all web apps, then the TOMCAT/shared/lib directory is the place to put it.
 
Ray Udo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sam,

Also, you might want to look and make sure that you are using the JRE that is in your jdk1.5 subdirectory.

Ray
 
samurfriend sam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info friends,

But everything seems to be correct in case of jdk1.4. If i go for endorsed standard mehcanism, then i able to solve the problem. I have a got a workaround , but i want to know the exact root cause behind this issue.

Help me in this regard.

Regards
Sam
 
Kevin Kilroy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by samurfriend sam:
Thanks for the info friends,

But everything seems to be correct in case of jdk1.4. If i go for endorsed standard mehcanism, then i able to solve the problem. I have a got a workaround , but i want to know the exact root cause behind this issue.

Help me in this regard.

Regards
Sam



Hi, can you explain your workaround please, since I am having the exact same problem.

Thanks in advance,

Kevin
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15490
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Crimson is an XML parser, as far as I know - was this the XML parser that Sun included with Java 1.4?

Why did you make your application dependent on that particular XML parser? It's a good idea to fix your application, so that it uses only the standard XML API, and isn't dependent on a particular XML parser such as Crimson.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic