PS: I should also explain why we need the servlet-api.jar atm. I'm not 100% sure if we need it in the Weld integration, but for OWB we need it IF someone uses the openwebbeans-web plugin.
In OWB we have a plugable ContainerLifecycle. This is 'plug&play' and can be easily configured via or META-INF/openwebbeans/openwebbean.properties as described in [1]. If you only use openwebbeans-core, then you will get a StandaloneLifeCycle which doesn't need the servlet. But if you use the CdiCtrl in a webapp and the openwebbeans-web.jar is available, you will get a WebContainerLifecycle. And this one needs a Session, thus I had to provide a MockSession for it (just in case). We could do further tricks to do classForName for HttpSession and only create the MockSession if it is available. Might be a good feature! What is the state of affairs in weld? Does it always need a servlet-api.jar on the classpath or can it live without as well? LieGrue, strub [1] http://struberg.wordpress.com/2010/09/21/flexible-configuration-for-modular-systems/ ----- Original Message ----- > From: Mark Struberg <strub...@yahoo.de> > To: "deltaspike-users@incubator.apache.org" > <deltaspike-users@incubator.apache.org> > Cc: > Sent: Monday, March 26, 2012 9:14 AM > Subject: Re: missing class > > Hi Justin! > > You need the standalone CDI api jar of course if you are not running in an EE > container. > > You could use the following: > > http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-jcdi_1.0_spec/1.0/ > > <dependency> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-jcdi_1.0_spec</artifactId> > <version>1.0</version> > </dependency> > > > I'm pretty sure Weld has a standalone CDI API jar as well. > You will also need the JSR-330 API Jar, and the interceptors.jar since > JSR-299 > is depending on it > > <dependency> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-atinject_1.0_spec</artifactId> > <version>1.0</version> > </dependency> > > <dependency> > <groupId>org.apache.geronimo.specs</groupId> > > <artifactId>geronimo-interceptor_1.1_spec</artifactId> > <version>1.0</version> > </dependency> > > The easiest might be to check the poms of the standalone implementations > inside > deltaspike: > cdictrl/impl-owb/pom.xml and > cdictrl/impl-weld/pom.xml > > hth! > > LieGrue, > strub > > > > ----- Original Message ----- >> From: Justin Lee <j...@antwerkz.com> >> To: deltaspike-users@incubator.apache.org >> Cc: >> Sent: Monday, March 26, 2012 4:35 AM >> Subject: missing class >> >> So when following the instructions here >> > http://struberg.wordpress.com/2012/03/17/controlling-cdi-containers-in-se-and-ee/(adjusting >> for 0.2-incubating-SNAPSHOT since apparently nothing's been >> released yet), I get the error below: >> >> java.util.ServiceConfigurationError: >> org.apache.deltaspike.cdise.api.CdiContainer: Provider >> org.apache.deltaspike.cdise.owb.OpenWebBeansContainerControl could not be >> instantiated: java.lang.NoClassDefFoundError: >> javax/enterprise/context/spi/Contextual >> >> I could import the ee6 api pom but I'd rather not. tbh, i half > expected >> such a dependency to be provided for me given that the whole point is run a >> CDI context in SE. Should I just add the dep to my pom or am I missing >> something here? >> >> -- >> You can find me on the net at: >> http://antwerkz.com http://antwerkz.com/+ >> http://antwerkz.com/github >> http://antwerkz.com/linkedin http://antwerkz.com/twitter >> >