You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Christian Mueller (JIRA)" <ji...@apache.org> on 2009/09/16 10:35:13 UTC

[jira] Updated: (SM-1876) Unable to create a camel-jpa route inside Servicemix

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

Christian Mueller updated SM-1876:
----------------------------------

    Attachment: serp-1.13.1-SNAPSHOT.patch

Hello Willem,

I have build an osgi bundle for the serp library with the maven-shade-plugin (please see attachment serp-1.13.1-SNAPSHOT.patch) and I have deployed this bundle to ServiceMix. Now, the Exception "java.lang.NoClassDefFoundError: serp/util/Strings" is not thrown, but an other exception:

{code}
smx@root:osgi> install mvn:de.ps4b.rfid/jpa-event-reader    
ERROR: EventDispatcher: Error during dispatch. (java.lang.NoSuchMethodError: org.apache.openjpa.persistence.PersistenceProductDerivation.setDefaultPersistenceFiles(Ljava/util/List;)V)
java.lang.NoSuchMethodError: org.apache.openjpa.persistence.PersistenceProductDerivation.setDefaultPersistenceFiles(Ljava/util/List;)V
        at org.apache.servicemix.bundles.openjpa.Activator.resetDefaultPersistenceFiles(Activator.java:79)
        at org.apache.servicemix.bundles.openjpa.Activator.register(Activator.java:63)
        at org.apache.servicemix.specs.locator.Activator.bundleChanged(Activator.java:88)
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:771)
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:700)
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3382)
        at org.apache.felix.framework.Felix.access$500(Felix.java:39)
        at org.apache.felix.framework.Felix$FelixResolver.markBundleResolved(Felix.java:3853)
        at org.apache.felix.framework.Felix$FelixResolver.markResolvedModules(Felix.java:3785)
        at org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:3666)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3053)
        at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3028)
        at org.apache.felix.framework.Felix.findBundleEntries(Felix.java:1268)
        at org.apache.felix.framework.BundleImpl.findEntries(BundleImpl.java:223)
        at org.apache.servicemix.kernel.gshell.features.internal.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:164)
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:771)
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:700)
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3382)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2219)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2005)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
        at org.apache.servicemix.kernel.gshell.osgi.InstallBundle.install(InstallBundle.java:65)
        at org.apache.servicemix.kernel.gshell.osgi.InstallBundle.doExecute(InstallBundle.java:41)
        at org.apache.servicemix.kernel.gshell.core.OsgiCommandSupport.execute(OsgiCommandSupport.java:48)
        at org.apache.geronimo.gshell.wisdom.command.CommandSupport.executeAction(CommandSupport.java:303)
        at org.apache.geronimo.gshell.wisdom.command.StatefulCommand.executeAction(StatefulCommand.java:94)
        at org.apache.geronimo.gshell.wisdom.command.CommandSupport.execute(CommandSupport.java:194)
        at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
        at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:57)
        at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy25.execute(Unknown Source)
        at org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.doExecute(CommandLineExecutorImpl.java:127)
        at org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.execute(CommandLineExecutorImpl.java:106)
        at org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor$1.run(ExecutingVisitor.java:208)
        at org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.executePiped(ExecutingVisitor.java:231)
        at org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.visit(ExecutingVisitor.java:107)
        at org.apache.geronimo.gshell.parser.ASTExpression.jjtAccept(ASTExpression.java:17)
        at org.apache.geronimo.gshell.parser.SimpleNode.childrenAccept(SimpleNode.java:61)
        at org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.visit(ExecutingVisitor.java:90)
        at org.apache.geronimo.gshell.parser.ASTCommandLine.jjtAccept(ASTCommandLine.java:17)
        at org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl$1.execute(CommandLineBuilderImpl.java:96)
        at org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.execute(CommandLineExecutorImpl.java:71)
        at org.apache.geronimo.gshell.wisdom.shell.ShellImpl.execute(ShellImpl.java:172)
        at org.apache.geronimo.gshell.wisdom.shell.ShellImpl$2.execute(ShellImpl.java:208)
        at org.apache.geronimo.gshell.console.Console.work(Console.java:187)
        at org.apache.geronimo.gshell.console.Console.run(Console.java:128)
        at org.apache.geronimo.gshell.wisdom.shell.ShellImpl.run(ShellImpl.java:252)
        at org.apache.servicemix.kernel.gshell.core.ShellWrapper.run(ShellWrapper.java:81)
        at org.apache.servicemix.kernel.gshell.core.LocalConsole.run(LocalConsole.java:125)
        at java.lang.Thread.run(Thread.java:637)
{code}

I have compiled the bundles and specs with Java 1.5 and my runtime environment is Java 1.6. May be this a problem?

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
>         Attachments: serp-1.13.1-SNAPSHOT.patch
>
>
> 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&#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:
> smx@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.