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

Willem Jiang edited comment on CAMEL-2267 at 12/16/09 5:17 PM:
---------------------------------------------------------------

I and Charles tested the camel-example-etl bundle on Karaf 1.1.0-SNAPSHOT and 
Karaf 1.2.0.

Current the camel-example-etl openjpa bundle can work perfectly within 
Kara-felix.
As Felix has [an issue|https://issues.apache.org/jira/browse/FELIX-1919] to 
load the fragment bundle  of hibernate, so we doesn't test it.

When we switch the Karaf to use equinox as the OSGi kernel,  
I Got this error on Mac with JDK 1.5.0
{code}
Caused by: java.lang.ClassNotFoundException: 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory not found from bundle 
[org.apache.camel.camel-example-etl]
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at 
org.apache.openjpa.kernel.Bootstrap.getFactoryClass(Bootstrap.java:157)
        ... 41 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
        at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
        at 
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
        at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
        ... 47 more
{code}

This error can be resolved by modify the spring-orm bundle's manifest file, you 
need to add Dynamic-Import: * to spring-orm manifest as a walk around of this 
[Spring orm issue|https://issuetracker.springsource.com/browse/DMS-1114] 



      was (Author: njiang):
    I and Charles tested the camel-example-etl bundle on Karaf 1.1.0-SNAPSHOT 
and Karaf 1.2.0.

Current the camel-example-etl openjpa bundle can work perfectly within 
Kara-felix.
As Felix has [an issue|https://issues.apache.org/jira/browse/FELIX-1919] to 
load the fragment bundle  of hibernate, so we doesn't test it.

When we switch the Karaf to use equinox as the OSGi kernel,  
I Got this error on Mac with JDK 1.5.0
{code}
Caused by: java.lang.ClassNotFoundException: 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory not found from bundle 
[org.apache.camel.camel-example-etl]
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at 
org.apache.openjpa.kernel.Bootstrap.getFactoryClass(Bootstrap.java:157)
        ... 41 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
        at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
        at 
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
        at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
        ... 47 more
{code}

This error can be resolved by modify the spring-orm bundle's manifest file, you 
need to add Dynamic-Import: * to spring-orm manifest.


  
> Get camel-example-etl to work with OSGi (ServiceMix Karaf)
> ----------------------------------------------------------
>
>                 Key: CAMEL-2267
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2267
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: examples
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.2.0
>
>
> Support the generate different bundles with different profile ( using 
> hibernate,  openjpa).

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

Reply via email to