You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lorenzo Cerini <lo...@info-era.com> on 2007/06/22 15:44:53 UTC

naming trouble

Hi all,
i am experiencing a strange trouble in tomcat 5.5.23.

I have two very similar webapps let's say app1 and app2.
They lay in $TOMCAT/webapps/appX

in both of them ther is a java class managing the connesction to 
dbserver, say:

$TOMCAT/webapps/app1/WEB-INF/classes/servizio/Connessione_dyn.class
and
$TOMCAT/webapps/app2/WEB-INF/classes/servizio/Connessione_dyn.class

These classes uses two deifferent pooled connections say:

jdbc_app1
and
jdbc_app2

but my tomcat mismatch the classes, i mean if i recompile the 
Connessione_dyn
belonging to app2 and restart tomcat, even my app1 try to use the app2's 
Connessione_dyn
instead of its own one, thus leading to an error since the pooled 
connection used by app2
is not 'registered' in the app1 context. I have used the same 
configuration for a long period on
tomcat 5.0.28 with no problems.

Maybe can help my java version is:

 # /tomcat/java/bin/java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)

Thanks in advance
L.Cerini

---------------------------------------------------------------------
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: naming trouble

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 6/22/07, Lorenzo Cerini <lo...@info-era.com> wrote:
> but my tomcat mismatch the classes, i mean if i recompile the
> Connessione_dyn
> belonging to app2 and restart tomcat, even my app1 try to use the app2's
> Connessione_dyn
> instead of its own one, thus leading to an error since the pooled
> connection used by app2
> is not 'registered' in the app1 context. I have used the same
> configuration for a long period on
> tomcat 5.0.28 with no problems.

I think this most likely caused by cross-context conflict.

Have you tried explicitly setting crossContext="false" in your
application's context?

Try naming the classes and their packages in the two separate apps
such that their names are different.

Do you have an option to use multiple virtual hosts instead of
multiple contexts?

I was able to deal with cross context class conflicts by deploying
each app on it's own virtual host rather than multiple contexts within
the same virtual host.

>
> Maybe can help my java version is:
>
>  # /tomcat/java/bin/java -version
> java version "1.6.0_01"
> Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
> Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)
>
> Thanks in advance
> L.Cerini
>

-Rashmi

---------------------------------------------------------------------
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