0

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?

Mehdi
  • 4,396
  • 4
  • 29
  • 30

2 Answers2

0

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.

LightGuard
  • 5,298
  • 19
  • 19
  • Thanks Jason, but was this a bug in weld implementation in past? like glassfish weblogic uses OSGi bundles and i tried replacing the bundle with newer version that I got from jboss repository, but it did not work and gave me another error! I think weblogic has it's own mechanism for making OSGi bundles from a jar file. – Mehdi May 20 '12 at 07:34
  • Certainly sounds like an issue in WebLogic! ;) – Mehdi Aug 30 '12 at 08:14
  • I not surprised anymore, I encountered more bugs in Weblogic JEE implementations, which nobody cared about (i didn't paid). So I stopped caring as well and moved to better platform – JIV Oct 10 '16 at 10:25
0

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

einverne
  • 6,454
  • 6
  • 45
  • 91