Announcement Announcement Module
Collapse
No announcement yet.
tomcat common/lib and common/endorsed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • tomcat common/lib and common/endorsed

    Hi

    I need to configure two levels of common libs as I can do in tomcat with 'common/endorsed' and 'common/lib'.

    The problem is that I want to use several classes of one jar (wsclient_extended-101330.jar) but there are classes of this jar that colides with another jar i need (xml-apis.jar). In tomcat I've solved this issue putting wsclient_extended-101330.jar in 'common/lib' and xml-apis.jar in 'common/endorsed'.

    Is it possible that??

    Thanks in advanced

    Alex

  • #2
    Yes, this is a standard feature of Tomcat.
    If you look at catalina.sh and setclasspath.sh, if the variable
    JAVA_ENDORSED_DIRS
    is empty (not set) these scripts setup the directory

    [ -z "$JAVA_ENDORSED_DIRS" ]; then
    JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
    fi

    Where BASEDIR is CATALINA_HOME

    however, in your instance, say
    /software/springsource/tcServer-6.0/instance1/bin/setenv.sh

    you can add the line

    JAVA_ENDORSED_DIRS=$CATALINA_BASE/endorsed

    you would then have to create the directory

    /software/springsource/tcServer-6.0/instance1/endorsed

    and place your JARs there.

    when you do a PS, you would then look at the command line that was generated, and it would look like
    -Djava.endorsed.dirs=/software/springsource/tcServer-6.0/instance1/endorsed

    If you are running tcServer on Windows as a service, then open up the file wrapper.conf for your instance and locate the line

    wrapper.java.additional.1=-Djava.endorsed.dirs=..\common\endorsed

    best
    Filip

    Comment

    Working...
    X