RE: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-20 Thread Caldarale, Charles R
 From: matyg [mailto:ma...@expand.com]
 Subject: Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

 1) (and as far as I know...) the
 javax/servlet/http/HttpServlet  class is
 located in servlet-api.jar, which located under under
 tomcat_home/lib.

Make sure that's the *only* place servlet-api.jar is located.  You can get that 
message if the same class exists in multiple locations in a given branch of the 
classloader tree.  Turn on -verbose:class when running Tomcat to see where 
classes are being loaded from.

 2) The file MyWebApp.xml is located at:
 tomcat_home\conf\Catalina\localhost\MyWebApp.xml

That's good; what's in it?  Also, where is your webapp located?  What's in its 
WEB-INF/lib directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



RE: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-20 Thread matyg

1) Running with -verbose:class, this is what I get
(C:/Work/ExpandView/apache-tomcat-6.0.18 is the tomcat home):

Loaded javax.servlet.http.HttpServlet from
file:/C:/Work/ExpandView/apache-tomcat-6.0.18/lib/servlet-api.jar

2) This is the content of MyWebApp.xml:

Context docBase=${catalina.home}/webapps/MyWebApp reloadable=false
privileged=true swallowOutput=true
WatchedResourceWEB-INF/web.xml/WatchedResource
/Context


3) My webapp is located at tomcat_home\webapps\MyWebApp.

4) These are the files under WEB-INF/lib:
activation.jar
activemq-all-5.2-SNAPSHOT.jar
batik-awt-util.jar
batik-dom.jar
batik-svggen.jar
batik-util.jar
batik-xml.jar
cewolf.jar
commons-beanutils.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-digester.jar
commons-fileupload.jar
commons-httpclient-3.0-rc3.jar
commons-io-1.3.jar
commons-lang-2.0.jar
commons-logging-1.1.jar
commons-pool-1.2.jar
commons-validator.jar
dialogs-rt.jar
displaytag-1.0.jar
itext-1.3.jar
jakarta-oro.jar
jaxp.jar
jcommon-0.9.5.jar
jdbc2_0-stdext.jar
jfreechart-0.9.20.jar
jmxtools.jar
jsr173_1.0_api.jar
jsse.jar
jta-1.1.jar
org.mortbay.jetty-4.2.17.jar
struts.jar
strutstest-2.1.3.jar
taglibs-datetime.jar
tar.jar
-- 
View this message in context: 
http://www.nabble.com/Upgrading-Tomcat-from-6.0.14-to-6.0.18---classpath-issue-tp21541405p21577511.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread matyg
(LoginContext.java:680)
at
javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at
org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:363)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)


The following classes are included in login.jar:
 com.expand.expandview.client.servlets.login.MyLoginModule
 com.expand.expandview.client.servlets.login.EvUsernamePasswordLoginModule
 com.expand.expandview.client.servlets.login.EvDatabaseServerLoginModule

The class com/expand/expandview/client/services/ClientUserLogicServices is
located under
%CATALINA_HOME%\webapps\webAppName\WEB_INF\classes


As I have already said, it runs OK in 6.0.14, but it doesn't work in 6.0.18.
I have looked on the changelog(v6.0.15/16/17 and 18) - but I didn't manage
to understand what is the change that causes that.

Can someone help?

Thanks.

-- 
View this message in context: 
http://www.nabble.com/Upgrading-Tomcat-from-6.0.14-to-6.0.18---classpath-issue-tp21541405p21541405.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread Konstantin Kolinko
2009/1/19 matyg ma...@expand.com:

 set
 CLASSPATH=%CLASSPATH%;.;%CATALINA_HOME%\lib;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\lib\el-api.jar;%CATALINA_HOME%\webapps\webAppName;%CATALINA_HOME%\webapps\webAppName\WEB_INF\classes;%CATALINA_HOME%\webapps\webAppName\WEB_INF\lib;%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\commons-daemon.jar;


Do not mess with the CLASSPATH variable. That is not supported and you
are severely breaking the classloader hierarchy. Thus are your
problems.

See
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

Best regards,
Konstantin Kolinko

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



Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread matyg

