You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Philippe Pinheiro (JIRA)" <ji...@apache.org> on 2006/04/06 10:18:49 UTC

[jira] Created: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

JBI Spec - Resource Loading Styles not correctly implemented
------------------------------------------------------------

         Key: SM-387
         URL: https://issues.apache.org/activemq/browse/SM-387
     Project: ServiceMix
        Type: Bug

  Components: servicemix-core  
    Versions: 3.0    
    Reporter: Philippe Pinheiro


In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
located on the classpath of the JBI component.

The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Philippe Pinheiro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-387?page=comments#action_35996 ] 

Philippe Pinheiro commented on SM-387:
--------------------------------------

It's now working, thanks for your quick reply

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>          Key: SM-387
>          URL: https://issues.apache.org/activemq/browse/SM-387
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-core
>     Versions: 3.0
>     Reporter: Philippe Pinheiro

>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Philippe Pinheiro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-387?page=comments#action_35993 ] 

Philippe Pinheiro commented on SM-387:
--------------------------------------

I''m installing a JBI component  that must load a configuration file with its classloader getResource.

In the jbi.xml I set the component classpath :

  <component-class-path>
  <path-element>lib/Install.jar</path-element>
  <path-element>conf.xml</path-element>
  </component-class-path>

And I include the file "conf.xml" on the component jar.

When the component start it doesn't found the resource "conf.xml" but it can load classes of Install.jar.

If I manually put  "conf.xml" on the folder servicemix/conf  then the component found it.

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>          Key: SM-387
>          URL: https://issues.apache.org/activemq/browse/SM-387
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-core
>     Versions: 3.0
>     Reporter: Philippe Pinheiro

>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-387?page=comments#action_35991 ] 

Guillaume Nodet commented on SM-387:
------------------------------------

I have just added some tests to check that the getResource works as expected (and it seems to work).
Could you be more precise on what happens for you ?

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>          Key: SM-387
>          URL: https://issues.apache.org/activemq/browse/SM-387
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-core
>     Versions: 3.0
>     Reporter: Philippe Pinheiro

>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Philippe Pinheiro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38485 ] 

Philippe Pinheiro commented on SM-387:
--------------------------------------

Jeff,

On the jbi.xml file of the component I added the line

<path-element>conf</path-element>

inside the <component-class-path> element, conf is a folder of the component zip containing the configuration files.
Then the component classloader checks inside this folder when I do a getResource from the component.

Philippe

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>                 Key: SM-387
>                 URL: https://issues.apache.org/activemq/browse/SM-387
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-core
>    Affects Versions: 3.0.1
>            Reporter: Philippe Pinheiro
>             Fix For: 3.0.1
>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

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


[jira] Commented: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Jeff Black (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38484 ] 

Jeff Black commented on SM-387:
-------------------------------

Philippe,

What was your final solution here?


Jeff

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>                 Key: SM-387
>                 URL: https://issues.apache.org/activemq/browse/SM-387
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-core
>    Affects Versions: 3.0.1
>            Reporter: Philippe Pinheiro
>             Fix For: 3.0.1
>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

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


[jira] Closed: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Philippe Pinheiro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-387?page=all ]
     
Philippe Pinheiro closed SM-387:
--------------------------------

    Fix Version: 3.0
     Resolution: Fixed

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>          Key: SM-387
>          URL: https://issues.apache.org/activemq/browse/SM-387
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-core
>     Versions: 3.0
>     Reporter: Philippe Pinheiro
>      Fix For: 3.0

>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SM-387) JBI Spec - Resource Loading Styles not correctly implemented

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-387?page=comments#action_35995 ] 

Guillaume Nodet commented on SM-387:
------------------------------------

Path elements are added to the classpath.  A path element must specify a directory or a jar, not a single file.
You can either put <path-element>.</path-element>, or put the conf.xml file in a directory.

> JBI Spec - Resource Loading Styles not correctly implemented
> ------------------------------------------------------------
>
>          Key: SM-387
>          URL: https://issues.apache.org/activemq/browse/SM-387
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-core
>     Versions: 3.0
>     Reporter: Philippe Pinheiro

>
>
> In the current version of ParentFirstClassLoader.java and SelfFirstClassLoader.java, the method getResource doesn't  find a resource
> located on the classpath of the JBI component.
> The Class Loading Styles (self-first and parent-first) are correctly implemented but it should be not the Resource Loading.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira