Karaf 4.2.9 上的 OPS4J Pax CDI 示例 1

OPS4J Pax CDI Sample1 on Karaf 4.2.9

我有一个 karaf 服务器。我下载了ops4j and try CDI in sample1。不幸的是,servlet 没有启动并保持在状态 deploying.

karaf@root()> list
START LEVEL 100 , List Threshold: 50
 ID │ State  │ Lvl │ Version        │ Name
────┼────────┼─────┼────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 22 │ Active │  80 │ 4.2.9          │ Apache Karaf :: OSGi Services :: Event
 61 │ Active │  80 │ 4.17.0         │ Apache XBean OSGI Bundle Utilities
 62 │ Active │  80 │ 4.17.0         │ Apache XBean :: Classpath Resource Finder
 83 │ Active │  80 │ 8.0.1          │ org.objectweb.asm
 84 │ Active │  80 │ 8.0.1          │ org.objectweb.asm.commons
 85 │ Active │  80 │ 8.0.1          │ org.objectweb.asm.tree
 94 │ Active │  80 │ 1.1.3          │ OPS4J Pax CDI Bean Bundle API
117 │ Active │  80 │ 1.2.0          │ CDI APIs
118 │ Active │  80 │ 1.2            │ javax.interceptor API
119 │ Active │  80 │ 2.4.0          │ javax.inject:1 as OSGi bundle
124 │ Active │  80 │ 1.1.3          │ OPS4J Pax CDI Portable Extension for OSGi
125 │ Active │  80 │ 1.1.3          │ OPS4J Pax CDI Service Provider Interface
126 │ Active │  80 │ 1.1.3          │ OPS4J Pax CDI Sample1
128 │ Active │  80 │ 2.2            │ Java(TM) Persistence API jar
129 │ Active │  80 │ 1.1.4.SNAPSHOT │ OPS4J Pax CDI Extender for Bean Bundles
130 │ Active │  80 │ 1.1.4.SNAPSHOT │ OPS4J Pax CDI Sample1 WAB
167 │ Active │  80 │ 1.1.4.SNAPSHOT │ OPS4J Pax CDI Sample1 Client
168 │ Active │  80 │ 0              │ tomcat-sample
karaf@root()> web:list
ID  │ State       │ Web-State   │ Level │ Web-ContextPath │ Name
────┼─────────────┼─────────────┼───────┼─────────────────┼───────────────────────────────────────────
130 │ Active      │ Deploying   │ 80    │ /sample1        │ OPS4J Pax CDI Sample1 WAB (1.1.4.SNAPSHOT)
168 │ Active      │ Deployed    │ 80    │ /sample         │ tomcat-sample (0)
karaf@root()> http:list
ID  │ Servlet           │ Servlet-Name             │ State       │ Alias               │ Url
────┼───────────────────┼──────────────────────────┼─────────────┼─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
162 │ ResourceServlet   │ /system/console/res:/res │ Deployed    │ /system/console/res │ [/system/console/res/*]
162 │ KarafOsgiManager  │ ServletModel-8           │ Deployed    │ /system/console     │ [/system/console/*]
168 │                   │ HelloServlet             │ Deployed    │                     │ [/sample/hello]
168 │ ResourceServlet   │ default                  │ Deployed    │ /sample/            │ [/sample/]
168 │ JspServletWrapper │ jsp                      │ Deployed    │                     │ [/sample/*.jsp, /sample/*.jspx, /sample/*.jspf, /sample/*.xsp, /sample/*.JSP, /sample/*.JSPX, /sample/*.JSPF, /sample/*.XSP]
karaf@root()>           
karaf@root()> log:display
16:30:22.941 INFO [activator-1-thread-2] Unregistering org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@780ed74 with name osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.942 INFO [activator-1-thread-2] Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@780ed74 with name osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.942 INFO [activator-1-thread-2] Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@780ed74 with name osgi.core:type=framework,version=1.7,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.943 INFO [activator-1-thread-2] Unregistering org.osgi.jmx.framework.PackageStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@780ed74 with name osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.943 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.log.core/4.2.9
16:30:22.943 INFO [activator-1-thread-2] Unregistering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@780ed74 with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.944 WARN [activator-1-thread-2] Task rejected for JMX Notification dispatch of event [org.osgi.framework.ServiceEvent[source=[javax.management.MBeanServer]]] - Dispatcher may have been shutdown
16:30:22.946 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.package.core/4.2.9
16:30:22.957 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.service.core/4.2.9
16:30:22.964 INFO [activator-1-thread-2] Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@5a8afac5 with name osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.964 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.shell.commands/4.2.9
16:30:22.964 INFO [activator-1-thread-2] Registering org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@5a8afac5 with name osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.965 INFO [activator-1-thread-2] Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@5a8afac5 with name osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.965 INFO [activator-1-thread-2] Registering org.osgi.jmx.framework.FrameworkMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@5a8afac5 with name osgi.core:type=framework,version=1.7,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.966 INFO [activator-1-thread-2] Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@5a8afac5 with name osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:22.966 INFO [activator-1-thread-2] Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer org.apache.karaf.management.internal.EventAdminMBeanServerWrapper@5a8afac5 with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=ec4f77c5-58f8-41bf-aeca-eafc9da76fb7
16:30:23.094 INFO [FelixStartLevel] Command registration delayed for bundle org.apache.karaf.shell.ssh/4.2.9. Missing service: [org.apache.sshd.server.SshServer]
16:30:23.105 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.system.core/4.2.9
16:30:23.175 INFO [activator-1-thread-1] Registering commands for bundle org.apache.karaf.shell.ssh/4.2.9
16:30:23.178 INFO [FelixStartLevel] Command registration delayed for bundle org.apache.karaf.http.core/4.2.9. Missing service: [org.apache.karaf.http.core.ServletService, org.apache.karaf.http.core.ProxyService]
16:30:23.218 INFO [FelixStartLevel] Activating the Apache Karaf ServiceComponentRuntime MBean
16:30:23.224 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.scr.state/4.2.9
16:30:23.232 INFO [activator-1-thread-2] Deployment finished. Registering FeatureDeploymentListener
16:30:23.232 INFO [activator-1-thread-2] Registering commands for bundle org.apache.karaf.features.command/4.2.9
16:30:23.234 INFO [activator-1-thread-3] Registering commands for bundle org.apache.karaf.kar.core/4.2.9
16:30:23.294 INFO [FelixStartLevel] Logging initialized @1488ms to org.eclipse.jetty.util.log.Slf4jLog
16:30:23.304 INFO [FelixStartLevel] EventAdmin support enabled, servlet events will be postet to topics.
16:30:23.306 INFO [FelixStartLevel] LogService support enabled, log events will be created.
16:30:23.308 INFO [FelixStartLevel] Pax Web started
16:30:23.366 INFO [FelixStartLevel] Command registration delayed for bundle org.apache.karaf.web.core/4.2.9. Missing service: [org.apache.karaf.web.WebContainerService]
16:30:23.395 INFO [activator-1-thread-2] Registering commands for bundle org.apache.karaf.web.core/4.2.9
16:30:23.403 INFO [FelixStartLevel] Ignoring servlet [127] without valid alias or url patterns property.
16:30:23.414 INFO [FelixStartLevel] Ignoring servlet [129] without valid alias or url patterns property.
16:30:23.417 INFO [FelixStartLevel] Ignoring servlet [131] without valid alias or url patterns property.
16:30:23.430 INFO [FelixStartLevel] Ignoring servlet [135] without valid alias or url patterns property.
16:30:23.434 INFO [FelixStartLevel] Storing Memory Dumps in /home/grim/apache-karaf-4.2.9/data/cache/bundle161/data/dumps
16:30:23.439 INFO [FelixStartLevel] Setting Automatic Memory Dump Threshold to 0% for pools [CodeHeap 'non-nmethods', CodeHeap 'non-profiled nmethods', CodeHeap 'profiled nmethods', Compressed Class Space, G1 Old Gen, Metaspace]
16:30:23.440 INFO [FelixStartLevel] Automatic Memory Dump cannot be set for pools [G1 Eden Space, G1 Survivor Space]
16:30:23.440 INFO [FelixStartLevel] Setting Automatic Memory Dump Interval to 21600 seconds
16:30:23.443 INFO [FelixStartLevel] Ignoring servlet [137] without valid alias or url patterns property.
16:30:23.451 INFO [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.webconsole.plugins.memoryusage.internal.MemoryUsageConfigurator])] Setting Automatic Memory Dump Threshold to 0% for pools [CodeHeap 'non-nmethods', CodeHeap 'non-profiled nmethods', CodeHeap 'profiled nmethods', Compressed Class Space, G1 Old Gen, Metaspace]
16:30:23.451 INFO [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.webconsole.plugins.memoryusage.internal.MemoryUsageConfigurator])] Automatic Memory Dump cannot be set for pools [G1 Eden Space, G1 Survivor Space]
16:30:23.451 INFO [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.webconsole.plugins.memoryusage.internal.MemoryUsageConfigurator])] Setting Automatic Memory Dump Interval to 21600 seconds
16:30:23.452 INFO [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.webconsole.plugins.memoryusage.internal.MemoryUsageConfigurator])] Storing Memory Dumps in /home/grim/apache-karaf-4.2.9/data/cache/bundle161/data/dumps
16:30:23.462 INFO [FelixStartLevel] Ignoring servlet [142] without valid alias or url patterns property.
16:30:23.466 INFO [FelixStartLevel] Ignoring servlet [146] without valid alias or url patterns property.
16:30:23.474 INFO [FelixStartLevel] Ignoring servlet [149] without valid alias or url patterns property.
16:30:23.477 INFO [FelixStartLevel] Ignoring servlet [152] without valid alias or url patterns property.
16:30:23.481 INFO [FelixStartLevel] Ignoring servlet [155] without valid alias or url patterns property.
16:30:23.485 INFO [FelixStartLevel] Ignoring servlet [158] without valid alias or url patterns property.
16:30:23.495 INFO [FelixStartLevel] Ignoring servlet [161] without valid alias or url patterns property.
16:30:23.512 INFO [FelixStartLevel] Features plugin activated
16:30:23.513 INFO [FelixStartLevel] Ignoring servlet [164] without valid alias or url patterns property.
16:30:23.513 INFO [paxweb-config-1-thread-1] No ALPN class available
16:30:23.513 INFO [paxweb-config-1-thread-1] HTTP/2 not available, creating standard ServerConnector for Http
16:30:23.518 INFO [FelixStartLevel] Gogo plugin activated
16:30:23.518 INFO [FelixStartLevel] Ignoring servlet [165] without valid alias or url patterns property.
16:30:23.523 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.webconsole.http/4.2.9
16:30:23.527 INFO [FelixStartLevel] Instance plugin activated
16:30:23.528 INFO [FelixStartLevel] Ignoring servlet [166] without valid alias or url patterns property.
16:30:23.528 INFO [paxweb-config-1-thread-1] Pax Web available at [0.0.0.0]:[8181]
16:30:23.529 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.webconsole.instance/4.2.9
16:30:23.532 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.karaf.webconsole.instance [166]] to http service
16:30:23.534 INFO [FelixStartLevel] Registering commands for bundle org.apache.karaf.event/4.2.9
16:30:23.542 INFO [paxweb-config-1-thread-1] Binding bundle: [org.ops4j.pax.web.pax-web-extender-whiteboard [106]] to http service
16:30:23.543 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.felix.webconsole.plugins.event [160]] to http service
16:30:23.544 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.felix.inventory [158]] to http service
16:30:23.544 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.felix.webconsole.plugins.ds [159]] to http service
16:30:23.545 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.felix.webconsole.plugins.memoryusage [161]] to http service
16:30:23.545 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.karaf.http.core [53]] to http service
16:30:23.546 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.karaf.webconsole.features [163]] to http service
16:30:23.547 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.karaf.webconsole.console [162]] to http service
16:30:23.553 INFO [activator-1-thread-2] Registering commands for bundle org.apache.karaf.http.core/4.2.9
16:30:23.563 INFO [activator-1-thread-2] Http plugin activated
16:30:23.564 INFO [activator-1-thread-2] Ignoring servlet [180] without valid alias or url patterns property.
16:30:23.564 INFO [activator-1-thread-2] Binding bundle: [org.apache.karaf.webconsole.http [165]] to http service
16:30:23.564 INFO [paxweb-config-1-thread-1] will add org.apache.jasper.servlet.JasperInitializer to ServletContainerInitializers
16:30:23.565 INFO [paxweb-config-1-thread-1] Skipt org.apache.jasper.servlet.JasperInitializer, because specialized handler will be present
16:30:23.565 INFO [paxweb-config-1-thread-1] will add org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer to ServletContainerInitializers
16:30:23.700 INFO [paxweb-config-1-thread-1] added ServletContainerInitializer: org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
16:30:23.701 INFO [paxweb-config-1-thread-1] will add org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer to ServletContainerInitializers
16:30:23.702 INFO [paxweb-config-1-thread-1] added ServletContainerInitializer: org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer
16:30:23.728 INFO [paxweb-config-1-thread-1] registering context DefaultHttpContext [bundle=org.apache.karaf.webconsole.console [162], contextID=custom], with context-name: 
16:30:23.729 INFO [FelixStartLevel] Binding bundle: [tomcat-sample [168]] to http service
16:30:23.736 INFO [paxweb-extender-2-thread-1] will add org.apache.jasper.servlet.JasperInitializer to ServletContainerInitializers
16:30:23.737 INFO [paxweb-extender-2-thread-1] Skipt org.apache.jasper.servlet.JasperInitializer, because specialized handler will be present
16:30:23.737 INFO [paxweb-extender-2-thread-1] will add org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer to ServletContainerInitializers
16:30:23.743 INFO [paxweb-config-1-thread-1] registering JasperInitializer
16:30:23.760 INFO [paxweb-config-1-thread-1] No DecoratedObjectFactory provided, using new org.eclipse.jetty.util.DecoratedObjectFactory[decorators=1]
16:30:23.768 INFO [paxweb-extender-2-thread-1] added ServletContainerInitializer: org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
16:30:23.768 INFO [paxweb-extender-2-thread-1] will add org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer to ServletContainerInitializers
16:30:23.769 INFO [paxweb-extender-2-thread-1] added ServletContainerInitializer: org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer
16:30:23.769 INFO [paxweb-extender-2-thread-1] registering context WebAppHttpContext{tomcat-sample - 168}, with context-name: sample
16:30:23.789 INFO [paxweb-extender-2-thread-1] registering JasperInitializer
16:30:23.791 INFO [paxweb-extender-2-thread-1] No DecoratedObjectFactory provided, using new org.eclipse.jetty.util.DecoratedObjectFactory[decorators=1]
16:30:23.801 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/c-1_0-rt.tld
16:30:23.805 INFO [paxweb-config-1-thread-1] DefaultSessionIdManager workerName=node0
16:30:23.805 INFO [paxweb-config-1-thread-1] No SessionScavenger set, using defaults
16:30:23.806 INFO [paxweb-config-1-thread-1] node0 Scavenging every 660000ms
16:30:23.813 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/c-1_0.tld
16:30:23.815 INFO [paxweb-config-1-thread-1] Started HttpServiceContext{httpContext=DefaultHttpContext [bundle=org.apache.karaf.webconsole.console [162], contextID=custom]}
16:30:23.818 INFO [paxweb-config-1-thread-1] jetty-9.4.28.v20200408; built: 2020-04-08T17:49:39.557Z; git: ab228fde9e55e9164c738d7fa121f8ac5acd51c9; jvm 11.0.8+10-LTS
16:30:23.820 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/c-1_1.tld
16:30:23.823 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/c.tld
16:30:23.826 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/fmt-1_0-rt.tld
16:30:23.831 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/fmt-1_0.tld
16:30:23.835 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/fmt.tld
16:30:23.836 INFO [paxweb-config-1-thread-1] Started default@4636d4a9{HTTP/1.1, (http/1.1)}{0.0.0.0:8181}
16:30:23.837 INFO [paxweb-config-1-thread-1] Started @2030ms
16:30:23.838 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/fn.tld
16:30:23.839 INFO [paxweb-config-1-thread-1] Binding bundle: [org.apache.karaf.webconsole.gogo [164]] to http service
16:30:23.840 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/permittedTaglibs.tld
16:30:23.841 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/scriptfree.tld
16:30:23.842 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/sql-1_0-rt.tld
16:30:23.846 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/sql-1_0.tld
16:30:23.850 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/sql.tld
16:30:23.852 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/x-1_0-rt.tld
16:30:23.856 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/x-1_0.tld
16:30:23.859 INFO [paxweb-extender-2-thread-1] found TLD bundle://107.0:1/META-INF/x.tld
16:30:23.870 INFO [paxweb-extender-2-thread-1] Started HttpServiceContext{httpContext=WebAppHttpContext{tomcat-sample - 168}}
16:33:52.246 INFO [CM Configuration Updater (Update: pid=org.ops4j.pax.logging)] Sending Event Admin notification (configuration successful) to org/ops4j/pax/logging/Configuration

有什么想法吗?

Jonathan 在这里询问 list -l 的输出是:

karaf@root()> list -l
START LEVEL 100 , List Threshold: 50
 ID │ State  │ Lvl │ Version        │ Location
────┼────────┼─────┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 22 │ Active │  80 │ 4.2.9          │ mvn:org.apache.karaf/org.apache.karaf.event/4.2.9
 61 │ Active │  80 │ 4.17.0         │ mvn:org.apache.xbean/xbean-bundleutils/4.17
 62 │ Active │  80 │ 4.17.0         │ mvn:org.apache.xbean/xbean-finder/4.17
 83 │ Active │  80 │ 8.0.1          │ mvn:org.ow2.asm/asm/8.0.1
 84 │ Active │  80 │ 8.0.1          │ mvn:org.ow2.asm/asm-commons/8.0.1
 85 │ Active │  80 │ 8.0.1          │ mvn:org.ow2.asm/asm-tree/8.0.1
 94 │ Active │  80 │ 1.1.3          │ file:///home/grim/Downloads/pax-cdi-api-1.1.3.jar
117 │ Active │  80 │ 1.2.0          │ inputstream:cdi-api-1.2.jar
118 │ Active │  80 │ 1.2            │ inputstream:javax.interceptor-api-1.2.jar
119 │ Active │  80 │ 2.4.0          │ inputstream:javax.inject-2.4.0.jar
124 │ Active │  80 │ 1.1.3          │ inputstream:pax-cdi-extension-1.1.3.jar
125 │ Active │  80 │ 1.1.3          │ inputstream:pax-cdi-spi-1.1.3.jar
126 │ Active │  80 │ 1.1.3          │ inputstream:pax-cdi-sample1-1.1.3.jar
128 │ Active │  80 │ 2.2            │ inputstream:javax.persistence-api-2.2.jar
129 │ Active │  80 │ 1.1.4.SNAPSHOT │ inputstream:pax-cdi-extender-1.1.4-SNAPSHOT.jar
130 │ Active │  80 │ 1.1.4.SNAPSHOT │ inputstream:pax-cdi-sample1-web-1.1.4-SNAPSHOT.jar
167 │ Active │  80 │ 1.1.4.SNAPSHOT │ inputstream:pax-cdi-sample1-client-1.1.4-SNAPSHOT.jar
168 │ Active │  80 │ 0              │ webbundle:http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample

我在 Karaf 上从 OPS4j 转移到 Aries CDI。方法如下:

https://www.youtube.com/watch?v=hFgXPs251po