You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dmitry S. Kravchenko" <di...@vsetech.ru> on 2006/06/16 00:44:25 UTC

How one can use different versions of classes on differenet webapps

Hi!

We have some library, that we use in our web applications. We put jars of
this library into WEB-INF/lib directory of each application.

But the library is in permanently development, so we have new and new
versions of it every several months. Sometimes it is not backward
compatible. So we need old applications work with old version of library and
new -- with new. Is it possible? Wouldn't these files interfere? We have
same classnames in different versions of library. Does one applicationa is
totally separated from other in the sense of names of classes? 

It seems to me, that we meet some interferention here. We got an exception
about some signature:

java.lang.VerifyError: (class: com/vsetech/vtv/data/MetSystem, method:
initMetSystem signature:
(ZZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V) Incompatible
object argument for function call
	at
com.vsetech.webmet.metservlet.MetServlet.MetServletInit(MetServlet.java:39)
	at
com.vsetech.webmet.metservlet.MetTemplateServlet.init(MetTemplateServlet.jav
a:22)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
...

What is it?

Thanks.

Dims.


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


Re: How one can use different versions of classes on differenet webapps

Posted by Mark Thomas <ma...@apache.org>.
Dmitry S. Kravchenko wrote:
> But the library is in permanently development, so we have new and new
> versions of it every several months. Sometimes it is not backward
> compatible. So we need old applications work with old version of library and
> new -- with new. Is it possible? Wouldn't these files interfere? We have
> same classnames in different versions of library. Does one applicationa is
> totally separated from other in the sense of names of classes?

The webapp class-loader handles this for you. See
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

> It seems to me, that we meet some interferention here. We got an exception
> about some signature:

Looks like you need to re-compile you servlets with the new version of
the library.

Mark


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