tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kriss Weissmann" <k.weissm...@gmx.net>
Subject (Catalina + webapp1 with JAXM + webapp2 with JAXM == impossible) -> true ??? [classloading problems]
Date Sun, 07 Apr 2002 12:53:23 GMT
KRISTIAN WEISSMANN
   81669 M√ľnchen  Adelholzener Str.5  Tel.:089/6891219
   78120 Furtwangen  Friedrichstr.3  Tel.:07723/914377 [Studienanschrift]
   e-mail:k.weissmann@gmx.net
   mobil: 0170 8889132


Hi,
I have two web applications wich are two web services implemented with the
JAXM servlet. It seems impossible to run this constellation in catalina
(4.0.2) due to conflicts with the activation.jar needed by JAXM. This is
what happens when I want to access both web services one after the other:



SCENARIO 1: activation.jar is in the WEB-INF\lib of each web application AND
in CATALINA\common\lib:

java.lang.LinkageError: Class javax/activation/DataHandler violates loader
const
raints
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClas
sLoader.java:674)
        at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:1093)
        at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:992)
        at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:1076)
        at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:992)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1380)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1243)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at
javax.mail.internet.MimeBodyPart.getDataHandler(MimeBodyPart.java:508
)
        at
javax.mail.internet.MimeBodyPart.getInputStream(MimeBodyPart.java:459
)
        at
com.sun.xml.messaging.soap.MessageImpl.<init>(MessageImpl.java:120)
        at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFa
ctoryImpl.java:32)
        at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2343)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
468)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1012)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
        at java.lang.Thread.run(Thread.java:484)




SCENARIO 2: activation.jar is just in the WEB-INF\lib of each web
application and not in CATALINA\common\lib. Result:

javax.servlet.ServletException: Servlet execution threw an exception
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
 at java.lang.Thread.run(Thread.java:484)
----- Root Cause -----
java.lang.NoClassDefFoundError: javax/activation/DataSource
 at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFactoryIm
pl.java:32)
 at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
 at java.lang.Thread.run(Thread.java:484)





SCENARIO 3: activation.jar is just in CATALINA\common\lib:

java.lang.Error: DataContentHandlerFactory already defined
        at
javax.activation.DataHandler.setDataContentHandlerFactory(DataHandler
.java:628)
        at
com.sun.xml.messaging.soap.AttachmentPartImpl.<clinit>(AttachmentPart
Impl.java:35)
        at
com.sun.xml.messaging.soap.MessageImpl.<init>(MessageImpl.java:124)
        at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFa
ctoryImpl.java:32)
        at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2343)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
468)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1012)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
        at java.lang.Thread.run(Thread.java:484)




SCENARIO 4: activation.jar is in CATALINA\lib AND in the WEB-INF\lib of each
web application:

java.lang.LinkageError: loader constraints violated when linking
javax/activatio
n/DataHandler class
        at
com.sun.xml.messaging.soap.MessageImpl.<init>(MessageImpl.java:124)
        at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFa
ctoryImpl.java:32)
        at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2343)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
468)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1012)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
        at java.lang.Thread.run(Thread.java:484)



SCENARIO 5: activation.jar is in CATALINA\server\lib AND in the WEB-INF\lib
of each web application:

java.lang.LinkageError: loader constraints violated when linking
javax/activatio
n/DataHandler class
        at
com.sun.xml.messaging.soap.MessageImpl.<init>(MessageImpl.java:124)
        at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFa
ctoryImpl.java:32)
        at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2343)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
468)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)



What could be the solution to solve this problem?

TIA and greetings from germany
Kriss Weissmann





***************************************
University of Furtwangen
Faculty Business Computing
www.wi.fh-furtwangen.de
***************************************



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message