Sunday, November 27, 2011

Deployment issue with Oracle SOA 11g


I found this issue recently when I deployed one SOA application to my local server.   It doesn’t seem to happen all the time but when it happens it causes the deployment error:  Unable to register service.   I don’t know the reason for this problem but I find one way to avoid this problem.
The below example shows when the problem will appear and how the problem can be fixed.   We have one BPEL application which will be exposed as the service: OrderService which is defined in OrderService.wsdl.   This WSDL is not abstract WSDL since it includes the binding and service part.
After creating the service using JDeveloper, JDevloper will create composite.xml and OrderServiceWrapper.wsdl. 
Composite.xml is like the below.   It just shows some key parts for the brevity.  Please note that there are two import statements: one for original OrderService.wsdl and another for OrderServiceWrapper.wsdl.

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by Oracle SOA Modeler version 1.0 at [23/11/11 12:45 PM]. -->
<composite name="CreateOrderService" …>
  <import namespace="http://www.toic.com/esb/wsdl/orderservice"
          location="wsdl/OrderService.wsdl" importType="wsdl"/>
  <import namespace="http://www.toic.com/esb/wsdl/orderservice"
          location="OrderServiceWrapper.wsdl" importType="wsdl"/>
  <service name="CreateOrderService" ui:wsdlLocation="wsdl/OrderService.wsdl">
    <interface.wsdl interface="http://www.toic.com/esb/wsdl/orderservice#wsdl.interface(OrderServicePortType)"/>
    <binding.ws port="http://www.toic.com/esb/wsdl/orderservice#wsdl.endpoint(CreateOrderService/OrderServicePort)">
      <property name="weblogic.wsee.wsat.transaction.flowOption"
                type="xs:string" many="false">NEVER</property>
    </binding.ws>
  </service>
……
</composite>

When it is deployed one deployment error will occur as the following:

[01:16:20 PM] ----  Deployment started.  ----
[01:16:20 PM] Target platform is  (Weblogic 10.3).
[01:16:20 PM] Running dependency analysis...
[01:16:20 PM] Building...
[01:16:23 PM] Deploying profile...
[01:16:23 PM] Updating revision id for the SOA Project 'CreateOrderService.jpr' to '1.0'..
[01:16:23 PM] Wrote Archive Module to D:\JDeveloper\mywork\SOADemo\CreateOrderService\deploy\sca_CreateOrderService_rev1.0.jar
[01:16:23 PM] Deploying sca_CreateOrderService_rev1.0.jar to partition "default" on server AdminServer [http://A00000113011750.wg.dir.telstra.com:7001]
[01:16:23 PM] Processing sar=/D:/JDeveloper/mywork/SOADemo/CreateOrderService/deploy/sca_CreateOrderService_rev1.0.jar
[01:16:23 PM] Adding sar file - D:\JDeveloper\mywork\SOADemo\CreateOrderService\deploy\sca_CreateOrderService_rev1.0.jar
[01:16:23 PM] Preparing to send HTTP request for deployment
[01:16:23 PM] Creating HTTP connection to host:A00000113011750.wg.dir.telstra.com, port:7001
[01:16:23 PM] Sending internal deployment descriptor
[01:16:23 PM] Sending archive - sca_CreateOrderService_rev1.0.jar
[01:16:24 PM] Received HTTP response from the server, response code=500
[01:16:24 PM] Error deploying archive sca_CreateOrderService_rev1.0.jar to partition "default" on server AdminServer [http://A00000113011750.wg.dir.telstra.com:7001]
[01:16:24 PM] HTTP error code returned [500]
[01:16:24 PM] Error message from server:
There was an error deploying the composite on AdminServer: Update Failed: Unable to register service..
 [01:16:24 PM] Check server log for more details.
[01:16:24 PM] Error deploying archive sca_CreateOrderService_rev1.0.jar to partition "default" on server AdminServer [http://A00000113011750.wg.dir.telstra.com:7001]
[01:16:24 PM] ####  Deployment incomplete.  ####
[01:16:24 PM] Error deploying archive file:/D:/JDeveloper/mywork/SOADemo/CreateOrderService/deploy/sca_CreateOrderService_rev1.0.jar
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

One way to fix this problem is to remove one import statement from composite.xml.  The import statement that imports the original WSDL will be deleted.   The new composite.xml will be shown as the below:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by Oracle SOA Modeler version 1.0 at [23/11/11 12:45 PM]. -->
<composite name="CreateOrderService" …>
  <!--import namespace="http://www.toic.com/esb/wsdl/orderservice"
          location="wsdl/OrderService.wsdl" importType="wsdl"/-->
  <import namespace="http://www.toic.com/esb/wsdl/orderservice"
          location="OrderServiceWrapper.wsdl" importType="wsdl"/>
  <service name="CreateOrderService" ui:wsdlLocation="wsdl/OrderService.wsdl">
    <interface.wsdl interface="http://www.toic.com/esb/wsdl/orderservice#wsdl.interface(OrderServicePortType)"/>
    <binding.ws port="http://www.toic.com/esb/wsdl/orderservice#wsdl.endpoint(CreateOrderService/OrderServicePort)">
      <property name="weblogic.wsee.wsat.transaction.flowOption"
                type="xs:string" many="false">NEVER</property>
    </binding.ws>
  </service>
……
</composite>

6 comments:

  1. i´ve been struggling with this issue for a long time... i don´t know the cause for it either, but there is no much information in the logs, because it doesn´t tell you which service is unable to register...
    With this workaround it deployed correctly, thanks

    ReplyDelete
    Replies
    1. This article is interesting, hopefully useful for all of us, and don't forget to visit our website: Ludo Game Development Company

      Delete
    2. I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon… Visit: Dhamaal Games

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. While deploying my application in j developer i got the following issue please solve it.



    [06:12:47 PM] #### Deployment incomplete. ####
    [06:12:47 PM] Error deploying archive file:/C:/JDeveloper/mywork/Testing/synchronouswebservice/deploy/sca_synchronouswebservice_rev2.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

    ReplyDelete
  4. Well written blog ! Excellent information provided by your article! Thanks for sharing. I really like the title of your blog. It's really catchy. This post is very informative and knowledgeable, I like the helpful information you provide in your articles. Keep it up

    Dating App Development Company

    ReplyDelete