tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Difference between running bootstrap.jar and catalina.bat
Date Fri, 15 May 2009 14:57:50 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jan,

On 5/15/2009 1:25 AM, Jan Hork√Ĺ wrote:
> I got the following error:
> 
> 15.5.2009 7:10:16
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> contextInitialized
> SEVERE: WSSERVLET11: failed to parse runtime descriptor:
> java.lang.VerifyError: (class: com/sun/xml/ws/model/AbstractSEIModelImpl,
> method: createJAXBContext signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;)
> Incompatible argument to function java.lang.VerifyError: (class:
> com/sun/xml/ws/model/AbstractSEIModelImpl, method: createJAXBContext
> signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) Incompatible argument
> to function

You have mismatched your libraries: you have a .class file that is
trying to call something like createJAXBContext(FooType) and the
function available is actually createJABXContext(BarType).

You need to make sure that the libraries used to compile your code are
the same as those used to run it. All the libraries your application
needs to run should be in your webapp's WEB-INF/lib directory. Try
removing everything you added to Tomcat's lib directory and Java's lib
(or lib/ext) directories and just using WEB-INF/lib.

> It has to be some classpath mismatch(java -jar bootstrap.jar start works
> fine) but I can't find what. The libraries in this app are bit complicated.
> There is custom tomcat realm for authentication (this is the thing why is
> some libraries located in tomcat\lib)

That's fine: if you have custom authentication, go ahead and put that in
Tomcat's lib directory.

> some custom listeners and so on.

Unless you are configuring these listeners at the top-level (like within
<Service>, <Engine> or <Host>), your listeners will be loaded by your
web application's ClassLoader, and so the classes can be in
WEB-INF/classes or WEB-INF/lib (in JAR files, of course).

> I
> need to override somehow the jaxb1 api which I'm using for older custom
> component in application.

You can put your JAXB classes into your webapp. Webapp ClassLoaders are
guarantees to load their classes locally (that is, from WEB-INF/lib)
before asking the parent ClassLoader to load the class. Note that this
is exactly the opposite of the way most ClassLoaders work. But, it's
mandated so that things like what you want to do actually work.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoNgu4ACgkQ9CaO5/Lv0PDt/QCgu1T7kLnurlRMRlRyyKnOP1TO
W6sAn2I5ZoONrIOvKR0NE6G0nigorfyQ
=C1m+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message