I'm trying to upgrade a web app from Weld1.1 to Weld2 and was wondering if there anyone could give me some pointers as to how to bootstrap Weld2?
I have WeldListener registered in my web.xml and Weld is distributed as part of my war file.
I was getting the following error:
java.lang.IllegalStateException: Unable to access CDI
I then made a service entry for org.jboss.weld.servlet.StaticWeldProvider and get this new error:
java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?
I think I must be going about this the wrong way as just adding the listener worked for Weld1.1 but I guess there is something else for Weld2.
Does anyone have any ideas?
OK, what I actually needed was
Now it works.
|Retrieving data ...|