Thursday, August 19, 2010

IBM Rad + Websphere deployment issue

I recently ran into an issue when I would deploy an ear to a WebsShere App Server (WAS) and would receive this error :


AppDeploymentException: [null] java.lang.ClassCastException: org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl


I generated the EAR using Rational Application Developer (RAD) by simply selecting File > Export and selecting EAR under Java EE.

When I deployed the ear to my local test WAS, it deployed fine, but I received the error when it was deployed to a non test server. It turned out that the ear did not have the deployment descriptor in it and while it was fine for the test server, it is required for the actual server.

To resolve the problem you select the context menu of the ear by right clicking the project and selecting Java EE > Generate WebSphere Bindings Deployment Descriptor. It creates the application XML in the project and everything should deploy correctly.

No comments:

Post a Comment