You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by neal <ne...@yahoo.com> on 2003/04/25 07:31:35 UTC

Moved classes to Common Dir

I moved some classes from my webApp's web-inf directory, to the Tomcat
Common directory so that another webApp could share the same classes.  But,
now I'm getting errors when I start Tomcat.

Shouldn't it have been this simple?  What did I miss?

Thanks
Neal


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


RE: Moved classes to Common Dir

Posted by neal <ne...@yahoo.com>.
Oops ... meant to say that load order was common and then shared.

-----Original Message-----
From: neal [mailto:nealcabage@yahoo.com]
Sent: Thursday, April 24, 2003 10:55 PM
To: Tomcat Users List
Subject: RE: Moved classes to Common Dir


Well, I thought I read that class loading order is classes and then shared
... so either way it seems that wouldn't matter ... but for what its worth I
also tried using shared.  Of course, these are classes (not a jar) so I
placed them into common/classes and shared/classes, rather than the
respective lib directories.  It still didn't work though.  :(


-----Original Message-----
From: Michael Gerdau [mailto:mgd@technosis.de]
Sent: Thursday, April 24, 2003 10:40 PM
To: Tomcat Users List
Subject: Re: Moved classes to Common Dir


>I moved some classes from my webApp's web-inf directory, to the Tomcat
>Common directory so that another webApp could share the same classes.  But,
>now I'm getting errors when I start Tomcat.
>
>Shouldn't it have been this simple?  What did I miss?

According to
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
classes shared between webapps should be put into
$(TOMCAT_HOME)/shared/lib.

Best,
Michael
--
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau       email: mgd@technosis.de
 Help stamp out vandalism, or I'll break all your windows.
 GPG/PGP-keys available on request or at public keyserver



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


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


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


RE: Moved classes to Common Dir

Posted by neal <ne...@yahoo.com>.
Well, I thought I read that class loading order is classes and then shared
... so either way it seems that wouldn't matter ... but for what its worth I
also tried using shared.  Of course, these are classes (not a jar) so I
placed them into common/classes and shared/classes, rather than the
respective lib directories.  It still didn't work though.  :(


-----Original Message-----
From: Michael Gerdau [mailto:mgd@technosis.de]
Sent: Thursday, April 24, 2003 10:40 PM
To: Tomcat Users List
Subject: Re: Moved classes to Common Dir


>I moved some classes from my webApp's web-inf directory, to the Tomcat
>Common directory so that another webApp could share the same classes.  But,
>now I'm getting errors when I start Tomcat.
>
>Shouldn't it have been this simple?  What did I miss?

According to
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
classes shared between webapps should be put into
$(TOMCAT_HOME)/shared/lib.

Best,
Michael
--
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau       email: mgd@technosis.de
 Help stamp out vandalism, or I'll break all your windows.
 GPG/PGP-keys available on request or at public keyserver



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


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


Re: Moved classes to Common Dir

Posted by Michael Gerdau <mg...@technosis.de>.
>I moved some classes from my webApp's web-inf directory, to the Tomcat
>Common directory so that another webApp could share the same classes.  But,
>now I'm getting errors when I start Tomcat.
>
>Shouldn't it have been this simple?  What did I miss?

According to
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
classes shared between webapps should be put into
$(TOMCAT_HOME)/shared/lib.

Best,
Michael
--
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau       email: mgd@technosis.de
 Help stamp out vandalism, or I'll break all your windows.
 GPG/PGP-keys available on request or at public keyserver



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


RE: Moved classes to Common Dir

Posted by neal <ne...@yahoo.com>.
Actually, yeah ...

the classes I moved to common/classes are my own framework .. the classes
that remain in the webapp/web-inf dir are specific to the webApp.  There is
no dependency that I can see by the common/classes upon the webApp classes,
nor should there be.

The error I recieve occurs when I run my initialization class.  Its trying
to read my config.xml file at it throws this error:

"java.lang.NullPointerException"

Any thoughts?

Thanks.
Neal




-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com]
Sent: Friday, April 25, 2003 6:02 AM
To: Tomcat Users List
Subject: Re: Moved classes to Common Dir



Note that your webapp can see the classes in the jars of the shared/lib or
common/lib directories, but not vice-versa, unless you make sure to use the
thread context class loader.  This is something you have to watch out for
when attempting to use parent/child classloader combinations.

Jake

At 10:31 PM 4/24/2003 -0700, you wrote:
>I moved some classes from my webApp's web-inf directory, to the Tomcat
>Common directory so that another webApp could share the same classes.  But,
>now I'm getting errors when I start Tomcat.
>
>Shouldn't it have been this simple?  What did I miss?
>
>Thanks
>Neal
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


Re: Moved classes to Common Dir

Posted by Jacob Kjome <ho...@visi.com>.
Note that your webapp can see the classes in the jars of the shared/lib or 
common/lib directories, but not vice-versa, unless you make sure to use the 
thread context class loader.  This is something you have to watch out for 
when attempting to use parent/child classloader combinations.

Jake

At 10:31 PM 4/24/2003 -0700, you wrote:
>I moved some classes from my webApp's web-inf directory, to the Tomcat
>Common directory so that another webApp could share the same classes.  But,
>now I'm getting errors when I start Tomcat.
>
>Shouldn't it have been this simple?  What did I miss?
>
>Thanks
>Neal
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org