Hi I'm trying to integrate CDI into my container. I'm using WAR file as
a wrapper viz. my application runs as a web application. When I'm doing this
Object obj = weldManager.getCurrent()
.instance().select(AClass.class).get();
Note: I got the weldManager by casting BeanManager
I'm getting this exception
java.lang.IllegalStateException: Singleton not set for WebappClassLoader
(delegate=true)
at
org.glassfish.weld.ACLSingletonProvider$ACLSingleton.get(ACLSingletonProvider.java:110)
at org.jboss.weld.Container.instance(Container.java:58)
at
org.jboss.weld.resolution.ResolvableBuilder.checkQualifier(ResolvableBuilder.java:209)
at
org.jboss.weld.resolution.ResolvableBuilder.addQualifier(ResolvableBuilder.java:174)
at
org.jboss.weld.resolution.ResolvableBuilder.addQualifiers(ResolvableBuilder.java:202)
at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:108)
at
com.kenai.jabberwocky.framework.core.PacketUtility.cdiObject(PacketUtility.java:60)
How do I use the WebappClassLoader? My container is currently returning
DeploymentContext.getFinalClassLoader()
Thanks
Regards
Chuk
--
Beware of the Turing tar-pit in which everything is possible but nothing
of interest is easy.