简体   繁体   中英

Using Weld with Liferay 6.1 CE / Jboss

I have this application that I've written as a normal servlet. It uses Weld for CDI. When deploying it on a plain JBoss 7.0.2, everything works just as expected.

I've now converted the application to Portlet 2.0. I try to deploy the portlet to a Liferay 6.1 CE running on JBoss, but I get the following exception

14:16:20,587 INFO  [stdout] (http--127.0.0.1-8080-86) 14:16:20,583 ERROR [PortletServlet:97] javax.portlet.PortletException: java.lang.RuntimeException: javax.naming.NameNotFoundException: BeanManager -- service jboss.naming.context.java.module.ROOT.ROOT.BeanManager

This exception occurs when I call

return (BeanManager) new InitialContext()
                .lookup("java:comp/BeanManager");

Any ideas what might be causing this?

升级到AS7的新版本,它包含一个在门户环境中使用Weld的修复程序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM