users@glassfish.java.net

Re: Deploying from Ant when the .war may already be deployed

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Dec 2008 21:20:23 PST

The command prompt works to redeploy an application.

When I run this Ant target

        <target name="deploy.to.glassfish" >
                <java jar="${admin.cli.jar}" fork="true" spawn="true">
                        <arg line="deploy ${dist.dir.glassfish}/${war.file.name} --force=true"/>
                </java>
        </target>

I get the following Exception in the server.log:

[#|2008-12-29T22:12:22.502-0700|SEVERE|glassfish|javax.enterprise.system.core|_ThreadID=15;_ThreadName=Thread-3;|Error during deployment : Application credit.service already registered, please use deploy --force=true to redeploy
java.lang.Exception: Application credit.service already registered, please use deploy --force=true to redeploy
        at org.glassfish.deployment.admin.DeployCommand.handleRedeploy(DeployCommand.java:398)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:222)
        at com.sun.enterprise.v3.admin.CommandRunner$2.execute(CommandRunner.java:297)
        at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:312)
        at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:119)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:259)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:176)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:147)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
        at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
        at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
        at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
        at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
        at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
|#]
[Message sent by forum member 'dwschulze' (dwschulze)]

http://forums.java.net/jive/thread.jspa?messageID=323570