Deployment Experiences

During my daily “J2EE 1.4 Tutorial” I came across an error after deploying the same web module twice. I discovered that the problem as to do with deploying the same web module in packed way (war file) and after that, deploying it again, but this time in an unpacked way (supposedly through the web module directory structure).

Here is what I did:

I used two directories: directory a) containing the packed web module in a war file and directory b) containing the web module directory structure.

  1. I deployed the packaged web module using the Server Admin Console and entering the full path to the war file, contained in directory a). Everything went fine and I could run the application in the browser.
  2. I deployed the web module again using the unpacked version via the asadmin deploydir command line tool. I used the full path of directory a).

This command did not execute successfully and I got the error “Deploying application in domain failed; Unknown deployable object type specified: Cannot determine the J2EE component type”.

I realized that one of the things that I did wrong was specifying the wrong directory path in the asadmin deploydir command. I should specify directory b), the one containing the web module directory structure, but instead I specified directory a). For some reason the server gets messed up and I could not undeploy the application nor I could access the Web Applications in the Server Admin Console, The latest would give the error “Unable to get View for ViewDescriptor ‘webApplications'”.

To solve this problem I had to:

  1. Manually remove the entry for this web module in the ${AppServer.HOME}\domains\domain1\config\domain.xml file. The line to remove is always similar to:

      <web-module availability-enabled=”false” context-root=”/Hello1″ directory-deployed=”true” enabled=”true” location=”${com.sun.aas.installRoot} /lib/install/applications/com_sun_web_ui” name=”Hello1″ object-type=”user” />

  2. Restart the server and happily I was back in the playing field!

I retried the same steps but using the correct directory paths and everything went fine. Although I am not completely sure about the cause of this problem I think the error is caused by an uncompleted deployment of the unpacked web module since it cannot find the correct directory structure. It’s just a pity that it breaks down the previous deployment.

Read more »

One thought on “Deployment Experiences

  1. By the way, after getting the error I repeated step 2 using directory b) but I got the following message: "Command deploy failed : Application hello1 is already deployed on other targets. Please use create-application-ref command to create reference to the specified target; requested operation cannot be completed". So, redeploying the application again, using the correct directory path, did not help.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s