0
votes

I have a CDI bean annotated with @Named and @RequestScoped. It is working perfectly in Glassfish 3.1.2 but when I deploy it in Weblogic 12.1.1 I get the following error!

Caused By: org.jboss.weld.exceptions.DefinitionException: WELD-000075 Normal scoped managed bean implementation class has a public field: public@Named @RequestScoped class com.x.y.web.monitoring.MyController

I don't have any public field in my bean!!! all of them are private and I use getters and setters. Is this a bug in weblogic 12.1.1 ? How can I update weld version in weblogic?

2
Are you bundling an AspectJ library?raphaëλ
No I'm not. When I have CDI interceptors and decorators I don't need Aspectj anymore! ;)Mehdi
I was asking, because i recall having some issues with different versions of ASpectJ on my classpath.raphaëλ

2 Answers

0
votes

Certainly sounds like an issue in WebLogic. I'm pretty sure they're using an old version of Weld, you'll have to ask in the WebLogic forms or contacts about updating, I haven't seen anything about how to update the version.

0
votes

Some IDEs (like Netbeans) import wrong class for viewscope automatically. Be sure you imported javax.faces.bean.ViewScoped not javax.faces.view.ViewScoped.