[jira] Created: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
----------------------------------------------------------------------------------------------

                 Key: CAMEL-1092
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 1.5.1
            Reporter: Seumas Soltysik
             Fix For: 1.5.1


When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea reassigned CAMEL-1092:
--------------------------------------

    Assignee: Hadrian Zbarcea

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Work started: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1092 started by Hadrian Zbarcea.

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47405#action_47405 ]

Claus Ibsen commented on CAMEL-1092:
------------------------------------

Seumas do you run it in an OSGi platform?

The imports for OSGi bundle classes should only kick in if Camel have determine that the classloader is a OSGi bundle loader.

You can enable TRACE logging (eg Log4j set level to TRACE) and it will spit out a lot of useful logs for Hadrian to check out.

BTW: I am wondering if we should add somekind of flag to control this behavior so you can force it to not scan OSGi bundles. And Gerv has some ideas to improve the OSGi stuff for 2.0.
There is another ticket somewehere about this.

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47508#action_47508 ]

William Tam commented on CAMEL-1092:
------------------------------------

Also, you don't want to have camel-osgi jar in your classpath, if you are using Spring to inject CamelContext but not running camel in OSGi container.  Otherwise, the org.apache.camel.osgi.CamelNamespaceHandler takes over and it tries to load classes from OSGi packages.

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47519#action_47519 ]

Hadrian Zbarcea commented on CAMEL-1092:
----------------------------------------

This is not entirely accurate.  It depends on the namespace.  For camel-osgi, camelContext is in the "http://activemq.apache.org/camel/schema/osgi" namespace.  If that namespace is used org.apache.camel.osgi.CamelNamespaceHandler takes over.

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam updated CAMEL-1092:
-------------------------------

    Attachment: test.tar.gz

I wasn't entirely accurate.   Here is what I saw.  If both camel-osgi and spring-osgi-core jars are present in the classpath, then the OSGI version of the SpringCamelContext will kick in even though the namespace does not specify the osgi one.  I am not sure how it happens.  Any enlightenment would be appreciated.  Spring must have pulled some magic. :-)  It is nice because the route configuration does not have to know anything about osgi (namespace) and it just works in either environment.  The attached test case can demonstrate that behavior.  Uncomment the spring-osgi-core-1.1.2.jar line in the build.xml and set it to the jar location, then run "ant router" target  It will fail with  "java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext".   Before running the ant.

1) Get 1.5.0 binary distribution and untar it.
2) Set CAMEL_HOME to the camel installation directory
3) Untar the test.tar to CAMEL_HOME directory


> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>         Attachments: test.tar.gz
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47538#action_47538 ]

Hadrian Zbarcea commented on CAMEL-1092:
----------------------------------------

@William, thanks for the test.  I banged my head against this one for 2 days now.  I think I know what the problem is.    OSGI awareness is sort built into the core assuming that osgi is always used with camel-osgi, which is obviously not the case.  I think it's our bug, not Spring's magic.

I think I'm almost done with this.  I only have a chicken'n'egg bootstrapping issue to fix, but I badly need a bit of luck.

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>         Attachments: test.tar.gz
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47545#action_47545 ]

William Tam commented on CAMEL-1092:
------------------------------------

Thanks Hadrian.   Good luck with the fix.   I believe we are actually talking about different issues.    I guess mine isn't really an issue.  FYI,  my mystery has been solved.  It is the org.apache.camel.spring.handler.CamelNamspaceHandler.init() method doing the trick.

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>         Attachments: test.tar.gz
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-1092) core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-1092.
---------------------------------

    Resolution: Fixed

I think this issue is resolved with CAMEL-1240

> core\src\main\java\org\apache\camel\util\ResolverUtil.java has dependency on OSGi Bundle class
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1092
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1092
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.1
>            Reporter: Seumas Soltysik
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.1
>
>         Attachments: test.tar.gz
>
>
> When running a Camel router scenario, I am getting a ClassNotFoundError  for the OSGi Bundle class from the ResolverUtil class. It seems like this code should be in the camel-osgi bundle or perhaps should be more reflection based.

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