You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Tammo van Lessen (JIRA)" <ji...@apache.org> on 2007/12/03 22:59:26 UTC
[jira] Created: (SM-1161) jbi-service-unit causes infinite loop
when dependency graph is not cycle-free
jbi-service-unit causes infinite loop when dependency graph is not cycle-free
-----------------------------------------------------------------------------
Key: SM-1161
URL: https://issues.apache.org/activemq/browse/SM-1161
Project: ServiceMix
Issue Type: Bug
Components: tooling
Affects Versions: 3.2.1, 3.2
Environment: mvn 2.0.6, win xp pro
Reporter: Tammo van Lessen
Priority: Critical
Attachments: infinite-loop-patch.txt
Hi,
when building a JSR181 SU, maven dies in a StackOverflowException, caused by an infinite loop in AbstractJBIMojo.getArtifacts(). My guess is that one of the used libraries draws some
transitive dependencies, which have have a cycle.
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.StackOverflowError
at org.apache.maven.artifact.DefaultArtifact.hashCode(DefaultArtifact.java:305)
at java.util.HashMap.put(HashMap.java:372)
at java.util.HashSet.add(HashSet.java:200)
at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
144)
at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
147)
at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
147)
at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
147)
...
I had a look at the code and are wondering whether the exit condition of the recursive getArtifacts() methods should also check if the artifact has already been processed.
The same applies to the debug method "print".
Please find attached a patch against SM 3.2.1 which fixes that (unless I did not get the original intention of getArtifacts() wrong).
Thanks,
Tammo
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SM-1161) jbi-service-unit causes infinite loop
when dependency graph is not cycle-free
Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41594#action_41594 ]
Bruce Snyder commented on SM-1161:
----------------------------------
Committed to the 3.2 branch via [revision 634707|http://svn.apache.org/viewvc?rev=634707&view=rev] and to the trunk (3.3) via [revision 634714|http://svn.apache.org/viewvc?rev=634714&view=rev].
> jbi-service-unit causes infinite loop when dependency graph is not cycle-free
> -----------------------------------------------------------------------------
>
> Key: SM-1161
> URL: https://issues.apache.org/activemq/browse/SM-1161
> Project: ServiceMix
> Issue Type: Bug
> Components: tooling
> Affects Versions: 3.2, 3.2.1
> Environment: mvn 2.0.6, win xp pro
> Reporter: Tammo van Lessen
> Assignee: Bruce Snyder
> Priority: Critical
> Attachments: infinite-loop-patch.txt
>
>
> Hi,
> when building a JSR181 SU, maven dies in a StackOverflowException, caused by an infinite loop in AbstractJBIMojo.getArtifacts(). My guess is that one of the used libraries draws some
> transitive dependencies, which have have a cycle.
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.StackOverflowError
> at org.apache.maven.artifact.DefaultArtifact.hashCode(DefaultArtifact.java:305)
> at java.util.HashMap.put(HashMap.java:372)
> at java.util.HashSet.add(HashSet.java:200)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 144)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> ...
> I had a look at the code and are wondering whether the exit condition of the recursive getArtifacts() methods should also check if the artifact has already been processed.
> The same applies to the debug method "print".
> Please find attached a patch against SM 3.2.1 which fixes that (unless I did not get the original intention of getArtifacts() wrong).
> Thanks,
> Tammo
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SM-1161) jbi-service-unit causes infinite loop
when dependency graph is not cycle-free
Posted by "Tammo van Lessen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tammo van Lessen updated SM-1161:
---------------------------------
Attachment: infinite-loop-patch.txt
da patch
> jbi-service-unit causes infinite loop when dependency graph is not cycle-free
> -----------------------------------------------------------------------------
>
> Key: SM-1161
> URL: https://issues.apache.org/activemq/browse/SM-1161
> Project: ServiceMix
> Issue Type: Bug
> Components: tooling
> Affects Versions: 3.2, 3.2.1
> Environment: mvn 2.0.6, win xp pro
> Reporter: Tammo van Lessen
> Priority: Critical
> Attachments: infinite-loop-patch.txt
>
>
> Hi,
> when building a JSR181 SU, maven dies in a StackOverflowException, caused by an infinite loop in AbstractJBIMojo.getArtifacts(). My guess is that one of the used libraries draws some
> transitive dependencies, which have have a cycle.
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.StackOverflowError
> at org.apache.maven.artifact.DefaultArtifact.hashCode(DefaultArtifact.java:305)
> at java.util.HashMap.put(HashMap.java:372)
> at java.util.HashSet.add(HashSet.java:200)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 144)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> ...
> I had a look at the code and are wondering whether the exit condition of the recursive getArtifacts() methods should also check if the artifact has already been processed.
> The same applies to the debug method "print".
> Please find attached a patch against SM 3.2.1 which fixes that (unless I did not get the original intention of getArtifacts() wrong).
> Thanks,
> Tammo
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SM-1161) jbi-service-unit causes infinite loop
when dependency graph is not cycle-free
Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bruce Snyder reassigned SM-1161:
--------------------------------
Assignee: Bruce Snyder
> jbi-service-unit causes infinite loop when dependency graph is not cycle-free
> -----------------------------------------------------------------------------
>
> Key: SM-1161
> URL: https://issues.apache.org/activemq/browse/SM-1161
> Project: ServiceMix
> Issue Type: Bug
> Components: tooling
> Affects Versions: 3.2, 3.2.1
> Environment: mvn 2.0.6, win xp pro
> Reporter: Tammo van Lessen
> Assignee: Bruce Snyder
> Priority: Critical
> Attachments: infinite-loop-patch.txt
>
>
> Hi,
> when building a JSR181 SU, maven dies in a StackOverflowException, caused by an infinite loop in AbstractJBIMojo.getArtifacts(). My guess is that one of the used libraries draws some
> transitive dependencies, which have have a cycle.
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.StackOverflowError
> at org.apache.maven.artifact.DefaultArtifact.hashCode(DefaultArtifact.java:305)
> at java.util.HashMap.put(HashMap.java:372)
> at java.util.HashSet.add(HashSet.java:200)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 144)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> ...
> I had a look at the code and are wondering whether the exit condition of the recursive getArtifacts() methods should also check if the artifact has already been processed.
> The same applies to the debug method "print".
> Please find attached a patch against SM 3.2.1 which fixes that (unless I did not get the original intention of getArtifacts() wrong).
> Thanks,
> Tammo
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SM-1161) jbi-service-unit causes infinite loop
when dependency graph is not cycle-free
Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bruce Snyder resolved SM-1161.
------------------------------
Fix Version/s: 3.2.2
3.3
Resolution: Fixed
> jbi-service-unit causes infinite loop when dependency graph is not cycle-free
> -----------------------------------------------------------------------------
>
> Key: SM-1161
> URL: https://issues.apache.org/activemq/browse/SM-1161
> Project: ServiceMix
> Issue Type: Bug
> Components: tooling
> Affects Versions: 3.2, 3.2.1
> Environment: mvn 2.0.6, win xp pro
> Reporter: Tammo van Lessen
> Assignee: Bruce Snyder
> Priority: Critical
> Fix For: 3.2.2, 3.3
>
> Attachments: infinite-loop-patch.txt
>
>
> Hi,
> when building a JSR181 SU, maven dies in a StackOverflowException, caused by an infinite loop in AbstractJBIMojo.getArtifacts(). My guess is that one of the used libraries draws some
> transitive dependencies, which have have a cycle.
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.StackOverflowError
> at org.apache.maven.artifact.DefaultArtifact.hashCode(DefaultArtifact.java:305)
> at java.util.HashMap.put(HashMap.java:372)
> at java.util.HashSet.add(HashSet.java:200)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 144)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> at org.apache.servicemix.maven.plugin.jbi.AbstractJbiMojo.getArtifacts(AbstractJbiMojo.java:
> 147)
> ...
> I had a look at the code and are wondering whether the exit condition of the recursive getArtifacts() methods should also check if the artifact has already been processed.
> The same applies to the debug method "print".
> Please find attached a patch against SM 3.2.1 which fixes that (unless I did not get the original intention of getArtifacts() wrong).
> Thanks,
> Tammo
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.