Maven example for using pax cdi + felix osgi + weld

167 views
Skip to first unread message

iJava

unread,
May 3, 2016, 12:43:36 AM5/3/16
to OPS4J
Could any one provide a link how to use maven example for using pax cdi + felix osgi + weld of. I've checked https://github.com/ops4j/org.ops4j.pax.cdi/tree/master/itest but didn't find what I am looking for.

By the way - is this mailing list half dead? Or is there a principle/rule according to which some messages are answered and some are totally ignored. Please, provide also a link to such rules.

Achim Nierbeck

unread,
May 3, 2016, 3:16:18 AM5/3/16
to op...@googlegroups.com
No, this mailinglist is for certain not half dead ... 
people will answer if they have a) the Time, b) the knowledge to help c) understand the question. 

In general I'm not willing to answer a general question which can be googled, if there is a specific question you'll get a specific answer. 
But I'm speaking for myself here. 

regarding samples for testing, might want to take a look here [1] and [2]. 

regards, Achim 



2016-05-03 6:43 GMT+02:00 iJava <pavelka...@gmail.com>:
Could any one provide a link how to use maven example for using pax cdi + felix osgi + weld of. I've checked https://github.com/ops4j/org.ops4j.pax.cdi/tree/master/itest but didn't find what I am looking for.

By the way - is this mailing list half dead? Or is there a principle/rule according to which some messages are answered and some are totally ignored. Please, provide also a link to such rules.

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master 

Pavel Kastornyy

unread,
May 3, 2016, 3:28:57 AM5/3/16
to op...@googlegroups.com
Thank you for your answer. Here
https://groups.google.com/forum/#!topic/ops4j/GC3xkvCdXAY I asked a very
specific question. I googled all the sources with WELD-000117 error and
found no answer. I try to use last versions of the weld, pax-cdi, felix.

This is the list of the bundles I install:
<!-- BUNDLES FOR FELIX OSGI -->
<bundle name="org.apache.felix.scr-2.0.2.jar"/>

<!-- BUNDLES FOR CDI (JAVA EE SPECS) -->
<bundle name="javax.annotation-api-1.2.jar"/>
<bundle name="cdi-api-1.2.jar"/><!--javax.enterprise -->
<bundle name="javax.el-api-3.0.0.jar"/>
<bundle
name="org.apache.servicemix.bundles.javax-inject-1_2.jar"/><!--javax.inject
not osgi bundle-->
<bundle name="javax.interceptor-api-1.2.jar"/>

<!-- BUNDLES FOR WELD CDI -->
<bundle name="weld-osgi-bundle-2.3.4.Final.jar"/>
<bundle name="guava-18.0.jar"/>
<bundle name="jboss-classfilewriter-1.1.2.Final.jar"/>
<bundle name="jboss-logging-3.2.1.Final.jar"/>
<bundle name="log4j-api-2.5.jar"/>
<!--
<bundle name="jboss-logging-3.1.3.GA.jar"/>
-->

<!-- BUNDLES FOR PAX CDI -->
<bundle name="slf4j-api-1.7.21.jar"/>
<bundle name="slf4j-simple-1.7.21.jar"/>
<bundle name="xbean-bundleutils-4.5.jar"/>
<bundle name="ops4j-base-lang-1.5.0.jar"/>
<bundle name="pax-cdi-weld-1.0.0.RC1.jar"/>
<bundle name="pax-cdi-spi-1.0.0.RC1.jar"/>
<bundle name="pax-cdi-extension-1.0.0.RC1.jar"/>
<bundle name="pax-cdi-extender-1.0.0.RC1.jar"/>
<bundle name="pax-swissbox-core-1.8.2.jar"/>

<!--???? -->
<bundle name="pax-cdi-api-1.0.0.RC1.jar"/>
<bundle name="pax-swissbox-lifecycle-1.8.2.jar"/>
<bundle name="pax-swissbox-tracker-1.8.2.jar"/>
<bundle name="pax-swissbox-extender-1.8.2.jar"/>

