When I created the jar with 'jar cf' it overwrote the manifest.mf file that I needed. I used 'zip' to create the jar instead. Everything is better now.
Thanks for the help. Tait |---------+----------------------------> | | Tait E | | | Larson/Burlingame| | | /IBM@IBMUS | | | | | | 07/17/2002 02:06 | | | PM | | | Please respond to| | | "Tomcat Users | | | List" | | | | |---------+----------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: "Tomcat Users List" <[EMAIL PROTECTED]> | | cc: | | Subject: Re: explicit ordering of jars searched by classloader in web application | | | | | >------------------------------------------------------------------------------------------------------------------------------| Sorry guys. That was an unfinished email I accidentally sent out. I attempted to merge the jars. When I ran a standalone program which had previously worked when I explicitly set the correct classpath with only the new jar in the classpath I got the following error: java.lang.SecurityException: no manifiest section for signature file entry matri x/vui/TipProvider.class at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVe rifier.java:262) at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier .java:174) at java.util.jar.JarVerifier.processEntry(JarVerifier.java:284) at java.util.jar.JarVerifier.update(JarVerifier.java:197) at java.util.jar.JarFile.initializeVerifier(JarFile.java:248) at java.util.jar.JarFile.getInputStream(JarFile.java:310) at sun.misc.URLClassPath$4.getInputStream(URLClassPath.java:537) I noticed that the manifest file included in the new jar contained the following. Name: matrix/vui/TipProvider.class Digest-Algorithms: MD5 SHA1 MD5-Digest: Z/8jzcyDcKroTWxZtQS1vw== SHA1-Digest: jEsYXctDim2dFpCOH9TIqwXpST8= I attempted using a manifest.mf file which included only the line Manifest-Version: 1.0 This didn't work either. Any ideas what the problem might be? Also, I attempted to add the classes to the sytem classpath by editing catalina.bat rem --------------------- rem TEL - adding eMatrix information to the classpath rem --------------------- rem set EBASE=c:\eMatrix9\java\classes rem set CLASSPATH=%CLASSPATH%;%EBASE%\eMatrixAppletDownloadXML.jar;%EBASE% \eMatrixContainerEJB.jar;%EBASE%\eMatrixServletEJB.jar echo new classpath echo %CLASSPATH% This failed aswell. I got the following errors in my localhost_log file: 2002-07-09 09:23:14 StandardWrapper[:default]: Loading container servlet default ...skipping... java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:488) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10 6) Looks like the I've forgot to add something to the classpath. Anyone know what? Sorry for the plethora of questions. Any help would be much appreciated. Tait |---------+----------------------------> | | Tait E | | | Larson/Burlingame| | | /IBM@IBMUS | | | | | | 07/17/2002 01:34 | | | PM | | | Please respond to| | | "Tomcat Users | | | List" | | | | |---------+----------------------------> > ------------------------------------------------------------------------------------------------------------------------------| | | | To: "Tomcat Users List" <[EMAIL PROTECTED]> | | cc: | | Subject: Re: explicit ordering of jars searched by classloader in web application | | | | | > ------------------------------------------------------------------------------------------------------------------------------| I'm not as concerned with portability. I'd like to get this guy up and running. I tried merging jars into one single jar. Unfortunately the manifest file contain Message Digests for each class. I tried setting the classpath in st |---------+----------------------------> | | [EMAIL PROTECTED] | | | (Will Hartung) | | | | | | 07/17/2002 11:50 | | | AM | | | Please respond to| | | "Tomcat Users | | | List" | | | | |---------+----------------------------> > ------------------------------------------------------------------------------------------------------------------------------| | | | To: "Tomcat Users List" <[EMAIL PROTECTED]> | | cc: | | Subject: Re: explicit ordering of jars searched by classloader in web application | | | | | > ------------------------------------------------------------------------------------------------------------------------------| From: "Tait E Larson" <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 10:56 AM Subject: explicit ordering of jars searched by classloader in web application > I've got three third party jar files in the WEB-INF/lib directory of my web > aplication that contain different versions of the same classes. I need to > explicitly state the order in which the classloader searches these jars in > order for my web application to work correctly. Can this be done by > manipulating the classloader at runtime? Would it be possible to explicitly > state the jar ordering somewhere in web.xml? Wow! That's certainly a issue that's fraught with peril. Depending on how the container is written, it could be placing the jars in the lib directory in a couple of different orders. They could be in alphabetical order, or they could be in directory order (i.e. the order they show up in an unsorted directory). The Servlet Spec doesn't have anything about ordering the jars in lib directory, so while a container can offer some specific information, it won't be portable to another container. You certainly shouldn't rely on the system directory layout itself, as that could change by simply reloading the directory, or from platform to platform. The BEST solution would be to pull the jars apart and build a single "correct" jar that is not dependent upon the classpath load order. The easiest way to do this would be to simply unjar them in "reverse classpath order", so that whatever you want search first is unjarred last. For example: $ mkdir newjar $ cd newjar $ jar xf /path/to/3rdPartyLibOriginal.jar $ jar xf /path/to/3rdPartyLibServicePack1.jar $ jar xf /path/to/3rdPartyLibServicePack2.jar $ jar cf /path/to/Integrated3rdPartyLib.jar . Basically, this lets the latter jars overwrite the same named classes from the earlier jars, and has the same effect as placing them before one another in a classpath. The other solution is to put them on the system classpath in the order desired, but then they're not in the webapp WAR file. Regards, Will Hartung ([EMAIL PROTECTED]) -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>