Announcement Announcement Module
Collapse
No announcement yet.
Tomcat, class loader and ContextLoaderListener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      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.

      Comment

      Working...
      X