struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albi ho (JIRA)" <>
Subject [jira] [Commented] (WW-4548) Struts2-CDI-plugin is not able to get a reference of BeanManager through lookup
Date Tue, 22 Sep 2015 09:11:04 GMT


Albi ho commented on WW-4548:

Lukasz I solved this problem. I have a weblogic EAR (the way they suggest to build it) file
and I did put the beans.xml in every single war but it's not working. I think this is more
due to the project structure, so I'm closing the bug.

> Struts2-CDI-plugin is not able to get a reference of BeanManager through lookup
> -------------------------------------------------------------------------------
>                 Key: WW-4548
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - CDI
>    Affects Versions: 2.3.24
>         Environment: Weblogic 12c 
>            Reporter: Albi ho
>             Fix For: 2.3.x
> Hello,
> I'm trying to get CDI (WELD) to work on our Java EE application. We use Struts2 as front-end
framework with Action classes (as controllers). 
> We want to be able to use CDI and inject into the Action classes but we have no success
on integrating the cdi-plugin.
> On weblogic server startup I get the following error:
> {noformat}
> 16-Sep-2015-09:52:04  [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default
(self-tuning)' [ERROR] InterceptorBuilder.Actual exception
> Caught Exception while registering Interceptor class com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor
- interceptor - zip:D:/dev/bin/oracle/weblogic/
> L_user/granite/dajv2g/APP-INF/lib/struts2-core-2.3.24.jar!/struts-default.xml:194:116
>         at com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(
>         at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(
>         at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(
>         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(
>         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStack(
> {noformat}
> Which is caused by:
> {noformat}
> Caused by: java.lang.NullPointerException
>         at org.apache.struts2.cdi.CdiObjectFactory.getInjectionTarget(
>         at org.apache.struts2.cdi.CdiObjectFactory.buildBean(
>         at com.opensymphony.xwork2.ObjectFactory.buildBean(
>         at com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(
> {noformat}
> I checked out the source code and I could see that the beanManager instance variable
is NULL. This happens because none of the 3 lookups is able to get a reference to the BeanManager.

This message was sent by Atlassian JIRA

View raw message