Thursday, March 3, 2011

Ant error: Reference does not exist as wire target

Problem:

When executing ant to deploy a composite application to Oracle SOA Suite 11g, you may experience the following error:
scac-validate:
     [echo] Running scac-validate in /u01/svn/HelloWorld/composite.xml
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

scac:
     [scac] Validating composite "/u01/svn/HelloWorld/composite.xml"
     [scac] INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.
     [scac] error: location {/ns:composite/ns:reference[@name='HelloWorld/ShipHelloWebService']}: Reference HelloWorld/ShipHelloWebService does not exist as wire target
     [echo]
     [echo] ERROR IN TRYCATCH BLOCK:
     [echo] /home/oracle/deploy/build.soa.xml:114: The following error occurred while executing this line:
     [echo] /home/oracle/deploy/build.soa.xml:129: The following error occurred while executing this line:
     [echo] /u01/app/oracle/middleware/Oracle_SOA1/bin/ant-sca-package.xml:46: The following error occurred while executing this line:
     [echo] /u01/app/oracle/middleware/Oracle_SOA1/bin/ant-sca-compile.xml:269: Java returned: 1 Check log file : /tmp/out.err for errors

Solution:

The solution is simply as follows.

1. Edit the .componentType file (e.g., HelloWorld.componentType)

2. There is an extra <reference> element that is not used in your code. Delete it.

3. For example, delete the second reference, as it is related to the reference highlighted in the error above:
<?xml version="1.0" encoding="UTF-8"?>
<componentType xmlns="http://xmlns.oracle.com/sca/1.0" xmlns:ui="http://xmlns.oracle.com/soa/designer/">
  <service ui:wsdlLocation="HelloWorld.wsdl" name="HelloWorld">
    <interface.wsdl interface="http://xmlns.oracle.com/ProvABCSImpl/OMS/Core/QueryHello/V1#wsdl.interface(HelloWorld)"/>
  </service>
  <reference ui:wsdlLocation="http://soaserver.ipnweb.com:8001/soa-infra/services/default/InvokeSearchHelloWebService/SearchHelloWebServiceRouter_ep?WSDL" name="SearchHelloWebService">
    <interface.wsdl interface="http://service.ipnweb.com/SearchHello#wsdl.interface(SearchHello)"/>
  </reference>
  <reference ui:wsdlLocation="http://soaserver.ipnweb.com:8001/soa-infra/services/default/InvokeShipHelloWebService/ShipHelloWebServiceRouter_ep?WSDL" name="ShipHelloWebService">
    <interface.wsdl interface="http://service.ipnweb.com/ShipHello#wsdl.interface(ShipHello)"/>
  </reference>

</componentType>

Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)


Ahmed Aboulnaga

3 comments:

Eugene N. Yatsura said...

Hello!

Thank you for the post.

It really helps.

Best regards,
Eugene.

SOA and OIC Technology for beginners and learners said...

Hi Ahmed.. can you please help me.. i am getting this error...

scac:
[scac] Validating composite "c:\ant\code/hrprojects\employees\HelloWorldSai
lesh/composite.xml"
[scac] error: location {/ns:composite}: java.io.FileNotFoundException: c:\a
nt\code\hrprojects\employees\HelloWorldSailesh\composite.xml (The system cannot
find the file specified)
[scac] at java.io.FileInputStream.open(Native Method)
[scac] at java.io.FileInputStream.(FileInputStream.java:106)
[scac] at java.io.FileInputStream.(FileInputStream.java:66)
[scac] at oracle.soa.scac.ValidationFaultUtil.validateCompositeWithSche
ma(ValidationFaultUtil.java:101)
[scac] at oracle.soa.scac.ValidateComposite.validateWithSchema(Validate
Composite.java:1600)
[scac] at oracle.soa.scac.ValidateComposite.doValidation(ValidateCompos
ite.java:476)
[scac] at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:
150)
[scac] at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java
:135)
[scac]
[echo]
[echo] ERROR IN TRYCATCH BLOCK:
[echo] C:\ant\build.soa.xml:150: The following error occurred while executi
ng this line:
[echo] C:\ant\build.soa.xml:165: The following error occurred while executi
ng this line:
[echo] C:\Oracle\Middleware\jdeveloper\bin\ant-sca-package.xml:46: The foll
owing error occurred while executing this line:
[echo] C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:269: Java re
turned: 1 Check log file : C:\DOCUME~1\SAILES~1\LOCALS~1\Temp\out.err for errors

[echo]
[echo] **************************************************************
[echo] *
[echo] * ANT TARGET NAME: deployComposites
[echo] * FAILED PROCESS: HelloWorldSailesh
[echo] *
[echo] **************************************************************
[echo]

BUILD SUCCESSFUL
Total time: 3 seconds

SOA and OIC Technology for beginners and learners said...

UPGMED-02064 when migrating an ESB 10g project to Mediator 11g

Hi Ahmed thanks for the awesome post..

i have a question

when i try to migrated esb to mediator i get migration success full but when i make the project in 11g jdev i get errors wsdl load error..

but one of my fried said .. we see the logs like

UPGMED-02064 ,where can i see the UPGMED ..... KIND OF MESSAGE please guide me...