1.问题
三月 11, 2013 9:13:02 下午 org.apache.tuscany.sca.node.impl.NodeFactoryImpl loadContributions
INFO: Loading contribution: file:/D:/workspaces/SCAJavaClient/
三月 11, 2013 9:13:03 下午 org.apache.tuscany.sca.assembly.xml.CompositeModelResolver [Contribution: file:/D:/workspaces/SCAJavaClient/, Artifact: Cal.composite] (DuplicateCompositeName)
SEVERE: [ASM_6001] More than one composite with the same name {http://sample}Cal found in contribution file:/D:/workspaces/SCAJavaClient/
Exception in thread "main" java.lang.IllegalStateException: org.oasisopen.sca.ServiceRuntimeException: [Contribution: file:/D:/workspaces/SCAJavaClient/, Artifact: Cal.composite] - [ASM_6001] More than one composite with the same name {http://sample}Cal found in contribution file:/D:/workspaces/SCAJavaClient/
at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:178)
at cal.CalClient.main(CalClient.java:7)
Caused by: org.oasisopen.sca.ServiceRuntimeException: [Contribution: file:/D:/workspaces/SCAJavaClient/, Artifact: Cal.composite] - [ASM_6001] More than one composite with the same name {http://sample}Cal found in contribution file:/D:/workspaces/SCAJavaClient/
at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.analyzeProblems(NodeFactoryImpl.java:203)
at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.loadContributions(NodeFactoryImpl.java:388)
at org.apache.tuscany.sca.node.impl.NodeImpl.load(NodeImpl.java:198)
at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:118)
... 1 more
2.分析
在Eclipse总是出现这个错误,通过分析,看来是有相同命名的composite(组装模块),无论代码还是.composite的XML文件都没有重名的composite,再想想很有可能是eclipse build后在bin目录下复制了一个与src目录下一样的composite文件
3.解决方法:将.composite文件放到项目根目录下