S
Steve Sobol
[Posted to the Jetty-support mailing list, but I'm not expecting a reply
real soon due to mail server issues at Sourceforge.]
Ok, I can't figure this out.
I'm using Jetty 5.1.2.
I have a JAR, containing a couple beans I'm using to support a web app.
This JAR uses several JDom classes.
I have a web app elsewhere on my server that requires an earlier version
of JDom, so I put that earlier version of JDom in the WEB-INF/lib
directory for that app and it works fine.
Back to the app I'm having problems with. I created a JAR with some
support classes for this app, and in the manifest I have
Class-Path: jdom-xpath.jar
(I specifically renamed the newer jdom.jar to jdom-xpath.jar so I wouldn't
get the two jars mixed up. The older jdom jar doesn't have xpath support.)
I've also tried
Class-Path: ./jdom-xpath.jar
Neither one works. I have both my jar and jdom-xpath.jar in the
WEB-INF/lib directory of my webapp, but when I try to use my jar, I end up
with a NoClassDefFoundError - the classloader can't find org.jdom.Text,
and I've checked - and org/jdom/Text.class *is* sitting in jdom-xpath.jar.
I suspect I'm doing something wrong, but what?
Here's another data point. I created a test class and packaged it up in a
jar file, and in the manifest I put Class-Path: jdom-xpath.jar.
This test class has a constructor that, when the class is loaded, prints
the contents of java.class.path to stdout. When I call it from a JSP using
<jsp:useBean>, the only classpath entry I see, besides the entries that
Jetty got from my CLASSPATH environment variable, is the directory from
which I started Jetty. No jdom-xpath.jar anywhere in the output.
What am I doing wrong?
real soon due to mail server issues at Sourceforge.]
Ok, I can't figure this out.
I'm using Jetty 5.1.2.
I have a JAR, containing a couple beans I'm using to support a web app.
This JAR uses several JDom classes.
I have a web app elsewhere on my server that requires an earlier version
of JDom, so I put that earlier version of JDom in the WEB-INF/lib
directory for that app and it works fine.
Back to the app I'm having problems with. I created a JAR with some
support classes for this app, and in the manifest I have
Class-Path: jdom-xpath.jar
(I specifically renamed the newer jdom.jar to jdom-xpath.jar so I wouldn't
get the two jars mixed up. The older jdom jar doesn't have xpath support.)
I've also tried
Class-Path: ./jdom-xpath.jar
Neither one works. I have both my jar and jdom-xpath.jar in the
WEB-INF/lib directory of my webapp, but when I try to use my jar, I end up
with a NoClassDefFoundError - the classloader can't find org.jdom.Text,
and I've checked - and org/jdom/Text.class *is* sitting in jdom-xpath.jar.
I suspect I'm doing something wrong, but what?
Here's another data point. I created a test class and packaged it up in a
jar file, and in the manifest I put Class-Path: jdom-xpath.jar.
This test class has a constructor that, when the class is loaded, prints
the contents of java.class.path to stdout. When I call it from a JSP using
<jsp:useBean>, the only classpath entry I see, besides the entries that
Jetty got from my CLASSPATH environment variable, is the directory from
which I started Jetty. No jdom-xpath.jar anywhere in the output.
What am I doing wrong?