Hello All,

I am having some trouble with a web application I am deploying to Tomcat. I have an custom library that works perfectly as a jar file included in the lib directory if I include all the jars that that library depends on into the lib directory also. What I would like to do is bundle the required jar files into my libraries jar file, but it failes to work when I do that.

Any thoughts? Does Tomcat prevent this?

I am using ANT to create my jar file, but when I look at the contents of my jar file it includes all the requested directories.

My build.xml looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="myapp" basedir="." default="jar">
<property name="classes.dir" value="./classes"/>
<property name="jar.dir" value="."/>
<property name="java_lib.dir" value="../../../../../Program Files/Java/lib"/>

<target name="jar">
<jar destfile="${jar.dir}/${ant.project.name}.jar">
<fileset dir="classes"/>
<fileset dir="${java_lib.dir}" includes="jai_codec.jar.jar"/>
<fileset dir="${java_lib.dir}" includes="xercesImpl.jar"/>
<fileset dir="${java_lib.dir}" includes="mysql-connector-java-3.1.8-bin.jar"/>
<fileset dir="${java_lib.dir}" includes="xmlParserAPIs.jar"/>
<fileset dir="${java_lib.dir}" includes="mlibwrapper_jai.jar"/>
<fileset dir="${java_lib.dir}" includes="xml-apis.jar"/>
<fileset dir="${java_lib.dir}" includes="jai_core.jar"/>
<target name="run" depends="jar">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
<target name="clean-build" depends="jar"/>
<target name="main" depends="run"/>

Like I said...it includes these jar files in my jar file, but will not function properly with my tomcat app. If I exclude these jar files and include them seperately then everything works.

NOTE: I do not access any of these libraries directly from any servlets, only from my classes.