Skip to main content

ECLIPSE/Glassfish plugin: Unable to find the archive to be deployed in specified location

3 replies [Last post]
EnderWiggin30
Offline
Joined: 2011-07-13
Points: 0

I have an application created in myeclipse and maintained. I have imported in Eclipse and removed the myeclipse builders and managed to get it build properly. However when I try to deploy it I get an error "CLI171 Command deploydir failed : Unable to find the archive to be deployed in specified location". I am trying to understand what's going on but I donot have any clues. Is there a way for me to turn on debug or additional log so that I can see what glassfish plugin is failing on ?

I am guessing it is related to some setting somewhere but where ? If I see how the plugin is being invoked, I can fix the problem. Any tips ? I am using Eclipse 3.6.2 and 3.7 "same error in both" with glassfish 2.1 b60. This is a web app with JSF 1.2. Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
edrandall
Offline
Joined: 2006-03-01
Points: 0

I too have a similar problem. I am using the same versions of Eclipse as you. I think it is a problem with my project not the tools as we have used the glassfish server plugin to deploy from eclipse on these versions with other projects.

Eclipse is not helpful because, each time I publish, it re-writes a new copy of the Ant script it uses for publishing.

This is extracted to {workspace.dir}/.metadata\.plugins\org.eclipse.jst.server.generic.core\serverdef\sunappsrv-ant.xml

I need to see what parameters are used in the actual command that is executed:

       <exec executable="${asadmin}" failonerror="${failonerror}">
            <arg line=" deploydir "/>
            <arg line=" --port ${sunappserver.adminserverportnumber}" />
            <arg line=" --user ${sunappserver.adminname}" />
            <arg line=" --passwordfile passw" />

            <arg line=" --name ${module.name}"/>
            <arg line=" --force=true "/>

            <arg line="'${project.working.dir}/${module.name}'" />
        </exec>

Ant has a "-verbose" argument but there seems to be no -D property I can set to cause this to happen.

So I will instead edit the ${asadmin} script and make it tell me what command is being run.

asadmin = ${sunappserver.rootdirectory}/bin/asadmin${sunappserver-script-suffix}

I edited Glassfish/bin/asadmin.bat and echo the command on the last line just before it is executed, now when I publish I can see:

deploydir:
[exec] "D:\apps\j2sdkee-5_08\jdk\bin\java" -Dcom.sun.aas.instanceName=server -Djava.library.path="D:\apps\j2sdkee-5_08\bin";"D:\apps\j2sdkee-5_08\bin" -Dcom.sun.aas.configRoot="D:\apps\j2sdkee-5_08\config" -Djava.endorsed.dirs="D:\apps\j2sdkee-5_08\lib\endorsed" -Dcom.sun.aas.processLauncher="SE" -cp "D:\apps\j2sdkee-5_08\javadb\lib\derby.jar";"D:\apps\j2sdkee-5_08\jbi\lib\jbi-admin-cli.jar";"D:\apps\j2sdkee-5_08\jbi\lib\jbi-admin-common.jar";"D:\apps\j2sdkee-5_08\lib\comms-appserv-rt.jar";"D:\apps\j2sdkee-5_08\lib\comms-appserv-api.jar";"D:\apps\j2sdkee-5_08\lib\appserv-rt.jar";"D:\apps\j2sdkee-5_08\lib\appserv-ext.jar";"D:\apps\j2sdkee-5_08\lib\javaee.jar";"D:\apps\j2sdkee-5_08\lib\appserv-se.jar";"D:\apps\j2sdkee-5_08\lib\comms-appserv-admin-cli.jar";"D:\apps\j2sdkee-5_08\lib\admin-cli.jar";"D:\apps\j2sdkee-5_08\lib\appserv-admin.jar";"D:\apps\j2sdkee-5_08\lib\commons-launcher.jar";"D:\apps\j2sdkee-5_08\lib\install\applications\jmsra\imqjmsra.jar" -Dcom.sun.appserv.admin.pluggable.features=com.sun.enterprise.ee.admin.pluggable.EEClientPluggableFeatureImpl com.sun.enterprise.cli.framework.CLIMain deploydir --port 4848 --user admin --passwordfile passw --name My-app-name --force=true E:/wss/DEV/eclipse-workspace-tools/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/My-app-name

Not pretty! But at least now I can find the prepared .war file and maybe find out what's wrong and manually fix and re-run the asadmin command until perhaps it will work!

edrandall
Offline
Joined: 2006-03-01
Points: 0

In my case the problem turned out to be that the name in <wb-module deploy-name="name"> (in the file .settings/org.eclipse.wst.common.component) did not match the Eclipse project name (in the file .project).

It seems that the WST packaging creates a .war file using the project name and the Glassfish plugin tries to deploy using the deploy-name.

EnderWiggin30
Offline
Joined: 2011-07-13
Points: 0

Yep, I figured out the first part which was the same problem but I never thought that the asadmin is being used by glassfish plugin :) Smart...