my dog learned polymorphism*
The moose likes Websphere and the fly likes EAR not getting deployed with RAD 7.0 and Websphere 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "EAR not getting deployed with RAD 7.0 and Websphere 6.1" Watch "EAR not getting deployed with RAD 7.0 and Websphere 6.1" New topic
Author

EAR not getting deployed with RAD 7.0 and Websphere 6.1

Shyam V Krishnan
Greenhorn

Joined: Feb 14, 2008
Posts: 6
Hi,

I'm running a Web application using RAD 7.0 and Websphere 6.1. I built the application, started the server and used 'Run on Server' option to publish my EAR to the server. It says 'Publishing successful' and I can see my EAR listed in Server->Admin Console->Istalled Applications. But when I run the application, I'm getting class not found exception for my servlets and other java classes in the EAR.
When I checked the metadata folder in my workspace(\.metadata\.plugins\org.eclipse.wst.server.core\publish), I can see the files in EAR listed in the file publish0.xml, but there is a tmp0 folder(\.metadata\.plugins\org.eclipse.wst.server.core\tmp0) which doesn't have anything. I think my EAR file should be present in this folder and because of this, the server is not recognizing the class files.

Could somebody please tell me whether there I need to do any additional configuration. Any help would be highly appreciated.

Thanks,
Shyam
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

The classes that are not being found, are they packaged in externally reference jar files, or are they in a project other than your web app.

My guess is you have two projects, maybe a Java project and a web project. At design time, you can see the Java class files in the IRAD Java project due to project build settings, but at compile time, the files are not being distributed with the ear file you are building, and as a result, you get classnotfoundexceptions all the time.

Export JUST THE EAR from RSA/IRAD and find the call files in question. Open up the jar files packaged in the EAR/WAR/JAR files and physically find the class in question. I bet it's not there. And if it is there, tell us where it is.

WinZip or any zip utility can be used to quickly open up an EAR file exported from Rational Application Developer.

-Cameron McKenzie
Shyam V Krishnan
Greenhorn

Joined: Feb 14, 2008
Posts: 6
Thanks for your response.
All the classes which cannot be found by server are packaged in the same war file. I just have a single web project containing JSPs, Javascripts, Servlets and other java classes.

As you suggested, I exported the EAR file from RAD and checked this. I can find all the classes in the EAR file. I feel, the EAR is not getting copied to the server even if it says Publishing successful.

Thanks again.
Shyam
Jin
Greenhorn

Joined: Feb 13, 2002
Posts: 3
Hi, Shyam V Krishnan

I have similar problem as you. But I am using the rad 6.012. Do you know where I can find the deployed application in workspace. Even I can see the deployed project through wsadmin, but I can not run the jsp page on the server. Do you have any idea?

thanks
Jin Zhang


susan zhang
Rasath Umar
Greenhorn

Joined: Oct 06, 2008
Posts: 8
Hi try this: Go to Windows menu, select Preferences. Select server then click Websphere. There you can find the profile and the exact path where your profile is located.
Giriraj Bhojak
Ranch Hand

Joined: Apr 03, 2008
Posts: 71
I have a similar kind of problem.
I have deployed my ear application through RAD7 on WAS 6.1.
When I go to \.metadata\.plugins\org.eclipse.wst.server.core\tmp0\ directory I can see a directory myEar.ear containing all the jars and my web/ejb projects.Yet i get ClassNotFoundError for many classes that are still in myEar.ear.
Hence I end up adding the jar/folder containing those classes in ws.ext.dirs variable in server.xml so that server can locate it somehow.
I am clueless as to why this happens. Has anyone run into similar kind of problem?
I have tried looking to find an answer to this, but so far my efforts have gone futile.
Scott Bown
Ranch Hand

Joined: Sep 06, 2007
Posts: 32
I too had this issue, since upgrading from RAD 7.004 to RAD 7.005.

Steps:
-I exported the ear file in RAD,
-Checked the ear file and it contained the correct classes etc,
-Deployed it to WAS 6.1 and it deployed ok,

but when you open the homepage [or any page of the app] get class not found, and on checked the expanded ear folder in the tmp dir the class files are missing.

I logged a PRM with IBM and they said it was fixed in RAD 7.007, I've recently upgraded to RAD 7.5, and due test and confirm it's fixed.


Android + J2EE Developer
SCJP 5.0, SCWCD 1.4, SCDJWS 5
Shyam V Krishnan
Greenhorn

Joined: Feb 14, 2008
Posts: 6
The deployed EAR will be in the folder.
Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Check the timestamp here. If this is not changed, your EAR has not been deployed correctly.

My problem was solved when I reinstalled RAD. The RAD version was 7.0.0

Thanks,
Shyam
manish jha
Greenhorn

Joined: Dec 09, 2006
Posts: 7
Delete the .metadata file. Then open the RAD and import all the project.
It solved my problem.Best of luck for you.


Manish<br />SCJP 1.4<br />SCWCD<br />WebSphere Portal Developer
Giriraj Bhojak
Ranch Hand

Joined: Apr 03, 2008
Posts: 71
Originally posted by Scott Bown:
I too had this issue, since upgrading from RAD 7.004 to RAD 7.005.

Steps:
-I exported the ear file in RAD,
-Checked the ear file and it contained the correct classes etc,
-Deployed it to WAS 6.1 and it deployed ok,

but when you open the homepage [or any page of the app] get class not found, and on checked the expanded ear folder in the tmp dir the class files are missing.

I logged a PRM with IBM and they said it was fixed in RAD 7.007, I've recently upgraded to RAD 7.5, and due test and confirm it's fixed.


Hi Scott,
Do you mean to say that the problem I have posted above is resolved in RAD 7.0.0.7?
Or is it specifically related to "Export EAR" as you mentioned stepwise above?

Regards,
Giriraj.
[ November 04, 2008: Message edited by: Giriraj Bhojak ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EAR not getting deployed with RAD 7.0 and Websphere 6.1
 
Similar Threads
Why getRealPath("/") is not working in RAD 7?
Auto Publishing
Basis for populating tmp0 directory in RAD
Getting realpath in webspehere
xslt transformation not working in WAS6.1 server start mode