You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Sandeep T H (JIRA)" <ji...@apache.org> on 2010/11/30 13:22:14 UTC

[jira] Created: (SM-2016) Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.

Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.
--------------------------------------------------------------------------------

                 Key: SM-2016
                 URL: https://issues.apache.org/jira/browse/SM-2016
             Project: ServiceMix
          Issue Type: Improvement
          Components: servicemix-assembly
    Affects Versions: 3.3.2
         Environment: RHEL
            Reporter: Sandeep T H


Some of our SAs contain SUs which refer to some shared libraries.
Eg:
In our cxf-se su:
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" >
<classpath>
  <library>common-shareLib</library>

But sometimes this SA/SU fails to deploy with the errors:
 java.lang.IllegalStateException  No such shared library common-sharedLib.

Maybe this is because the SA/SU is deployed before the shared library is deployed. As we've seen if the shared lib is deployed first this problem is not seen.
We've also tried adding this shared lib as a dependency in cxf-se su pom. But it does not help.
It is not specific to cxf-se it is seen for other component su's too
What is the recommended way here?


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-2016) Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.

Posted by "Kari J. Niemi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SM-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987377#action_12987377 ] 

Kari J. Niemi commented on SM-2016:
-----------------------------------

It seems that these issue were not considered when it became possible to use the classpath element in SUs xbean.xml.

The jbi specification (which smx is based on) sets no relationship between a ServiceAssembly(and the SU inside it) and a JBI-SharedLibrary. And propably the xbean.xml stuff and ability to feed additional stuff to classpath is not a jbi specified feature.  This is backround for this problem.  My interpretation is that this relationship is missing in ji specs by intention to drive towards better (more jbi like) components created: the intention is to create the code&nasty things as reusable stuff in BCs or SEs (which can use JBI-SharedLibraries for common stuff). This way the SAs/SUs would be very simple.

When using the classpath entries in xbean.xmll you are not only having a problem in the start of smx - you also have a problem in hotdeployment. Consider you install a new version of the shared library - if I'm correct about the smx classloader: the SA/SUs won't start using your updated jars before you restart smx -at least it's not handled in any controlled manner... I'm not 100% sure about this however.

What's  relevant: the jbi spec has no means for common libs between different SAs&SUs.

> Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.
> --------------------------------------------------------------------------------
>
>                 Key: SM-2016
>                 URL: https://issues.apache.org/jira/browse/SM-2016
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-assembly
>    Affects Versions: 3.3.2
>         Environment: RHEL
>            Reporter: Sandeep T H
>
> Some of our SAs contain SUs which refer to some shared libraries.
> Eg:
> In our cxf-se su:
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" >
> <classpath>
>   <library>common-shareLib</library>
> But sometimes this SA/SU fails to deploy with the errors:
>  java.lang.IllegalStateException  No such shared library common-sharedLib.
> Maybe this is because the SA/SU is deployed before the shared library is deployed. As we've seen if the shared lib is deployed first this problem is not seen.
> We've also tried adding this shared lib as a dependency in cxf-se su pom. But it does not help.
> It is not specific to cxf-se it is seen for other component su's too
> What is the recommended way here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SM-2016) Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.

Posted by "Sandeep T H (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SM-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandeep T H closed SM-2016.
---------------------------

    Resolution: Invalid

Please refer the comments by Kari J Niemi

> Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.
> --------------------------------------------------------------------------------
>
>                 Key: SM-2016
>                 URL: https://issues.apache.org/jira/browse/SM-2016
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-assembly
>    Affects Versions: 3.3.2
>         Environment: RHEL
>            Reporter: Sandeep T H
>
> Some of our SAs contain SUs which refer to some shared libraries.
> Eg:
> In our cxf-se su:
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" >
> <classpath>
>   <library>common-shareLib</library>
> But sometimes this SA/SU fails to deploy with the errors:
>  java.lang.IllegalStateException  No such shared library common-sharedLib.
> Maybe this is because the SA/SU is deployed before the shared library is deployed. As we've seen if the shared lib is deployed first this problem is not seen.
> We've also tried adding this shared lib as a dependency in cxf-se su pom. But it does not help.
> It is not specific to cxf-se it is seen for other component su's too
> What is the recommended way here?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SM-2016) Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.

Posted by "Kari J. Niemi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SM-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989525#comment-12989525 ] 

Kari J. Niemi commented on SM-2016:
-----------------------------------

I think this page could "warn" about using the classpath entries in xbean.xml:
http://servicemix.apache.org/classloaders.html

Something like:
-------------
Please notice that using the classpath entries in xbean.xml has some "issues", because a dependency between Service Assembly and JBI Shared Library is not really known by JBI specificationss. Currently the servicemix does not consider this dependency in hotdeployment, so you have to consider these workarounds:
   -if you update the library in hotdeploy folder, the service assembly won't properly pick up the changes. You have to also restart the Service Assembly as well.
   -set a "fake" dependency chain SA-BC-SL. This way, updating the SL will make the BC "reloaded", which will make the SA "reloaded". Also, this will guarantee that in smx startup the SL is loaded before the SA . This is especially important if you removed the data folder, otherwise the SA might be started first and it will most probably fail in classpath problems.
--------------

> Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.
> --------------------------------------------------------------------------------
>
>                 Key: SM-2016
>                 URL: https://issues.apache.org/jira/browse/SM-2016
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-assembly
>    Affects Versions: 3.3.2
>         Environment: RHEL
>            Reporter: Sandeep T H
>
> Some of our SAs contain SUs which refer to some shared libraries.
> Eg:
> In our cxf-se su:
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" >
> <classpath>
>   <library>common-shareLib</library>
> But sometimes this SA/SU fails to deploy with the errors:
>  java.lang.IllegalStateException  No such shared library common-sharedLib.
> Maybe this is because the SA/SU is deployed before the shared library is deployed. As we've seen if the shared lib is deployed first this problem is not seen.
> We've also tried adding this shared lib as a dependency in cxf-se su pom. But it does not help.
> It is not specific to cxf-se it is seen for other component su's too
> What is the recommended way here?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SM-2016) Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.

Posted by "Sandeep T H (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SM-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandeep T H updated SM-2016:
----------------------------

    Issue Type: Bug  (was: Improvement)

> Wait for Shared libraries referred in classpath tag of xbean.xml to be deployed.
> --------------------------------------------------------------------------------
>
>                 Key: SM-2016
>                 URL: https://issues.apache.org/jira/browse/SM-2016
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-assembly
>    Affects Versions: 3.3.2
>         Environment: RHEL
>            Reporter: Sandeep T H
>
> Some of our SAs contain SUs which refer to some shared libraries.
> Eg:
> In our cxf-se su:
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" >
> <classpath>
>   <library>common-shareLib</library>
> But sometimes this SA/SU fails to deploy with the errors:
>  java.lang.IllegalStateException  No such shared library common-sharedLib.
> Maybe this is because the SA/SU is deployed before the shared library is deployed. As we've seen if the shared lib is deployed first this problem is not seen.
> We've also tried adding this shared lib as a dependency in cxf-se su pom. But it does not help.
> It is not specific to cxf-se it is seen for other component su's too
> What is the recommended way here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.