- This topic has 14 replies, 3 voices, and was last updated 17 years, 9 months ago by Riyad Kalla.
-
AuthorPosts
-
pcableMemberWe are trying to setup MyEclipse to run both a JBoss 4 and WebSphere 5 server. We are doing this so that new development can go to jBoss servers to ultimatly remove WebSphere from our environments.
I have the HelloWorld Web Project deploying correctly with JBoss 4. However, I am still having some problems with WebSphere 5. I have WebSphere 5 starting and stopping through MyEclipse. I have changed it to log to the MyEclipse console and I am able to open up the WebSphere admin console once MyEclipse has started the server.
However, I have a couple of questions:
One, when starting up the WebSphere 5 server in MyEclipse the console scrolls so much (from loading the WebSphere libraries – at least that is what I am assuming) that I can’t scroll to the very beginning? Is that a problem or are the errors going to appear at the end anyway so don’t worry about it?
Two, I am using the MyEclipse – Project deployments tools and deploying the HelloWorld Web Project to the server. It says it deploys correctly. However, once the server starts up it has not been deployed. Could you point out the step that I am probably leaving out in this scenario or am I going to have to create an EAR Project for this Hello World app before I can test through WebSphere5?
Any assistance would be greatly appreciated.
pcable
Riyad KallaMemberOne, when starting up the WebSphere 5 server in MyEclipse the console scrolls so much (from loading the WebSphere libraries – at least that is what I am assuming) that I can’t scroll to the very beginning? Is that a problem or are the errors going to appear at the end anyway so don’t worry about it?
If you go to Window > Prefs > Run/Debug > Console, you can bump the line limit up quite a bit if you would like to see more of the messages. Also as far as when the errors occur, it can occur during any point of startup and sometimes the logging messages can get quite long.
Two, I am using the MyEclipse – Project deployments tools and deploying the HelloWorld Web Project to the server. It says it deploys correctly. However, once the server starts up it has not been deployed. Could you point out the step that I am probably leaving out in this scenario or am I going to have to create an EAR Project for this Hello World app before I can test through WebSphere5?
Sorry for the confusion. THe reason for this is that there are two steps when deploying to WebSphere. After deploying it you have to login to the WebSphere Admin Console and “install” the application. Some app servers, like Tomcat, Sun App Server, Glassfish and JBoss will automatically deploy new applications when they see them so this additional step isn’t necessary with every app server.
pcableMemberThanks for the reply.
I actually was running into another problem. I was using the WAS 5 that is automatically installed as part of WSAD (located at <location_where_installed_WSAD>\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51). Anyway, I am not sure if this change was caused by the WSAD setup or not but to get the app to work in WAS5 through MyEclipse I had to make the following change:
Go to <location_where_installed_WSAD>\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\config\cells\localhost
and oen up the cell.xml file in a text editor. Then change the topology line as follows: (feel free to comment out the old line if you so desire)
• Original line:
<topology.cell:Cell xmi:id=”Cell_1″ name=”localhost” cellDiscoveryProtocol=”TCP” cellType=”STANDALONE”>
• New line:
<topology.cell:Cell xmi:id=”Cell_1″ name=”$(cell.name)” cellDiscoveryProtocol=”TCP” cellType=”STANDALONE”>My WebSphere5 server setup in MyEclipse looked like this:
Enabled – checked
WebSphere Home Directory: C:\Tools\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
Host Name: localhost
Server name: server1
Output Encoding: console
JDK – C:\Tools\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\javaAnyway, everything is working great. Thanks again for all of your help.
pcable
Riyad KallaMemberpcable,
Thank you for following up for folks in a similar situation.
pcableMemberActually I am still having some problems. I ended up rolling back the ${cell.name} to localhost because all of a sudden the admin console was having some issues (that it didn’t have yesterday).
However, I am having some issues. I have a project that was setup for WSAD.
The Web project I can convert to a MyEclipse Web Project using the MyEclipse –> Add Web Project Capabilities…. I can then export a WAR file from File –> Export and could successfully deploy it to WebSphere 5 server in MyEclipse. It has not yet successfully run, but I am working on it.
However, the Ear project I am having massive problems converting. It appears like just a simple project when I first pull it from CVS. I have tried just recreating it from scratch but I can not seem to get it to deploy a good EAR. When I do File –> Export it makes an EAR but then when I try to deploy the EAR to the WebSphere 5 server in MyEclipse it says it is an invalid ear file.
The following messages appear in the WebSphere admin console:
The EAR file could be corrupt and/or incomplete.
AppDeploymentException: [] com.ibm.etools.archive.exception.OpenFailureException: IWAE0006E Archive is not a valid EAR File because the deployment descriptor can not be found (case sensitive): META-INF/application.xmlAnd I get the following errors in the MyEclipse console:
[Loaded com.ibm.websphere.management.application.EarUtils]
[2/1/07 16:11:04:411 CST] e5cb44c SystemErr R AppDeploymentException: []
com.ibm.etools.archive.exception.OpenFailureException: IWAE0006E Archive is not a valid EAR File because the deployment descriptor can not be found (case sensitive): META-INF/application.xml
[2/1/07 16:11:04:411 CST] e5cb44c SystemErr R com.ibm.etools.archive.exception.OpenFailureException: IWAE0006E Archive is not a valid EAR File because the deployment descriptor can not be found (case sensitive): META-INF/application.xml
[2/1/07 16:11:04:411 CST] e5cb44c SystemErr R at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openSpecificArchive(CommonarchiveFactoryImpl.java:675)
[2/1/07 16:11:04:411 CST] e5cb44c SystemErr R at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:514)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.websphere.management.application.EarUtils.getEarFile(EarUtils.java:59)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.management.application.client.AppInstallHelper.getEarFile(AppInstallHelper.java:89)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.management.application.client.DefaultBindingHelper.getDefaultBindingInfo(DefaultBindingHelper.java:92)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.management.application.client.DefaultBindingHelper.getDefaultBindingInfo(DefaultBindingHelper.java:85)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.console.appmanagement.action.UploadAction.formUpload(UploadAction.java:207)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.console.appmanagement.action.UploadAction.perform(UploadAction.java:110)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1791)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
[2/1/07 16:11:04:427 CST] e5cb44c SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)Do you have any ideas?
pcable
Riyad KallaMemberpcable,
I believe this problem stems from how the different products think of certain projects. In MyEclipse your Enterprise Application Project (deploys as an EAR) is a meta-project. It’s an umbrella project that is used to organize a larger deployment by adding modules to it (web, ejb and java projects). So the actual code lives in all the modules and the EAR project becomes more or less of a deployment description (meta-project) that MyEclipse deploys and knows how to build out by combining and packaging all the modules.Did that help or make things worse?
pcableMemberOkay, so do you have any idea how to fix the problem?
Riyad KallaMemberWell I don’t know if it’s a problem persay, or you just need to model your project correctly, that’s why I tried to explain how to do that in MyEclipse so you could clarify where there was a problem or move forward with modelling your project more effectively.
pcableMemberCould you tell me how you might go about modeling the project correctly?
I went through MyEclipseIDE to create the EAR project and then I just added in the extra information, so how would that not be modeling the project correctly.
I guess I am just not following you, could you try describing it another way?
Riyad KallaMemberHmm lemme back up for a second.
If you scroll back to your post from Feb 1 @ 3pm, you metioned having 1 project pulled from CVS and having a heck of a time converting it to an EAR iN myEclipse so you could deploy it. That’s what I (thought) I was hlpeing you with by explaining how the project will need to be broken out into a set of projects and that’s why I explained how EARs are laid out in MyEclipse.
Maybe I just missed something, but have you already broken this single project into multiple projects that represent the modules of an EAR and then set them up in MyEclipse?
pcableMemberSorry for the confusion. I have two project that I initially pull from CVS.
1 – Is a Java Project that I can successfully convert to a Web Project using the MyEclipse –> Add Web Project Capabilities…
I can even export a war and get it to successfully deploy to WebSphere5.2 – Is a Simple Project and I know no way to convert it to an EAR project so I remove the project from MyEclipse but I don’t delete the file. Then I manually create a New Project –> Enterprise Application Project selecting to only define web project module and then I can select the project from above (1). This all works great.
Then I do a Beyond Compare on this new project versus my old project from CVS. The differences are as follows:
Old project contains a \meta-inf\.modulemaps and \meta-inf\ibm-application-bnd.xmi and finally it has a security role in the application.xml that is not in the new project and a doctype and a different <application> start tag.
New project contains \meta0inf\manifest.mf, .mymetadata, & .project.So what I was then doing was manually adding the security role to the new projects application.xml and adding the .modulemaps and .ibm-application-bnd.xmi files to the new project.
Then I try exporting the EAR and it doesn’t work.
I am new to this organization to I don’t know the history behind all of the setting. I figured I would want to add the security role and then since I am still deploying so websphere I figured it might still want the ibm-application-bnd.xmi.Anyway, I am not sure and hopefully you can follow this but this is exactly what I am doing.
Scott AndersonParticipantI think I can help out.
The differences are as follows:
Old project contains a \meta-inf\.modulemaps and \meta-inf\ibm-application-bnd.xmi and finally it has a security role in the application.xml that is not in the new project and a doctype and a different <application> start tag.
New project contains \meta0inf\manifest.mf, .mymetadata, & .project.I think the problem is that when you created the Enterprise Application Project that you used the default on the first page of the wizard which is J2EE 1.4. However, WebSphere 5 can only process J2EE 1.3 Enterprise Apps. So, please delete the EAR project and create a new one that is J2EE 1.3. This should fix the doctype and application start tag differences.
So what I was then doing was manually adding the security role to the new projects application.xml and adding the .modulemaps and .ibm-application-bnd.xmi files to the new project.
The .modulemaps file isn’t needed (that’s for WSAD’s meta-data) but the other modifications are.
Then I try exporting the EAR and it doesn’t work.
I think with a J2EE 1.3 project it will.
And, if you want to know how to generate the ibm-application-bnd.xmi file in MyEclipse, that’s done using XDoclet and is described in the EJB Quickstart.
pcableMemberWell, I first rebuilt the ear project using the 1.3 and then added in the .ibm-application-bnd.xmi file and added the security role into the application.xml file, but it didn’t deploy. Then I took a step back and rebuilt the ear project again using the 1.3 and didn’t add in the extra pieces and it DID deploy. So, I will have to read the ejb quickstart and recreate the ibm-application-bnd.xmi. I still have some things to get worked out but you have helped me get past the most trying part. I will keep you posted.
Thank you for your help!
pcable
pcableMemberWell after the j2ee 1.3 fix. I was able to figure out what the problem was from the extra pieces. The security role had a description tag that once removed solved the problems.
However, after pre-loading the ear into the WebSphere server through the admin console. I received a warning that I haven’t seen before and want to know what you recommend.
First, I opened up the “Manage Deployments” screen. Then after selecting the add button the “New Deployment” screen opened. After selecting the WebSphere5 server from the pull down, I received the below question/ warning.An existing resource has been found at location c:\Tools\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\installedApps\localhost\CorpWebEAR.ear. Deployment of project CorpWebEAR will replace this resource. Please specify the action you wish to take during deployment:
Option1 (default) – Backup remote resource before deployment; restore upon undeployment
Option2 – Delete remove resource before deployment
Option3 – Overwrite remote resources – add/replace onlyI don’t recall getting this warning before. I have probably messed something up by installing, uninstalling, and restalling so many times throughout our testing. lol
Anyway, just wondering about your recommendations for this warning.
Thanks,
pcable
Riyad KallaMemberpcable,
This warning just comes up when there is a conflict between deployed projects, you normally don’t see this because removing/adding projects avoids conflicts. If you know what you are doing you can choose option 2 or 3, but if you aren’t sure why the conflict is occuring, you can choose #1 just in case (it will backup the project in the location that it’s trying to deploy to. -
AuthorPosts