Hi Stephen,

I have removed <jpa:context> and <tx:transaction> tags in xml file and added 

<jpa:enable/> and <tx:enable/>

Below is my blueprint file

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
           xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0";
           xmlns:tx="http://aries.apache.org/xmlns/transactions/v2.0.0";
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
           http://aries.apache.org/xmlns/jpa/v2.0.0
           http://aries.apache.org/xmlns/transactions/v2.0.0";>
           
     <jpa:enable/>
    <tx:enable/>
        
        <bean id="storeDaoImpl" class="com.data.dao.impl.StoreDaoImpl" >
        
        </bean>
        
        <service id="storeDao" ref="storeDaoImpl"
interface="com.data.dao.api.StoreDao" />
        
        <bean id="addCmd" class="com.data.dao.cli.StoreAddCommand">
                <property name="storeDao" ref="storeDao" />
        </bean>
        
                
</blueprint>


When I build and run in container, below exception is throwing

java.lang.IllegalArgumentException: No matching bundles
        at
org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:59)
[22:org.apache.karaf.bundle.core:4.1.0]
        at
org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)
[22:org.apache.karaf.bundle.core:4.1.0]
        at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
[43:org.apache.karaf.shell.core:4.1.0]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)
[43:org.apache.karaf.shell.core:4.1.0]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:82)
[43:org.apache.karaf.shell.core:4.1.0]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:552)
[43:org.apache.karaf.shell.core:4.1.0]
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:478)
[43:org.apache.karaf.shell.core:4.1.0]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:367)
[43:org.apache.karaf.shell.core:4.1.0]
        at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
[43:org.apache.karaf.shell.core:4.1.0]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
[43:org.apache.karaf.shell.core:4.1.0]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
[43:org.apache.karaf.shell.core:4.1.0]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:?]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:?]
        at java.lang.Thread.run(Thread.java:745) [?:?]
2017-06-09T15:29:26,814 | ERROR | Blueprint Extender: 1 |
BlueprintContainerImpl           | 12 - org.apache.aries.blueprint.core -
1.7.1 | Unable to start blueprint container for bundle
DemoProject.DemoData/0.0.1.SNAPSHOT due to unresolved dependencies
[(&(osgi.unit.name=store)(objectClass=javax.persistence.EntityManager))]
java.util.concurrent.TimeoutException
        at
org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:371)
[12:org.apache.aries.blueprint.core:1.7.1]
        at
org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
[12:org.apache.aries.blueprint.core:1.7.1]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[?:?]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[?:?]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:?]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:?]
        at java.lang.Thread.run(Thread.java:745) [?:?]




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Hibernate-JPA-and-Karaf-4-tp4050569p4050643.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to