While re-deploying a 10g Oracle ESB project we ran into this issue
[script] <deploymentSummary>
[script] <message>Entity Deployment Failed</message>
[script] <errors>
[script] <error code="1072" severity="5">
[script] <description>A Service or ServiceGroup of name "SalesQuoteEBS" already exists under parent "SalesQuote".</description>
[script] <fix>Retry after providing different name or choosing another parent. If error is not fixable, contact Oracle Support.</fix>
[script] </error>
[script] </errors>
[script] </deploymentSummary>
From the ESB DT logs at
$ORACLE_HOME/j2ee/OC4J_ESBDT/log/OC4J_ESBDT_ESBDT_GROUP_1/oc4j/log.xml we saw
<SUPPL_DETAIL><![CDATA[oracle.tip.esb.console.exception.ConsoleException: A Service or ServiceGroup of
name "SalesQuoteEBS" already exists under parent "SalesQuote".
Retry after providing different name or choosing another parent. If error is not fixable, contact Oracle Support.
at oracle.tip.esb.console.util.ServiceUtil.checkServiceExists(ServiceUtil.java:1475)
at oracle.tip.esb.console.XMLConsoleManagerImpl.createServiceEntity(XMLConsoleManagerImpl.java:1271)
at oracle.tip.esb.console.XMLConsoleManagerImpl.createServiceFromElement(XMLConsoleManagerImpl.java:667)
at oracle.tip.esb.configuration.deployment.JDevDeploymentManager.createEntity(JDevDeploymentManager.java:716)
at oracle.tip.esb.configuration.deployment.JDevDeploymentManager.createServices(JDevDeploymentManager.java:700)
at oracle.tip.esb.configuration.deployment.JDevDeploymentManager.deploy(JDevDeploymentManager.java:191)
at oracle.tip.esb.configuration.deployment.DeploymentServlet.doPost(DeploymentServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:400)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:414)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
]]></SUPPL_DETAIL>
Digging deeper we saw that it was an issue with the Deployer class. It was trying
to create a service and caught EntityAlreadyExistException and tried to update the
service. In this case the service with the guid does not exist while there is a
service with the same name under the same parent but with a different guid.
Workaround
This is a bug and till it gets fixed, the easiest way to avoid running into this
error is to ensure the service has the same guid in all environments.
This way the deployer catches EntityAlreadyExistException and does an update
for re-deployment usecases.