Classloading issue - Manifest file
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Application Server > Classloading issue - Manifest file




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Classloading issue - Manifest file  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:23 AM

We have a JSF,Spring/Hibernate application running on TomCat that I am tryin
g 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, e
tc.

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 Manife
st file that looks something like this: Class-Path: Spring.jar Hibernate3.ja
r MyBustier.jar - etc. The problem is that Websphere is not loading these cl
asses. 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






[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  
Ken Hygh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:23 AM

ibobbyc@hotmail.com wrote:
> We have a JSF,Spring/Hibernate application running on TomCat that I am try
ing to port to WebSphere 6.1. I have created an EAR via an Ant script. The E
AR 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 li
ke faces-config and ApplicationContext.xml, among others.
>
> I'm using the Ant's Manifest tag inside the ear task. This produces a Manifest fil
e that looks something like this: Class-Path: Spring.jar Hibernate3.jar MyBustier.ja
r - etc. The problem is that Websphere is not loading these classes. Does anyone hav
e 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





[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  
Brian S Paskin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:23 AM

Hi, you can use the Application Server Toolkit to assemble the enterprise ar
chive, 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





[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  
Brian S Paskin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:23 AM

WOW!  The diagram did not come out, so do not follow it.  The editor took at
 all the spaces!!!

Brian





[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  
Paul Ilechko


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:23 AM

Brian S Paskin wrote:
> WOW!  The diagram did not come out, so do not follow it.  The editor took at all t
he spaces!!!

? It looks fine to me ... at least in my NNTP client





[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:23 PM

Thanks everybody for your help. Ken, how did you generate your MANIFEST.MF f
ile? I'm generating mine with Ant but I think there is a problem in the line
 lenghts or something like that.

Thanks,
Bob





[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 12:22 AM

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






[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  
Brian S Paskin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 12:22 AM

Hi, My previous example is for the MANIFEST.MF that belongs in the .war.

Brian





[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  
Ken Hygh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 06: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 li
ne 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






[ Post a follow-up to this message ]



    Re: Classloading issue - Manifest file  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 06:22 PM

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" t
o the ApplicationContext.xml in the EAR. The application.xml in the WAR look
s 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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:20 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register