In some rare cases (especially inside Eclipse, for example, one project has
other tuscany module projects as dependencies while another module has
tuscany jars), the same module can be added to the classpath more than once
(one from the target/classes and the other from the local maven repo). As a
result, we will discover the module twice, so do the activators.
One thing we can do is to add a check in ServiceDiscovery to see if two
ServiceDeclaration(s) has the same classname and attributes. If so, we can
log a warning and remove the duplicate one. The check might have a bit
performance penality though.
Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws (JIRA)" <[email protected]>
Sent: Friday, June 19, 2009 9:06 AM
To: <[email protected]>
Subject: [jira] Resolved: (TUSCANY-3070) ModuleActivators being picked up
twice from the classpath
[
https://issues.apache.org/jira/browse/TUSCANY-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Laws resolved TUSCANY-3070.
---------------------------------
Resolution: Fixed
Am closing this one down now. The same fix is in both 1.x and 2.x now.
Doesn't address the root cause but seems to be working OK.
ModuleActivators being picked up twice from the classpath
---------------------------------------------------------
Key: TUSCANY-3070
URL: https://issues.apache.org/jira/browse/TUSCANY-3070
Project: Tuscany
Issue Type: Bug
Affects Versions: Java-SCA-1.5
Environment: WinXP SP2 Sun JDB1.6
Reporter: Simon Laws
Assignee: Simon Laws
Fix For: Java-SCA-Next
In playing with the travel sample I got into a state where the module
activators were being picked up twice from the classpath. The result is
that the runtime fails with an error about an @Init method being defined
twice as the init visitor is added twice. For now I just picked the
symptom by putting a change in that checks that visitors are not being
added twice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.