karaf3.0.0内置了openjpa 2.3.0的features,但这个feature安装后,会报Bundle sys.impl is waiting for dependencies [(&(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=ariestrader-cm))(objectClass=javax.persistence.EntityManagerFactory))] 这个错误,导致bundle不能正常生成EntityManagerFactory服务。先把好使的feature贴出来吧。
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0">
<feature name="openjpa" version="2.3.0">
<bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
<bundle>mvn:commons-lang/commons-lang/2.6</bundle>
<bundle>mvn:commons-pool/commons-pool/1.6</bundle>
<bundle>mvn:com.google.guava/guava/15.0</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.2</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.serp/1.14.1_1</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-collections/3.2.1_3</bundle>
<bundle>mvn:org.apache.xbean/xbean-asm4-shaded/3.16</bundle>
<bundle>mvn:org.apache.openjpa/openjpa/2.3.0</bundle>
</feature>
</features>
按照上面的配置,可以正常启动openjpa。