This is the list of bundles I start
<bundle name="org.apache.felix.scr-2.0.2.jar"/>
<bundle name="pax-cdi-weld-1.0.0.RC1.jar"/>
<bundle name="pax-cdi-extender-1.0.0.RC1.jar"/>

This is the result I have:

[main] INFO org.ops4j.pax.cdi.extender.impl.CdiExtender - starting CDI
extender org.ops4j.pax.cdi.extender
Hello! I am running in activator 3
[main] INFO org.ops4j.pax.cdi.extender.impl.CdiExtender - creating CDI
container for bean bundle com.temp [25] with extension bundles
[org.ops4j.pax.cdi.extension [18]]
[main] INFO org.ops4j.pax.cdi.spi.AbstractCdiContainer - Starting CDI
container for bundle com.temp [25]
[main] INFO org.jboss.weld.Version - WELD-000900: 2.3.4 (Final)
ERROR: Bundle org.ops4j.pax.cdi.extender [19] EventDispatcher: Error
during dispatch. (org.jboss.weld.exceptions.IllegalStateException:
WELD-000117: Required service
org.jboss.weld.resources.spi.ScheduledExecutorServiceFactory has not
been specified)
org.jboss.weld.exceptions.IllegalStateException: WELD-000117: Required
service org.jboss.weld.resources.spi.ScheduledExecutorServiceFactory has
not been specified
at
org.jboss.weld.bootstrap.WeldStartup.verifyServices(WeldStartup.java:588)
at
org.jboss.weld.bootstrap.WeldStartup.startContainer(WeldStartup.java:207)
at
org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:69)
at
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.createBeanManager(WeldCdiContainer.java:112)
at
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.access$000(WeldCdiContainer.java:55)
at
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer$1.call(WeldCdiContainer.java:95)
at
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer$1.call(WeldCdiContainer.java:91)
at
org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)
at
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doStart(WeldCdiContainer.java:91)
at
org.ops4j.pax.cdi.spi.AbstractCdiContainer.start(AbstractCdiContainer.java:87)
at
org.ops4j.pax.cdi.extender.impl.CdiExtender.createContainer(CdiExtender.java:184)
at
org.ops4j.pax.cdi.extender.impl.CdiExtender.addingBundle(CdiExtender.java:133)
at
org.ops4j.pax.cdi.extender.impl.CdiExtender.addingBundle(CdiExtender.java:64)
at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)


I don't know how to make this answer more specific. Please, anyone help me.

Harald Wellmann

unread,
May 3, 2016, 3:42:27 AM5/3/16
to OPS4J Mailing Lists
Pax CDI 1.0.0.CR1 was built and tested with Weld 2.2.11.Final. You shouldn't expect it to work with Weld 2.3 or higher out of the box.

Otherwise, Instead of complaining, just ask yourself why people should be interested in solving your problem or try to make it easier for them to understand what the problem really is, e.g. by providing a self-contained code sample and attaching it to a JIRA ticket.

Regards,
Harald

Achim Nierbeck

unread,
May 3, 2016, 3:48:54 AM5/3/16
to op...@googlegroups.com
There is still a) and b) .... no time and no knowledge about that specific issue ... and there are samples out there that prove to be working. So if your setup isn't make sure to align those two and make sure it's not something specific about your setup. 

regards, Achim 

P.S. it's rather confusing that your are using two different ids when sending (iJava and Pavel Kastornyy), till now it seemed to me that those are two different persons ... 

2016-05-03 9:28 GMT+02:00 Pavel Kastornyy <pavelka...@gmail.com>:

Pavel Kastornyy

unread,
May 3, 2016, 3:50:59 AM5/3/16
to op...@googlegroups.com
Thank you for your help. Could you provide the link at which I could
check myself the version of weld the current version of pax cdi supports?

Harald Wellmann

unread,
May 3, 2016, 3:52:40 AM5/3/16
to OPS4J Mailing Lists

Pavel Kastornyy

unread,
May 3, 2016, 3:55:58 AM5/3/16
to op...@googlegroups.com
Thank you very much for your help.
Reply all
Reply to author
Forward
0 new messages