struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albi ho (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/WW-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14902272#comment-14902272
] 

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: https://issues.apache.org/jira/browse/WW-4548
>             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/12.1.3.0/user_projects/domains/granite_domain/servers/GraniteServer/tmp/_W
> 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(DefaultInterceptorFactory.java:64)
>         at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:209)
>         at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:70)
>         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1114)
>         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStack(XmlConfigurationProvider.java:932)
> {noformat}
> Which is caused by:
> {noformat}
> Caused by: java.lang.NullPointerException
>         at org.apache.struts2.cdi.CdiObjectFactory.getInjectionTarget(CdiObjectFactory.java:185)
>         at org.apache.struts2.cdi.CdiObjectFactory.buildBean(CdiObjectFactory.java:158)
>         at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:178)
>         at com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(DefaultInterceptorFactory.java:42)
> {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
(v6.3.4#6332)

Mime
View raw message