Tuesday, August 18, 2015

Element declaration/definition of name are duplicated in schema - BPEL 11g

When we have the same element in two different schema with same targetnamespace, while compiling we will get the below error.

scac:
     [scac] Validating composite "C:\JDeveloper\mywork\POC\TestTOPXSD\composite.xml"
     [scac] /C:/JDeveloper/mywork/POC/TestTOPXSD/BPELProcess1.wsdl: error: Global element declaration/definition of name '{http://xmlns.oracle.com/POC/TestTOPXSD/BPELProcess1}process' are duplicated at the following locations:
     [scac] 
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/BPELProcess1.xsd [line#: 6]
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/sample1.xsd [line#: 6]
     [scac] There are at least two of them looking different:
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/BPELProcess1.xsd [difference starting at line#:9]
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/sample1.xsd [difference starting at line#:9]
     [scac] /C:/JDeveloper/mywork/POC/TestTOPXSD/BPELProcess1.wsdl: error: Message part "payload" is undefined [element = {http://xmlns.oracle.com/POC/TestTOPXSD/BPELProcess1}process
     [scac] /C:/JDeveloper/mywork/POC/TestTOPXSD/BPELProcess1.wsdl: error: Global element declaration/definition of name '{http://xmlns.oracle.com/POC/TestTOPXSD/BPELProcess1}process' are duplicated at the following locations:
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/BPELProcess1.xsd [line#: 6]
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/sample1.xsd [line#: 6]
     [scac] There are at least two of them looking different:
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/BPELProcess1.xsd [difference starting at line#:9]
     [scac] file:/C:/JDeveloper/mywork/POC/TestTOPXSD/xsd/sample1.xsd [difference starting at line#:9]
     [scac] /C:/JDeveloper/mywork/POC/TestTOPXSD/BPELProcess1.wsdl: error: Message part "payload" is undefined [element = {http://xmlns.oracle.com/POC/TestTOPXSD/BPELProcess1}processResponse
     [scac] Setting BPELC option 'classpath' to C:\Oracle\Middleware\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\adfbcsvc.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\adfbcsvc-share.jar;C:\Oracle\Middleware\oracle_common\modules\commonj.sdo_2.1.0.jar;C:\Oracle\Middleware\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.webservices_11.1.1\wsclient.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.web-common_11.1.1.jar;;C:\JDeveloper\mywork\POC\TestTOPXSD\SCA-INF\classes
     [scac] BPELProcess1.bpel:47: error: XML element "{http://xmlns.oracle.com/POC/TestTOPXSD/BPELProcess1}process" of variable "Variable1" is not defined

BUILD FAILED
C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:279: Java returned: 1 Check log file : C:\JDeveloper\mywork\POC\TestTOPXSD\SCA-INF\classes\scac.log for errors


Possible Issues:
1. There might be reference from your bpel to same schema in two different places(may be one in local and another in MDS), where one of them is slightly different than other schema.

2. Both schemas shared by your target system may contains the same targetnamespace with changes in the elements.

Solution:
1. Point all the schema reference to one single place. if you still want to use both local and mds schemas, both the schemas should look be exactly similar.

2. Combine both the schemas into single one and use that in the code.


No comments:

Post a Comment