Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.7.1
-
None
-
None
-
None
-
Websphere 8.5.5.9
Description
I´m getting an Exception in Websphere Application Server 8.5.5.9 when I try to start the SessionScope like this using ContextControl:
@Stateless @RunAs("scheduled") public class ScheduledService { @Inject private DemoConfiguration config; // contains SessionScoped references @Inject private ContextControl contextControl; @Schedule(hour = "*", minute = "*") private void doSth() { contextControl.startContext(SessionScoped.class); // ... use injected config-reference from above contextControl.stopContext(SessionScoped.class); } }
The exception is:
java.lang.NoClassDefFoundError: org/apache/webbeans/config/WebBeansContext at org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl.getContextsService(OpenWebBeansContextControl.java:242) at org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl.startSessionScope(OpenWebBeansContextControl.java:154) at org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl.startContext(OpenWebBeansContextControl.java:80)
I think this is because of a rather old owb-implementations, that Websphere uses. I found the missing class in another package: org/apache/webbeans/context/WebBeansContext.