Huluvu424242 / karaf.example

Beispielapp in Karaf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

[karaf-4.0.4 ] JPA Command does not work #8

Open Huluvu424242 opened 8 years ago

Huluvu424242 commented 8 years ago

2016-04-17 23:22:40,233 | ERROR | nsole user karaf | ShellUtil | 44 - org.apache.karaf.shell.core - 4.0.4 | Exception caught while executing command java.lang.NullPointerException at com.github.funthomas424242.karaf.inventory.CreateCategoryCommand.execute(CreateCategoryCommand.java:31)[120:inventory-command:1.0.2.SNAPSHOT] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.4] at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.4] at java.lang.Thread.run(Thread.java:745)[:1.8.0_77]

Huluvu424242 commented 8 years ago

I could not determine the cause. Fact:

  1. the injection of broker to createCategoryCommand does not work.
  2. the blueprint is not clear.
Huluvu424242 commented 8 years ago

Maybe dependency problems. After a clean new installation of karaf-4.0.4 and an execution of karaf.init this was found in the log:display:

2016-04-17 23:32:29,355 | ERROR | nsole user karaf | ShellUtil | 44 - org.apache.karaf.shell.core - 4.0.4 | Exception caught while executing command org.apache.karaf.features.internal.util.MultiException: Error restarting bundles at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:848)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1089)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:985)[9:org.apache.karaf.features.core:4.0.4] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_77] at java.lang.Thread.run(Thread.java:745)[:1.8.0_77] Caused by: org.osgi.framework.BundleException: Activator start error in bundle org.apache.openjpa [89]. at org.apache.felix.framework.Felix.activateBundle(Felix.java:2276)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)[org.apache.felix.framework-5.4.0.jar:] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1199)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:840)[9:org.apache.karaf.features.core:4.0.4] ... 6 more Caused by: java.lang.NoClassDefFoundError: javax/transaction/SystemException at org.apache.openjpa.persistence.osgi.PersistenceActivator.start(PersistenceActivator.java:61) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226) ... 11 more Caused by: java.lang.ClassNotFoundException: javax.transaction.SystemException not found by org.apache.openjpa [89] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)[org.apache.felix.framework-5.4.0.jar:] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_77] ... 14 more