RE: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

2008-09-12 Thread Caldarale, Charles R
 From: Carol Cheung [mailto:[EMAIL PROTECTED]
 Subject: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

 I have catalina.jar in WEB-INF/lib
 Can anyone shed some light on what I'm doing wrong?

Putting catalina.jar in WEB-INF/lib is certainly one major error.  Remove it.  
You must never, never put the same classes in more than one spot in a given 
branch of the classloader tree.

Not telling us the version of Tomcat you're using is another error.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

2008-09-12 Thread Carol Cheung


 From: Carol Cheung [mailto:[EMAIL PROTECTED]
 Subject: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

 I have catalina.jar in WEB-INF/lib
 Can anyone shed some light on what I'm doing wrong?

Putting catalina.jar in WEB-INF/lib is certainly one major error.  Remove
it.  You must never, never put the same classes in more than one spot in a
given branch of the classloader tree.

Not telling us the version of Tomcat you're using is another error.

 - Chuck


Sorry, I'm using Tomcat 5.5. I removed catalina.jar from WEB-INF/lib and I
am still getting the same error.
-- 
View this message in context: 
http://www.nabble.com/NoClassDefFoundError%3A-org.apache.catalina.realm.RealmBase-tp19458032p19460362.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

2008-09-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carol,

Carol Cheung wrote:
 Sorry, I'm using Tomcat 5.5. I removed catalina.jar from WEB-INF/lib and I
 am still getting the same error.

You should put your Realm implementation into $TOMCAT_HOME/shared/lib or
$TOMCAT_HOME/common/lib. I suspect you have deployed it with your
application. This is an error, as Tomcat prevents applications from
interacting with Tomcat's internals (including its own classes) except
in very well-defined ways. If you want Tomcat to use your realm, you
will have to make it available to Tomcat -- not just your own application.

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

iEYEARECAAYFAkjKp8sACgkQ9CaO5/Lv0PAFrACfQ2GX6/0N9pX0BsP7ZkGowFsI
Cb8An3DFduFqG23yRT2NnsJQGNppWlR7
=fstM
-END PGP SIGNATURE-

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



RE: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

2008-09-12 Thread Caldarale, Charles R
 From: Carol Cheung [mailto:[EMAIL PROTECTED]
 Subject: RE: NoClassDefFoundError: org.apache.catalina.realm.RealmBase

 Sorry, I'm using Tomcat 5.5. I removed catalina.jar from
 WEB-INF/lib and I am still getting the same error.

Look at the Tomcat 5.5 classloader structure:

  Bootstrap
  |
   System
  |
   Common
  /  \
 Catalina   Shared
 /   \
Webapp1  Webapp2 ...

The 5.5 Realm doc says:
* Place your compiled realm in $CATALINA_HOME/server/lib
(which is Catalina in the above diagram).

However, if you do that, your Realm class(es) will not be visible to code in 
your webapp.  You'll need to put your Realm in common/lib (or common/classes, 
if not jar'd) to let both Tomcat and your webapp have access to your code.

BTW, it's easier in 6.0 due to the simplified classloader structure.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]