|
Home > Archive > WebSphere Application Server > July 2007 > Classloading issue - Manifest file
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Classloading issue - Manifest file
|
|
|
| We have a JSF,Spring/Hibernate application running on TomCat that I am trying to port to WebSphere 6.1. I have created an EAR via an Ant script. The EAR uis configured as follows:
Root:
META-INF/Application.xml
Jar that represents the 'business tier' classes
Jar that represents the 'web tier' classes
Common jar for Exception classes, Constants classes, etc.
A large number of library jars e.g. Spring.jar, Hibernate3.jar, log4j.jar, etc.
In the WAR I put only the jspx's and the configuration files in WEB-INF like faces-config and ApplicationContext.xml, among others.
I'm using the Ant's Manifest tag inside the ear task. This produces a Manifest file that looks something like this: Class-Path: Spring.jar Hibernate3.jar MyBustier.jar - etc. The problem is that Websphere is not loading these classes. Does anyone have an
example of a Manifest file that includes the Class-Path attribute? Maybe the issue is with the Ant generation of the Manifest file?
Thanks very much,
Shibani
| |
| Ken Hygh 2007-07-25, 1:23 am |
| ibobbyc@hotmail.com wrote:
> We have a JSF,Spring/Hibernate application running on TomCat that I am trying to port to WebSphere 6.1. I have created an EAR via an Ant script. The EAR uis configured as follows:
>
> Root:
> META-INF/Application.xml
> Jar that represents the 'business tier' classes
> Jar that represents the 'web tier' classes
> Common jar for Exception classes, Constants classes, etc.
> A large number of library jars e.g. Spring.jar, Hibernate3.jar, log4j.jar, etc.
>
> In the WAR I put only the jspx's and the configuration files in WEB-INF like faces-config and ApplicationContext.xml, among others.
>
> I'm using the Ant's Manifest tag inside the ear task. This produces a Manifest file that looks something like this: Class-Path: Spring.jar Hibernate3.jar MyBustier.jar - etc. The problem is that Websphere is not loading these classes. Does anyone have a
n example of a Manifest file that includes the Class-Path attribute? Maybe the issue is with the Ant generation of the Manifest file?
>
> Thanks very much,
> Shibani
>
Shibani,
I've got one that looks like this:
Manifest-Version: 1.0
Class-Path: ApplicationCommon.jar
ApplicationMBeans.jar
BackendConnector.jar
BackendProxies.jar
Exceptions.ja
P.S. I saw 'MyBustier.jar' and thought 'Wow, interesting naming
convention there!'. Took me about a minute to make the connection to
'Business Tier' :-)
Ken
| |
| Brian S Paskin 2007-07-25, 1:23 am |
| Hi, you can use the Application Server Toolkit to assemble the enterprise archive, if necessary.
The MANIFEST.MF file in the web archive should look like this:
Manifest-Version: 1.0
Class-Path: Spring.jar Hibernate3.jar MyBustier.jar
Make sure you add the Class-Path to the MANIFEST-MF in the .war.
And the enterprise setup should be as follows:
EAR
|- META-INF
| |-application.xml
| |-MANIFEST.MF
|
|-Spring.jar
|-Hibernate3.jar
|-MyBustier.jar
|-WebApp.war
|-META-INF
| |-MANIFEST.MF
|
|-WEB-INF
|-web.xml
|-classes
Brian
| |
| Brian S Paskin 2007-07-25, 1:23 am |
| WOW! The diagram did not come out, so do not follow it. The editor took at all the spaces!!!
Brian
| |
| Paul Ilechko 2007-07-25, 1:23 am |
| Brian S Paskin wrote:
> WOW! The diagram did not come out, so do not follow it. The editor took at all the spaces!!!
? It looks fine to me ... at least in my NNTP client
| |
|
| Thanks everybody for your help. Ken, how did you generate your MANIFEST.MF file? I'm generating mine with Ant but I think there is a problem in the line lenghts or something like that.
Thanks,
Bob
| |
|
| Brian,
I'm not sure what you mean by:
"Make sure you add the Class-Path to the MANIFEST-MF in the .war."
Can you give me an example?
Thanks,
Shibani
| |
| Brian S Paskin 2007-07-25, 7:22 pm |
| Hi, My previous example is for the MANIFEST.MF that belongs in the .war.
Brian
| |
| Ken Hygh 2007-07-26, 1:20 am |
| ibobbyc@hotmail.com wrote:
> Thanks everybody for your help. Ken, how did you generate your MANIFEST.MF file? I'm generating mine with Ant but I think there is a problem in the line lenghts or something like that.
>
> Thanks,
> Bob
Bob,
It was generated by Rational Application Developer as I added projects
to the Enterprise application.
But Brian has pointed out an important point, it probably needs to be in
the MANIFIEST.MF of the WAR as well as the EAR
Ken
| |
|
| Thanks very much Brian. That worked.
I am also putting log4j.xml and Spring's ApplicationContext.xml in the root of the EAR. I also have an ApplicationContext.xml in the WAR that "points" to the ApplicationContext.xml in the EAR. The application.xml in the WAR looks like this:
<beans>
<import resource="classpath:applicationContext.xml"/>
</beans>
Would you happen to know how to 'add' those config xml files in the root of the EAR to the classpath?
Thanks again,
Shibani
|
|
|
|
|