Yes, I know this page, but it is not understoodable from what is described
how it should be done.
They write there All such classes are visible to both Tomcat internal
classes, and to web applications.
What I understand is that I need to add classes to the system class loaded.
Where do I do that? where do I add them?
But how come it worked fine in v6.0.14 and not in v6.0.18? What was changed?


Konstantin Kolinko wrote:
 
 2009/1/19 matyg ma...@expand.com:

 set
 CLASSPATH=%CLASSPATH%;.;%CATALINA_HOME%\lib;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\lib\el-api.jar;%CATALINA_HOME%\webapps\webAppName;%CATALINA_HOME%\webapps\webAppName\WEB_INF\classes;%CATALINA_HOME%\webapps\webAppName\WEB_INF\lib;%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\commons-daemon.jar;

 
 Do not mess with the CLASSPATH variable. That is not supported and you
 are severely breaking the classloader hierarchy. Thus are your
 problems.
 
 See
 http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Upgrading-Tomcat-from-6.0.14-to-6.0.18---classpath-issue-tp21541405p21543150.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread Caldarale, Charles R
 From: matyg [mailto:ma...@expand.com]
 Subject: Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

 They write there All such classes are visible to both Tomcat internal
 classes, and to web applications.
 What I understand is that I need to add classes to the system
 class loaded.

No; do not ever, ever, ever add any Tomcat or webapp classes to the classpath.  
That is a recipe for disaster, as you're finding out.

 Where do I do that? where do I add them?

Classes that must be accessible via Tomcat and webapps go into Tomcat's lib 
directory.

You *must not* have references in your login modules back to any classes in the 
webapp.  That's an extremely poor and unsustainable architectural decision.

 But how come it worked fine in v6.0.14 and not in v6.0.18?
 What was changed?

Probably bug fixes, or you were extremely lucky before.  What you're doing is 
completely wrong.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread Pid
matyg wrote:
 Yes, I know this page, but it is not understoodable from what is described
 how it should be done.
 They write there All such classes are visible to both Tomcat internal
 classes, and to web applications.

Classes placed inside a webapp should not be visible to the container.
This is Servlet Spec stuff - otherwise there's little point in having a
classloader hierarchy at all.


 What I understand is that I need to add classes to the system class loaded.
 Where do I do that? where do I add them?

You should add them to the server/shared classloader, which in 6.x means
you just have to put them in a jar, in tomcat_home/lib.
The JAAS docs indicate that any classes you use need to be in the same
classloader as the module you're making.

 But how come it worked fine in v6.0.14 and not in v6.0.18? What was changed?

Are you sure you haven't got the classes deployed in a jar in /lib?
Even if you haven't what you're proposing is wrong and contrary to the
way that applications are intended to operate.

p


 Konstantin Kolinko wrote:
 2009/1/19 matyg ma...@expand.com:
 set
 CLASSPATH=%CLASSPATH%;.;%CATALINA_HOME%\lib;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\lib\el-api.jar;%CATALINA_HOME%\webapps\webAppName;%CATALINA_HOME%\webapps\webAppName\WEB_INF\classes;%CATALINA_HOME%\webapps\webAppName\WEB_INF\lib;%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\commons-daemon.jar;

 Do not mess with the CLASSPATH variable. That is not supported and you
 are severely breaking the classloader hierarchy. Thus are your
 problems.

 See
 http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

 Best regards,
 Konstantin Kolinko

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



 


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



Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread matyg
 
 
 Konstantin Kolinko wrote:
 2009/1/19 matyg ma...@expand.com:
 set
 CLASSPATH=%CLASSPATH%;.;%CATALINA_HOME%\lib;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\lib\el-api.jar;%CATALINA_HOME%\webapps\webAppName;%CATALINA_HOME%\webapps\webAppName\WEB_INF\classes;%CATALINA_HOME%\webapps\webAppName\WEB_INF\lib;%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\commons-daemon.jar;

 Do not mess with the CLASSPATH variable. That is not supported and you
 are severely breaking the classloader hierarchy. Thus are your
 problems.

 See
 http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

 Best regards,
 Konstantin Kolinko

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



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

-- 
View this message in context: 
http://www.nabble.com/Upgrading-Tomcat-from-6.0.14-to-6.0.18---classpath-issue-tp21541405p21558505.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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