I'm having exactly the same problem, has anyone found a solution to this?
Is the Classpath in the WAR file's manifest set correctly?
I have read over the articles about this on theserverside.com and have built my .ear in the following way :
I want the classes in common.jar to be shared between both the ejb and the servlet container.
My manifest file lookes like this :
Manifest-Version: 1.0 Created-By: 1.3.0_02 (Sun Microsystems Inc.) Class-Path: common.jar
The error I get is :
org.apache.jasper.JasperException: JASPER: Unable to compile class for JSPC:\DOCUME~1\ADMINI~1\LOCALS~1 \Temp\JettyContext55491.tmp\_0002fjsp_0002fclient_0002frep_00020page_0002ejsprep_00020page_jsp_0.java:16: Class com.bluetech.common.adpaters.JNDIAdapter not found in import. import com.bluetech.common.adpaters.JNDIAdapter; ^ 1 error
where the class in my common.jar I am trying to access in my JSP is com.bluetech.common.adapters.JNDIAdapter
I assume I dont need to reference common.jar in my application.xml? There seems to be quite a few posts on the boards regarding JSP compilation errors concerning classpaths. Has anyone tackled this problem?
Instead of giving Class-Path: common.jar
give it as Class-Path: ../common.jar and it will work just fine !!!! I did the same thing and the servlet works fine.
Thanks, mine works fine now too.
A couple things I had to change as well was - the last two lines of a manifest file had to be carriage returns. Also it didn't seem to like gaps between lines in the file. It seems manifest formatting is very strict :)
I am using JBoss-2.2.2_Tomcat-3.2.2, and I have tried the solution(s) specified in this discussion, to no avail.
The relevant line from the JBoss log seems to be :-
[J2EE Deployer Default] added jar:file:D:\java\JBoss-2.2.2_Tomcat-3.2.2\jboss\tmp\deploy\D
efault\copy1016.zip!/ublib.jar to common classpath
Yet I have specified in my manifest file :-
Seem like the relative path is thrown away and my jsp's cannot find the classes in the jar.
Any ideas ?
Seems silly to reply to myself, but ...
I got it to work (finally), I also had to copy the ublib.jar file to WEB-INF/lib directory, then produce the .web archive.
The duplication seems a waste, but it's better than nothing.
I'm using JBoss-2.4.0_Tomcat-3.2.3
I figured that you don't need to include the client.jar in the application.ear.
All you need to do is to put the client.jar in the WEB-INF/lib/client.jar and include it in the webmodule.war
and you don't even need to add the class-path line in the manifest.mf of the webmodule.
Suppose I want to map an external jar file in MANIFEST.MF. Some thing like
Class-path : F:\abc\xyz.jar
How can I achive this? The relative path mechanism won't work here.