This discussion is archived
1 Reply Latest reply: May 22, 2012 12:22 PM by Timo Hahn RSS

Restart OC4J as part of Auto deploy

928350 Newbie
Currently Being Moderated
I was trying to implement AutoDeploy of EAR file on daily basis, the plan is to use ANT script to generate the EAR file, Deploy the EAR file and restart the OC4J to reflect the new EAR file. I was trying to use ANT task shutdownServer and restartServer to achieve the OC4J restart.
Shutdown task works fine.

<target name="shutdwn">
<oracle:shutdownServer
deployerUri="${deployer.uri}"
userid="${oc4j.admin.user}"
password="${oc4j.admin.password}"/>
</target>

However I get error after running the restart ANT task. The error message was: BUILD FAILED
C:\Work\svn\ESupport\trunk\Deployment\build.xml:344:
Failed at "Could not get DeploymentManager".

This is typically the result of an invalid deployer URI format being supplied, the target server not being in a started state or incorrect authentication details being supplied.

More information is available by enabling logging -- please see the Oracle Containers for J2EE Configuration and Administration Guide for details.


Total time: 0 seconds
<target name="restart">
<oracle:restartServer
deployerUri="${deployer.uri}"
userid="${oc4j.admin.user}"
password="${oc4j.admin.password}"
deploymentName="${app.name}"/>
</target>

======
I have also tried to use start and stop ANT tasks, I get the same error message:

BUILD FAILED
C:\Work\svn\ESupport\trunk\Deployment\build.xml:344:
Failed at "Could not get DeploymentManager".

This is typically the result of an invalid deployer URI format being supplied, the target server not being in a started state or incorrect authentication details being supplied.

More information is available by enabling logging -- please see the Oracle Containers for J2EE Configuration and Administration Guide for details.


Total time: 0 seconds

<target name="start">
<oracle:start
deployerUri="${deployer.uri}"
userid="${oc4j.admin.user}"
password="${oc4j.admin.password}"
deploymentName="${app.name}"/>
</target>
<target name="stop">
<oracle:stop
deployerUri="${deployer.uri}"
userid="${oc4j.admin.user}"
password="${oc4j.admin.password}"
deploymentName="${app.name}"/>
</target>

===
Any help appreciated on this. I use Oracle 10g Jdeveloper 10.1.3.5

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points