Results 1 to 3 of 3

Thread: Tomcat, class loader and ContextLoaderListener

  1. #1
    Join Date
    Mar 2005
    Posts
    11

    Default Tomcat, class loader and ContextLoaderListener

    I read all the documentation about tomcat classloaders but I'm not sure I get it all... I had my app working well when the application was containing in the war all the jars (including springs jar files). But now I moved the jars to shared/lib and I get java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListe ner.
    This doesn't make sense to me. Anyone has a clue?

    Henri.

  2. #2

    Default

    Hi,

    the shared/lib directory should be the right place to put your libs in.
    Take a look at your .../Tomcat/conf/catalina.properties. You should
    find an entry like the following at the end of the file, specifying your shared/lib and shared/classes directories:

    Code:
    shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
    Maybe this entry has been changed for some reason...

    regards
    Mario

    p.s.: remember to restart your tomcat when moving your jars to the libs directory!

  3. #3
    Join Date
    Mar 2005
    Posts
    11

    Default

    Quote Originally Posted by nyname00
    Hi,

    the shared/lib directory should be the right place to put your libs in.
    Take a look at your .../Tomcat/conf/catalina.properties. You should
    find an entry like the following at the end of the file, specifying your shared/lib and shared/classes directories:

    Code:
    shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
    Maybe this entry has been changed for some reason...
    Thanks alot Mario! I was looking for these parameters for a long time!
    Anyway the evil was in my context.xml I had privileged="true"... by setting it to privileged="false" everything is working fine :-)

    Henri.

Similar Threads

  1. Custom class loader
    By dwelzel in forum Container
    Replies: 0
    Last Post: Jul 22nd, 2005, 03:45 PM
  2. ClassLoader issue ! - Need Help
    By pkkishore in forum Container
    Replies: 11
    Last Post: Jun 3rd, 2005, 05:57 AM
  3. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  4. Replies: 3
    Last Post: Apr 12th, 2005, 08:40 AM
  5. strange class loader issue
    By siddharth in forum Container
    Replies: 4
    Last Post: Feb 4th, 2005, 03:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •