Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Reference name in composite file needs to match exactly what is defined in java file : example : in java reference :
@Reference
public void setPricechgLoggingWSService (PricechgLoggingWSService pricechgLoggingWSService)
in composite file : <reference name="pricechgLoggingWSService">
If the mismatch occurred, NPE will be generated when composite starts
java.lang.NullPointerException
at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.createWires
(CompositeActivatorImpl.java:328)
at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.createRuntimeWires
(CompositeActivatorImpl.java:269)
at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate
(CompositeActivatorImpl.java:578)
I'm not sure if the stack trace would be the same, but besides the error where you have a typing mismatch you get the same net result if your @Reference is not placed on a method/field with public or protected access (i.e. if you use a private or pkg (dflt) modifier). Might as well tackle @Property at the same time.. probably the same state of affairs there.