You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2009/10/08 16:56:56 UTC

[2.x] Test cases fail with DuplicateIntent errors in Eclipse

Many test cases (binding-http-runtime, binding-jsonrpc-runtime, 
binding-ws-axis2 etc) which work in Maven fail for me with 
DuplicateIntent policy errors in Eclipse.

Run As / Junit Test gives me the following errors:

Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 
domain: tuscany.apache.org
Oct 8, 2009 7:41:01 AM 
org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
points definitions] (DuplicateIntent)
SEVERE: Duplicate intent 
{http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication 
found in domain
Oct 8, 2009 7:41:01 AM 
org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
points definitions] (DuplicateIntent)
SEVERE: Duplicate intent 
{http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication 
found in domain
Oct 8, 2009 7:41:01 AM 
org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
points definitions] (DuplicateIntent)
SEVERE: Duplicate intent 
{http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found 
in domain
Oct 8, 2009 7:41:01 AM 
org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
points definitions] (DuplicateIntent)
SEVERE: Duplicate intent 
{http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication 
found in domain
...

Any idea on what's causing getting these errors in Eclipse?
-- 
Jean-Sebastien


Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by ant elder <an...@gmail.com>.
On Thu, Oct 8, 2009 at 4:06 PM, Luciano Resende <lu...@gmail.com> wrote:
> On Thu, Oct 8, 2009 at 7:56 AM, Jean-Sebastien Delfino
> <js...@apache.org> wrote:
>> Many test cases (binding-http-runtime, binding-jsonrpc-runtime,
>> binding-ws-axis2 etc) which work in Maven fail for me with DuplicateIntent
>> policy errors in Eclipse.
>>
>> Run As / Junit Test gives me the following errors:
>>
>> Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
>> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0
>> domain: tuscany.apache.org
>> Oct 8, 2009 7:41:01 AM
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
>> definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication found
>> in domain
>> Oct 8, 2009 7:41:01 AM
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
>> definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication found
>> in domain
>> Oct 8, 2009 7:41:01 AM
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
>> definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found in
>> domain
>> Oct 8, 2009 7:41:01 AM
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
>> definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication found
>> in domain
>> ...
>>
>> Any idea on what's causing getting these errors in Eclipse?
>> --
>> Jean-Sebastien
>>
>>
>
> How did you create your eclipse projects, and how are you running the tests ?
>
> I right click on the binding-http-runtime or binding-jsonrpc-runtime,
> select Run As->JUnit Test and get all tests passing.
>

Also works ok for me right now too, having created the projects with
"mvn eclipse:eclipse".

If you're not on the latest code there was a dupicate definitions.xml
file around for a while earlier that might cause that type of problem?

  ...ant

Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Oct 8, 2009 at 7:56 AM, Jean-Sebastien Delfino
<js...@apache.org> wrote:
> Many test cases (binding-http-runtime, binding-jsonrpc-runtime,
> binding-ws-axis2 etc) which work in Maven fail for me with DuplicateIntent
> policy errors in Eclipse.
>
> Run As / Junit Test gives me the following errors:
>
> Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0
> domain: tuscany.apache.org
> Oct 8, 2009 7:41:01 AM
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication found
> in domain
> Oct 8, 2009 7:41:01 AM
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication found
> in domain
> Oct 8, 2009 7:41:01 AM
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found in
> domain
> Oct 8, 2009 7:41:01 AM
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication found
> in domain
> ...
>
> Any idea on what's causing getting these errors in Eclipse?
> --
> Jean-Sebastien
>
>

How did you create your eclipse projects, and how are you running the tests ?

I right click on the binding-http-runtime or binding-jsonrpc-runtime,
select Run As->JUnit Test and get all tests passing.

-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Sorry, the ServiceDeclaration.toString() doesn't contain the location 
> URL of the file. I'll fix that.
> 
> Can you try to print out definitionsDeclaration.getLocation() instead?
[...]

Did that, saw that the duplicate definition was coming from an old copy 
of tuscany-definitions-xml.jar left over in my PDE target directory, 
removed it, and Tuscany's happier now with no duplicate intents :)

Thanks!
-- 
Jean-Sebastien

Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Raymond Feng <en...@gmail.com>.
Sorry, the ServiceDeclaration.toString() doesn't contain the location URL of 
the file. I'll fix that.

Can you try to print out definitionsDeclaration.getLocation() instead?

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Monday, October 12, 2009 9:51 AM
To: <de...@tuscany.apache.org>
Subject: Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

> Raymond Feng wrote:
>> Hi,
>>
>> Can you print out the ServiceDeclarations in the same class? It will tell 
>> the URL of the service provider configuration files.
>>
>>        // Find each definitions
>>        for (ServiceDeclaration definitionsDeclaration : 
>> definitionsDeclarations) {
>>            URL url = 
>> definitionsDeclaration.getResource(definitionsDeclaration.getClassName());
>>            if (url == null) {
>>                throw new 
>> IllegalArgumentException(definitionsDeclaration.getClassName() + " cannot 
>> be found");
>>            }
>>            documents.add(url);
>>        }
> [...]
>
> I added:
> System.out.println("### " + definitionsDeclaration);
>
> and I get:
>
> ### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
> {class=META-INF/sca-policy-1.1-intents-definitions-cd03.xml}
> ### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
> {class=org/apache/tuscany/sca/binding/sca/definitions.xml}
> ### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
> {class=org/apache/tuscany/sca/implementation/java/definitions/definitions.xml}
> ### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
> {class=META-INF/sca-policy-1.1-intents-definitions-cd02.xml}
>
> Everything works if I work around the duplicate definitions with this:
> if (documents.contains(url))
>   continue;
>
> but that still doesn't explain why there's duplicates in the first 
> place...
> -- 
> Jean-Sebastien 


Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
> 
> Can you print out the ServiceDeclarations in the same class? It will 
> tell the URL of the service provider configuration files.
> 
>        // Find each definitions
>        for (ServiceDeclaration definitionsDeclaration : 
> definitionsDeclarations) {
>            URL url = 
> definitionsDeclaration.getResource(definitionsDeclaration.getClassName());
>            if (url == null) {
>                throw new 
> IllegalArgumentException(definitionsDeclaration.getClassName() + " 
> cannot be found");
>            }
>            documents.add(url);
>        }
[...]

I added:
System.out.println("### " + definitionsDeclaration);

and I get:

### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
{class=META-INF/sca-policy-1.1-intents-definitions-cd03.xml}
### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
{class=org/apache/tuscany/sca/binding/sca/definitions.xml}
### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
{class=org/apache/tuscany/sca/implementation/java/definitions/definitions.xml}
### ClassLoader: sun.misc.Launcher$AppClassLoader@4c6c4c6c Attributes: 
{class=META-INF/sca-policy-1.1-intents-definitions-cd02.xml}

Everything works if I work around the duplicate definitions with this:
if (documents.contains(url))
   continue;

but that still doesn't explain why there's duplicates in the first place...
-- 
Jean-Sebastien

Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Raymond Feng <en...@gmail.com>.
Hi,

Can you print out the ServiceDeclarations in the same class? It will tell 
the URL of the service provider configuration files.

        // Find each definitions
        for (ServiceDeclaration definitionsDeclaration : 
definitionsDeclarations) {
            URL url = 
definitionsDeclaration.getResource(definitionsDeclaration.getClassName());
            if (url == null) {
                throw new 
IllegalArgumentException(definitionsDeclaration.getClassName() + " cannot be 
found");
            }
            documents.add(url);
        }

We can change the documents to be a set to avoid duplicate resources but I 
would like to understand how the declarations are duplicated.

Thanks,
Raymond

--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Friday, October 09, 2009 3:04 PM
To: <de...@tuscany.apache.org>
Subject: Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

> Raymond Feng wrote:
>> I found one case where the mvn eclipse:eclipse command is run against the 
>> project itself. The jars for other Tuscany modules are added to the 
>> .classpath and the PDE also adds the Tuscany projects in the workspace 
>> via the plugin dependency classpath container. As a result, there are 
>> duplicate copies of the definitions.xml from the jar and project.
>>
>> Can you try to run mvn -Peclipse instead? This will use the Tuscany 
>> version of the maven eclipse plugin to produce the .classpath file that 
>> is friendly to PDE as well as non OSGi dependencies (such as test/runtime 
>> or even transitive compile dependencies).
>>
>> Thanks,
>> Raymond
>> --------------------------------------------------
>> From: "Jean-Sebastien Delfino" <js...@apache.org>
>> Sent: Thursday, October 08, 2009 7:56 AM
>> To: <de...@tuscany.apache.org>
>> Subject: [2.x] Test cases fail with DuplicateIntent errors in Eclipse
>>
>>> Many test cases (binding-http-runtime, binding-jsonrpc-runtime, 
>>> binding-ws-axis2 etc) which work in Maven fail for me with 
>>> DuplicateIntent policy errors in Eclipse.
>>>
>>> Run As / Junit Test gives me the following errors:
>>>
>>> Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
>>> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 
>>> domain: tuscany.apache.org
>>> Oct 8, 2009 7:41:01 AM 
>>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>>> points definitions] (DuplicateIntent)
>>> SEVERE: Duplicate intent 
>>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication 
>>> found in domain
>>> Oct 8, 2009 7:41:01 AM 
>>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>>> points definitions] (DuplicateIntent)
>>> SEVERE: Duplicate intent 
>>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication 
>>> found in domain
>>> Oct 8, 2009 7:41:01 AM 
>>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>>> points definitions] (DuplicateIntent)
>>> SEVERE: Duplicate intent 
>>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found 
>>> in domain
>>> Oct 8, 2009 7:41:01 AM 
>>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>>> points definitions] (DuplicateIntent)
>>> SEVERE: Duplicate intent 
>>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication 
>>> found in domain
>>> ...
>>>
>>> Any idea on what's causing getting these errors in Eclipse?
>>> -- 
>>> Jean-Sebastien
>>>
>
> Here's what mvn -Peclipse produces for project binding-http-runtime:
>
> <classpath>
>   <classpathentry kind="src" path="src/test/java" 
> output="target/test-classes" including="**/*.java"/>
>   <classpathentry kind="src" path="src/test/resources" 
> output="target/test-classes" excluding="**/*.java"/>
>   <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
>   <classpathentry kind="src" path="src/main/resources" 
> excluding="**/*.java"/>
>   <classpathentry kind="src" path="." 
> including="LICENSE|NOTICE|README|META-INF/**/*|OSGI-INF/**/*" 
> excluding="**/*.java"/>
>   <classpathentry kind="output" path="target/classes"/>
>   <classpathentry kind="var" 
> path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar"/>
>   <classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/org/apache/bcel/bcel/5.2/bcel-5.2.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/cglib/cglib/2.2/cglib-2.2.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.12/jaxb-impl-2.1.12.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/org/mortbay/jetty/jetty/6.1.19/jetty-6.1.19.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/org/mortbay/jetty/jetty-util/6.1.19/jetty-util-6.1.19.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/junit/junit/4.5/junit-4.5.jar"/>
>   <classpathentry kind="src" path="/tuscany-binding-sca-runtime"/>
>   <classpathentry kind="src" path="/tuscany-builder"/>
>   <classpathentry kind="src" path="/tuscany-core"/>
>   <classpathentry kind="src" path="/tuscany-core-databinding"/>
>   <classpathentry kind="src" path="/tuscany-databinding"/>
>   <classpathentry kind="src" path="/tuscany-databinding-jaxb"/>
>   <classpathentry kind="src" path="/tuscany-host-jetty"/>
>   <classpathentry kind="src" path="/tuscany-implementation-java"/>
>   <classpathentry kind="src" path="/tuscany-implementation-java-runtime"/>
>   <classpathentry kind="src" path="/tuscany-interface-java"/>
>   <classpathentry kind="src" path="/tuscany-interface-java-jaxws"/>
>   <classpathentry kind="src" path="/tuscany-node-api"/>
>   <classpathentry kind="src" path="/tuscany-node-impl"/>
>   <classpathentry kind="src" path="/tuscany-xsd"/>
>   <classpathentry kind="var" 
> path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
>   <classpathentry kind="var" 
> path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.4.2/XmlSchema-1.4.2.jar"/>
>   <classpathentry kind="con" 
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
>   <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
> </classpath>
>
> What's weird is that the generated .classpath lists projects like 
> tuscany-core for example, which are also available in my workspace as OSGi 
> bundles (and therefore also brought into the classpath by the 
> org.eclipse.pde.core.requiredPlugins classpath container?) so perhaps 
> that's what causing the duplicate definitions.xml?
>
> I added a print statement to DefaultDefinitionsExtensionPoint and see 
> assembly-xml/.../definitions.xml loaded twice:
>
> file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/assembly-xml/target/classes/META-INF/sca-policy-1.1-intents-definitions-cd02.xml
> file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/implementation-java-runtime/target/classes/org/apache/tuscany/sca/implementation/java/definitions/definitions.xml
> file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/binding-sca-runtime/target/classes/org/apache/tuscany/sca/binding/sca/definitions.xml
> file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/assembly-xml/target/classes/META-INF/sca-policy-1.1-intents-definitions-cd02.xml
>
> What are you guys doing to not get that problem? Is your generated 
> .classpath different from what I've posted?
>
> -- 
> Jean-Sebastien 


Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> I found one case where the mvn eclipse:eclipse command is run against 
> the project itself. The jars for other Tuscany modules are added to the 
> .classpath and the PDE also adds the Tuscany projects in the workspace 
> via the plugin dependency classpath container. As a result, there are 
> duplicate copies of the definitions.xml from the jar and project.
> 
> Can you try to run mvn -Peclipse instead? This will use the Tuscany 
> version of the maven eclipse plugin to produce the .classpath file that 
> is friendly to PDE as well as non OSGi dependencies (such as 
> test/runtime or even transitive compile dependencies).
> 
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> Sent: Thursday, October 08, 2009 7:56 AM
> To: <de...@tuscany.apache.org>
> Subject: [2.x] Test cases fail with DuplicateIntent errors in Eclipse
> 
>> Many test cases (binding-http-runtime, binding-jsonrpc-runtime, 
>> binding-ws-axis2 etc) which work in Maven fail for me with 
>> DuplicateIntent policy errors in Eclipse.
>>
>> Run As / Junit Test gives me the following errors:
>>
>> Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
>> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 
>> domain: tuscany.apache.org
>> Oct 8, 2009 7:41:01 AM 
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>> points definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent 
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication 
>> found in domain
>> Oct 8, 2009 7:41:01 AM 
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>> points definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent 
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication 
>> found in domain
>> Oct 8, 2009 7:41:01 AM 
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>> points definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent 
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found 
>> in domain
>> Oct 8, 2009 7:41:01 AM 
>> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension 
>> points definitions] (DuplicateIntent)
>> SEVERE: Duplicate intent 
>> {http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication 
>> found in domain
>> ...
>>
>> Any idea on what's causing getting these errors in Eclipse?
>> -- 
>> Jean-Sebastien
>>

Here's what mvn -Peclipse produces for project binding-http-runtime:

<classpath>
   <classpathentry kind="src" path="src/test/java" 
output="target/test-classes" including="**/*.java"/>
   <classpathentry kind="src" path="src/test/resources" 
output="target/test-classes" excluding="**/*.java"/>
   <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
   <classpathentry kind="src" path="src/main/resources" 
excluding="**/*.java"/>
   <classpathentry kind="src" path="." 
including="LICENSE|NOTICE|README|META-INF/**/*|OSGI-INF/**/*" 
excluding="**/*.java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="var" 
path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/org/apache/bcel/bcel/5.2/bcel-5.2.jar"/>
   <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.2/cglib-2.2.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.12/jaxb-impl-2.1.12.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/org/mortbay/jetty/jetty/6.1.19/jetty-6.1.19.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/org/mortbay/jetty/jetty-util/6.1.19/jetty-util-6.1.19.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.5/junit-4.5.jar"/>
   <classpathentry kind="src" path="/tuscany-binding-sca-runtime"/>
   <classpathentry kind="src" path="/tuscany-builder"/>
   <classpathentry kind="src" path="/tuscany-core"/>
   <classpathentry kind="src" path="/tuscany-core-databinding"/>
   <classpathentry kind="src" path="/tuscany-databinding"/>
   <classpathentry kind="src" path="/tuscany-databinding-jaxb"/>
   <classpathentry kind="src" path="/tuscany-host-jetty"/>
   <classpathentry kind="src" path="/tuscany-implementation-java"/>
   <classpathentry kind="src" path="/tuscany-implementation-java-runtime"/>
   <classpathentry kind="src" path="/tuscany-interface-java"/>
   <classpathentry kind="src" path="/tuscany-interface-java-jaxws"/>
   <classpathentry kind="src" path="/tuscany-node-api"/>
   <classpathentry kind="src" path="/tuscany-node-impl"/>
   <classpathentry kind="src" path="/tuscany-xsd"/>
   <classpathentry kind="var" 
path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
   <classpathentry kind="var" 
path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.4.2/XmlSchema-1.4.2.jar"/>
   <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
</classpath>

What's weird is that the generated .classpath lists projects like 
tuscany-core for example, which are also available in my workspace as 
OSGi bundles (and therefore also brought into the classpath by the 
org.eclipse.pde.core.requiredPlugins classpath container?) so perhaps 
that's what causing the duplicate definitions.xml?

I added a print statement to DefaultDefinitionsExtensionPoint and see 
assembly-xml/.../definitions.xml loaded twice:

file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/assembly-xml/target/classes/META-INF/sca-policy-1.1-intents-definitions-cd02.xml
file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/implementation-java-runtime/target/classes/org/apache/tuscany/sca/implementation/java/definitions/definitions.xml
file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/binding-sca-runtime/target/classes/org/apache/tuscany/sca/binding/sca/definitions.xml
file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/assembly-xml/target/classes/META-INF/sca-policy-1.1-intents-definitions-cd02.xml

What are you guys doing to not get that problem? Is your generated 
.classpath different from what I've posted?

-- 
Jean-Sebastien

Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by ant elder <an...@gmail.com>.
On Thu, Oct 8, 2009 at 11:16 PM, Raymond Feng <en...@gmail.com> wrote:
> I found one case where the mvn eclipse:eclipse command is run against the
> project itself. The jars for other Tuscany modules are added to the
> .classpath and the PDE also adds the Tuscany projects in the workspace via
> the plugin dependency classpath container. As a result, there are duplicate
> copies of the definitions.xml from the jar and project.
>

Could you say a bit more about how that happens or how to recreate the
problem?  I've not had any problems with mvn eclipse:eclipse but if
there is a problem it would be really good to fix it as this is the
way new users who know a bit about maven will expect it to work.

   ...ant

Re: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Posted by Raymond Feng <en...@gmail.com>.
I found one case where the mvn eclipse:eclipse command is run against the 
project itself. The jars for other Tuscany modules are added to the 
.classpath and the PDE also adds the Tuscany projects in the workspace via 
the plugin dependency classpath container. As a result, there are duplicate 
copies of the definitions.xml from the jar and project.

Can you try to run mvn -Peclipse instead? This will use the Tuscany version 
of the maven eclipse plugin to produce the .classpath file that is friendly 
to PDE as well as non OSGi dependencies (such as test/runtime or even 
transitive compile dependencies).

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Thursday, October 08, 2009 7:56 AM
To: <de...@tuscany.apache.org>
Subject: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

> Many test cases (binding-http-runtime, binding-jsonrpc-runtime, 
> binding-ws-axis2 etc) which work in Maven fail for me with DuplicateIntent 
> policy errors in Eclipse.
>
> Run As / Junit Test gives me the following errors:
>
> Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 
> domain: tuscany.apache.org
> Oct 8, 2009 7:41:01 AM 
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points 
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent 
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication 
> found in domain
> Oct 8, 2009 7:41:01 AM 
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points 
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent 
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication 
> found in domain
> Oct 8, 2009 7:41:01 AM 
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points 
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent 
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found in 
> domain
> Oct 8, 2009 7:41:01 AM 
> org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points 
> definitions] (DuplicateIntent)
> SEVERE: Duplicate intent 
> {http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication 
> found in domain
> ...
>
> Any idea on what's causing getting these errors in Eclipse?
> -- 
> Jean-Sebastien
>