atom feed4 messages in net.java.dev.jwsdp.usersRE: problems integrating with Tomcat
FromSent OnAttachments
Derek GreentreeJul 27, 2005 2:44 pm 
Kevin JonesJul 27, 2005 11:32 pm 
Ramesh MandavaJul 27, 2005 11:44 pm 
Diego BallveAug 1, 2005 6:41 am 
Subject:RE: problems integrating with Tomcat
From:Kevin Jones (kev@develop.com)
Date:Jul 27, 2005 11:32:47 pm
List:net.java.dev.jwsdp.users

I believe the solution to your first problem is to copy the xalan.jar and xercesImpl.jar from %JWSDP_HOME%/jaxp/lib/endorsed to %TOMCAT_HOME%/common/endorsed,

That doesn't work. The error remains.

I haven't tried this with 1.6 yet but it certainly works for me with 1.5

-----Original Message----- From: Derek Greentree [mailto:dere@gmail.com] Sent: 27 July 2005 22:45 To: use@jwsdp.dev.java.net Subject: problems integrating with Tomcat

I have had several hours of frustration and no small amount of problems trying to get JWSDP 1.6 working with either Tomcat 5.0.25 or 5.5.9.

First I attempted to get things working with JDK 1.4.2_07 and Tomcat 5.0.25. Solving problems one at a time and frequently consulting Google, I eventually got to a final, unsolvable (at least, I can't figure out how to solve it) problem: starting Tomcat gives java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm pl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424) Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema ; at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParser( Unknown Source) at org.apache.commons.digester.Digester.getParser(Digester.java:686) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:489) at org.apache.catalina.startup.Catalina.load(Catalina.java:528) ... 6 more

Based on google searches, it seems the solution to this would be to get JAXP's newer implementation of Xerces into a directory, and then to pass that directory via java.endorsed.dirs to the VM.

Then I attempted to get things working with JDK 1.5 and Tomcat 5.5.9. There, because some of the jar files in JWSDP 1.6 are compiled with an older JDK (why is a Sun product that was released on 6/23/2005 incompatible with Java 1.5? Mind-boggling), I can't compile files that I wish to use with JAXRPC with Java 1.5. I get a version incompatibility error (ignore the exec's - they're from ant):

java.lang.reflect.InvocationTargetException [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm pl.java:25) [exec] at java.lang.reflect.Method.invoke(Method.java:324) [exec] at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269) [exec] Caused by: java.lang.UnsupportedClassVersionError: com/raindance/webservice/HelloWorld (Unsupported major.minor version 49.0) [exec] at java.lang.ClassLoader.defineClass0(Native Method) [exec] at java.lang.ClassLoader.defineClass(ClassLoader.java:539) [exec] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) [exec] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) [exec] at java.net.URLClassLoader.access$100(URLClassLoader.java:55) [exec] at java.net.URLClassLoader$1.run(URLClassLoader.java:194) [exec] at java.security.AccessController.doPrivileged(Native Method) [exec] at java.net.URLClassLoader.findClass(URLClassLoader.java:187) [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:289) [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [exec] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) [exec] at java.lang.Class.forName0(Native Method) [exec] at java.lang.Class.forName(Class.java:219)

The only configuration I have gotten to work is using JDK 1.4.2 to compile and create my web application files, and then deploying those files to Tomcat 5.5.9 running in a 1.5 JRE. So, I have to use JRE 1.5 to fix the Xerces problems, but I also have to use 1.4.2 to fix incompatibilities between JDKs.

This is, to say the least, extremely disappointing. I'm hoping that someone can help provide some tips, or else I'll have to ditch JWSDP in favor of something that, well, actually works and doesn't require multiple JRE's.

Thanks. Derek