Hello all, I created a sample project, to understand how things work with aries. The project is using JPA, and hoping to add/use EJB in the future.
To do this, I have create this project https://github.com/mansour77/examples, and deployed its modules as an exploded bundles using felix fileinstall. However, I am unable to complete this simple project properly. I looked in the samples that came with the source code, and did not know how to deploy them into an existing karaf instance. The errors I am getting when I try to run the sample: 2013-10-08 19:50:04,451 | WARN | nce-model/target | fileinstall | 17 - org.apache.felix.fileinstall - 3.2.6 | Error while starting bundle: jardir:/home/mansour/workspace/examples/karaf-jpa/persistence-model/target/classes org.osgi.framework.BundleException: Unresolved constraint in bundle persistence-model [217]: Unable to resolve 217.1: missing requirement [217.1] osgi.wiring.package; (&(osgi.wiring.package=org.apache.openjpa.persistence)(version>=2.2.0)(!(version>=3.0.0))) at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1247)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1219)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1208)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:503)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[17:org.apache.felix.fileinstall:3.2.6] 2013-10-08 19:50:04,451 | WARN | nce-model/target | fileinstall | 17 - org.apache.felix.fileinstall - 3.2.6 | Error while starting bundle: jardir:/home/mansour/workspace/examples/karaf-jpa/persistence-model/target/classes The reason, "as far as I understand" is that karaf can not see openJpa jar. I am not sure why ?? If I remove : org.apache.openjpa.persistence , from: <Import-Package> !javax.validation.* , !javax.servlet.* , !org.apache.tools.ant.* , !javax.crypto.* , !com.ibm.* , !org.apache.derby.iapi.services.sanity , !org.apache.derby.impl.drda , !org.postgresql.* , !org.apache.commons.dbcp , !org.apache.derby.shared.common.sanity , org.apache.openjpa.persistence , * </Import-Package> Then I get this error after it times out: 2013-10-08 19:52:50,806 | DEBUG | Local user karaf | ServiceRecipe | 27 - org.apache.aries.blueprint.core - 1.1.1.SNAPSHOT | Method exit: getService, returning org.apache.karaf.shell.console.commands.BlueprintCommand@1ce829c 2013-10-08 19:52:50,806 | DEBUG | Local user karaf | BlueprintContainerImpl | 27 - org.apache.aries.blueprint.core - 1.1.1.SNAPSHOT | Instantiating component shell-231 2013-10-08 19:52:50,807 | DEBUG | Local user karaf | BlueprintContainerImpl | 27 - org.apache.aries.blueprint.core - 1.1.1.SNAPSHOT | Instantiating component blueprintBundleContext 2013-10-08 19:57:42,886 | DEBUG | rint Extender: 3 | ReferenceRecipe | 27 - org.apache.aries.blueprint.core - 1.1.1.SNAPSHOT | Unbinding reference .component-1 2013-10-08 19:57:42,886 | ERROR | rint Extender: 3 | BlueprintContainerImpl | 27 - org.apache.aries.blueprint.core - 1.1.1.SNAPSHOT | Unable to start blueprint container for bundle persistence-model due to unresolved dependencies [(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:328)[27:org.apache.aries.blueprint.core:1.1.1.SNAPSHOT] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[27:org.apache.aries.blueprint.core:1.1.1.SNAPSHOT] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_13] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_13] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_13] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_13] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_13] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_13] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_13] at java.lang.Thread.run(Thread.java:722)[:1.7.0_13] 2013-10-08 19:57:42,886 | DEBUG | rint Extender: 3 | BlueprintEventDispatcher | 27 - org.apache.aries.blueprint.core - 1.1.1.SNAPSHOT | Sending blueprint container event BlueprintEvent[type=FAILURE, dependencies=[(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))(objectClass=javax.persistence.EntityManagerFactory))], exception=null] for bundle persistence-model 2013-10-08 19:57:42,886 | DEBUG | nt Dispatcher: 1 | BlueprintListener | 1 - org.apache.karaf.bundle.core - 3.0.0.SNAPSHOT | Blueprint app state changed to Failure for bundle 220 My question is, how can I get the samples with aries to deploy to existing karaf ? I am sure answring this question will lead me to know what is wrong with the prototype I have. Thank you.
