[
https://issues.apache.org/activemq/browse/SM-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54255#action_54255
]
Christian Mueller commented on SM-1876:
---------------------------------------
Hello Willem,
I have build the two bundles and added the bundles to my Servicemix instance:
{code}
...
[ 107] [Active ] [ ] [ 60] Apache ServiceMix Specs :: SAAJ API 1.3
(1.3.0.fuse)
[ 108] [Active ] [ ] [ 60] geronimo-jaxws_2.1_spec (1.0)
[ 109] [Active ] [ ] [ 60] geronimo-ws-metadata_2.0_spec (1.1.2)
[ 110] [Active ] [ ] [ 60] geronimo-el_1.0_spec (1.0.1)
[ 111] [Active ] [ ] [ 60] spring-web (2.5.5)
[ 112] [Active ] [ ] [ 60] Spring JDBC (2.5.6)
[ 113] [Active ] [ ] [ 60] Commons Lang (2.4)
[ 114] [Active ] [ ] [ 60] Commons Collections (3.2.1)
[ 115] [Active ] [ ] [ 60] geronimo-jpa_3.0_spec (1.1.1)
[ 117] [Active ] [ ] [ 60] Apache ServiceMix Bundles:
commons-dbcp-1.2.2 (1.2.2.3)
[ 118] [Active ] [ ] [ 60] Apache ServiceMix Bundles: oscache-2.4
(2.4.0.fuse)
[ 119] [Active ] [ ] [ 60] Apache ServiceMix Bundles:
ibatis-sqlmap-2.3.4.726 (2.3.4.726_1)
[ 120] [Active ] [ ] [ 60] Spring ORM (2.5.6)
[ 121] [Active ] [ ] [ 60] camel-jpa (1.6.1.fuse)
[ 122] [Active ] [ ] [ 60] Apache ServiceMix Specs :: JAVA
PERSISTENCE API 1.4 (1.4.0.SNAPSHOT)
[ 123] [Active ] [ ] [ 60] Apache ServiceMix Bundles: openjpa-1.2.1
(1.2.1.SNAPSHOT)
[ 124] [Active ] [ ] [ 60] camel-jms (1.6.1.fuse)
[ 126] [Active ] [ ] [ 60] Apache Derby 10.5 (10.5.3000000.802917)
[ 127] [Installed ] [ ] [ 60] PS4B :: jpa-event-reader (0.0.1)
{code}
But now, I receive the exception, that the class "serp.util.Strings" was not
found. So, I have to wrap this library as an OSGI bundle and add this bundle to
Servicemix...
{code}
Exception in thread "SpringOsgiExtenderThread-38"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'entityManagerFactory' defined in URL
[bundle://127.0:0/META-INF/spring/bundle-context.xml]: Invocation of init
method failed; nested exception is java.lang.NoClassDefFoundError:
serp/util/Strings
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:68)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoClassDefFoundError: serp/util/Strings
at
org.apache.openjpa.lib.conf.Configurations.newInstance(Configurations.java:198)
at
org.apache.openjpa.lib.conf.ObjectValue.newInstance(ObjectValue.java:109)
at
org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:102)
at
org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
at
org.apache.openjpa.lib.conf.ConfigurationImpl.getLogFactory(ConfigurationImpl.java:206)
at
org.apache.openjpa.lib.conf.ConfigurationImpl.getLog(ConfigurationImpl.java:223)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.getConfigurationLog(OpenJPAConfigurationImpl.java:1445)
at
org.apache.openjpa.lib.conf.ConfigurationImpl.loadGlobals(ConfigurationImpl.java:188)
at
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfigurationImpl.java:333)
at
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfigurationImpl.java:110)
at
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfigurationImpl.java:101)
at
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newInstance(JDBCBrokerFactory.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java:124)
at
org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:62)
at
org.apache.openjpa.persistence.PersistenceProviderImpl.getBrokerFactory(PersistenceProviderImpl.java:102)
at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:81)
at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:109)
at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:53)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:105)
at
org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:91)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 17 more
Caused by: java.lang.ClassNotFoundException: serp.util.Strings
at
org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:558)
at
org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)
at
org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
... 44 more
{code}
I hope I can work tomorrow on this...
Regards,
Christian
> Unable to create a camel-jpa route inside Servicemix
> ----------------------------------------------------
>
> Key: SM-1876
> URL: https://issues.apache.org/activemq/browse/SM-1876
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Environment: OS: Mac OS X 10.5.7 (9J3050)
> Java: java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
> Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)
> ServiceMix Version: FUSE ESB 4.1.0.2
> Reporter: Christian Mueller
>
> It looks like, that it's not possible at the moment to deploy a camel-jpa
> route into ServiceMix and get it working. In the fuse forum, we discussed
> this problem for one month, but without a working solution:
> http://fusesource.com/forums/thread.jspa?messageID=3212ಌ
> Today, I tried the new version of FUSE ESB 4.1.0.2, but without luck. I
> receive a "java.lang.NoClassDefFoundError:
> javax/persistence/EntityManagerFactory", even though the
> "geronimo-jpa_3.0_spec (1.1.1)" bundle is active and my bundle imports the
> "javax.persistence" package:
> s...@root:osgi> Exception in thread "SpringOsgiExtenderThread-42"
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'entityManagerFactory' defined in URL
> [bundle://120.0:0/META-INF/spring/bundle-context.xml]: Initialization of bean
> failed; nested exception is java.lang.NoClassDefFoundError:
> javax/persistence/EntityManagerFactory
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
> at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:68)
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)
> at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)
> at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
> at java.lang.Thread.run(Thread.java:613)
> Caused by: java.lang.NoClassDefFoundError:
> javax/persistence/EntityManagerFactory
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
> at java.lang.Class.getDeclaredMethods(Class.java:1763)
> at java.beans.Introspector$1.run(Introspector.java:1265)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
> at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1129)
> at java.beans.Introspector.getBeanInfo(Introspector.java:387)
> at java.beans.Introspector.getBeanInfo(Introspector.java:159)
> at java.beans.Introspector.getBeanInfo(Introspector.java:220)
> at java.beans.Introspector.<init>(Introspector.java:368)
> at java.beans.Introspector.getBeanInfo(Introspector.java:159)
> at
> org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:220)
> at
> org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
> at
> org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
> at
> org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282)
> at
> org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
> ... 16 more
> Christian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.