Solved

How to package an EAR file for a struts, ejb, and utility module for WebSpher 6.1 using RAD 7.5.1?

Posted on 2009-05-03
5
728 Views
Last Modified: 2013-12-11
Hi,
I have an application that uses struts 1.3.8 with the web module.
It also uses an ejb  module and an utility module for the ejb module.

Now when I run this application on the local test server for webspher 6.1 it runs fine.

But when I export it as an EAR module, then try to deploy it on local server, it does not run properly.
The server complaints which looks like ... the app can't find the classes for the utility module.
 
I can't seem to find out why this is the case.
Can someone shed me some light as to how to package this EAR properly so that the ejb module can find the dependent utility module so that it can be exported and then run properly?

Thanks much,
_Esam
0
Comment
Question by:_Esam
  • 3
  • 2
5 Comments
 
LVL 41

Expert Comment

by:HonorGod
ID: 24294130
So you are trying to have a stand-alone application that allows you to connect to some EJB's on your WebSphere Application Server?

If this is the case, you need the Application Client

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/ccli_appclients.html
0
 

Author Comment

by:_Esam
ID: 24294767
So you are trying to have a stand-alone application that allows you to connect to some EJB's on your WebSphere Application Server?
NO.
I did say that I am trying to export the ear file (Enterprise Application) which has a web module that uses struts, it also has an ejb module (this ejb module is within the enterprise application and it uses some java utility classes) ....

Looks like when it is exported, it can't find these utility classes which the ejb needs...
It runs run when I run from within RAD but when I export the ear and then deploy and run it .. it can't find those utility classes...

I believe I am clear...
Let me know.

Thanks.
_Esam
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24294831
ok. sorry for the confusion.

When you export the EAR, does the export succeed?
0
 

Accepted Solution

by:
_Esam earned 0 total points
ID: 24295386
I figured out the problem.
As I noted earlier, when I run the app from within RAD on the local test server, it runs fine.
But when I export the ear (the export succeeds), and then deploy it on local server, it seems like it can't find the utility classes needed by the ejb module...
So, I made some changed on how the WebSphere loads the classes...
For my app, I changed "Class Loading and update detection"
For class loader order > Classes loaded with application class loader first
For WAR class loader policy > Single class loader for application

Once I made these changes, the app was able to find the classes, and the app runs fine now...

_Esam.
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24296032
Excellent!  Thank you so very much for sharing your solution.

Good luck & have a great day.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 160
Core Java. What output will be and why ? 6 68
hibernate example for saving data 19 57
Eclipse Help Java EE 5,6,7 Documentation, why not Java EE 8 8 30
-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question