You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2007/03/27 13:42:35 UTC
[jira] Created: (SM-899)
org.apache.servicemix.file.SpringComponentTest fails with
java.lang.IllegalStateException
org.apache.servicemix.file.SpringComponentTest fails with java.lang.IllegalStateException
-----------------------------------------------------------------------------------------
Key: SM-899
URL: https://issues.apache.org/activemq/browse/SM-899
Project: ServiceMix
Issue Type: Sub-task
Components: servicemix-file
Affects Versions: 3.1
Reporter: Gert Vanthienen
This is the stack trace:
{noformat}
Caused by: javax.jbi.JBIException: Error calling init
at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:195)
....
Caused by: java.lang.IllegalStateException: An endpoint is already registered for key: {urn:test}service:endpoint
at org.apache.servicemix.common.Registry.registerEndpoint(Registry.java:55)
at org.apache.servicemix.common.Registry.registerServiceUnit(Registry.java:68)
at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:292)
at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
{noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SM-899)
org.apache.servicemix.file.SpringComponentTest fails with
java.lang.IllegalStateException
Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38916 ]
Gert Vanthienen commented on SM-899:
------------------------------------
As far as I understand the code:
DefaultComponent's doInit() method first registers all endpoint, thereby lazily creating the corresponding service unit. After all endpoint have been registered, the serviceUnit is no longer *{{null}}* and the doInit() method will call Registry's registerServiceUnit() which will attempt to register all the endpoints again, resulting in the stacktrace shown above.
The simple solution would be to add a test to DefaultComponent's doInit() method, only registering the service unit if it hasn't been registered before. As a more general solution, the same test could also be added to Registry's registerServiceUnit(). Does anyone see a problem with the latter approach?
> org.apache.servicemix.file.SpringComponentTest fails with java.lang.IllegalStateException
> -----------------------------------------------------------------------------------------
>
> Key: SM-899
> URL: https://issues.apache.org/activemq/browse/SM-899
> Project: ServiceMix
> Issue Type: Sub-task
> Components: servicemix-file
> Affects Versions: 3.1
> Reporter: Gert Vanthienen
>
> This is the stack trace:
> {noformat}
> Caused by: javax.jbi.JBIException: Error calling init
> at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:195)
> ....
> Caused by: java.lang.IllegalStateException: An endpoint is already registered for key: {urn:test}service:endpoint
> at org.apache.servicemix.common.Registry.registerEndpoint(Registry.java:55)
> at org.apache.servicemix.common.Registry.registerServiceUnit(Registry.java:68)
> at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:292)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SM-899)
org.apache.servicemix.file.SpringComponentTest fails with
java.lang.IllegalStateException
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved SM-899.
--------------------------------
Resolution: Fixed
Assignee: Guillaume Nodet
My bad, this is a regression due to a change i made in addEndpoint yesterday :-(
Just removing the SU registration (which is now done in the addEndpoint method) works.
URL: http://svn.apache.org/viewvc?view=rev&rev=522883
> org.apache.servicemix.file.SpringComponentTest fails with java.lang.IllegalStateException
> -----------------------------------------------------------------------------------------
>
> Key: SM-899
> URL: https://issues.apache.org/activemq/browse/SM-899
> Project: ServiceMix
> Issue Type: Sub-task
> Components: servicemix-file
> Affects Versions: 3.2
> Reporter: Gert Vanthienen
> Assigned To: Guillaume Nodet
> Fix For: 3.2
>
>
> This is the stack trace:
> {noformat}
> Caused by: javax.jbi.JBIException: Error calling init
> at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:195)
> ....
> Caused by: java.lang.IllegalStateException: An endpoint is already registered for key: {urn:test}service:endpoint
> at org.apache.servicemix.common.Registry.registerEndpoint(Registry.java:55)
> at org.apache.servicemix.common.Registry.registerServiceUnit(Registry.java:68)
> at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:292)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SM-899)
org.apache.servicemix.file.SpringComponentTest fails with
java.lang.IllegalStateException
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated SM-899:
-------------------------------
Affects Version/s: (was: 3.1)
3.2
Fix Version/s: 3.2
> org.apache.servicemix.file.SpringComponentTest fails with java.lang.IllegalStateException
> -----------------------------------------------------------------------------------------
>
> Key: SM-899
> URL: https://issues.apache.org/activemq/browse/SM-899
> Project: ServiceMix
> Issue Type: Sub-task
> Components: servicemix-file
> Affects Versions: 3.2
> Reporter: Gert Vanthienen
> Fix For: 3.2
>
>
> This is the stack trace:
> {noformat}
> Caused by: javax.jbi.JBIException: Error calling init
> at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:195)
> ....
> Caused by: java.lang.IllegalStateException: An endpoint is already registered for key: {urn:test}service:endpoint
> at org.apache.servicemix.common.Registry.registerEndpoint(Registry.java:55)
> at org.apache.servicemix.common.Registry.registerServiceUnit(Registry.java:68)
> at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:292)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.