0

I have an Java web application, running on WebLogic, with 100 or so existing beans setup with annotations in the form:

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

@ViewScoped
@ManagedBean(name = "[beanName]")
public class BeanPage

Suddenly when I add new beans I get the following error when referencing them from the xhtml:

javax.faces.FacesException: #{[beanName.init]}: javax.el.PropertyNotFoundException: [url.xhtml] @10,53 action="#{beanName.init}": Target Unreachable, identifier 'beanName' resolved to null

All the existing beans work fine, but I consistently get this error with new beans. Even if it's a copy of an existing working bean. I do not get this error running on Tomcat, the new beans work well.

I have seen the item on setting up beans and tackling different error messages, but I don't think it addresses my problem when everything appears setup correctly it's just new beans running into issues: Identifying and solving javax.el.PropertyNotFoundException: Target Unreachable

I have tried Maven clean, update, deleting the project and checking it out fresh, deleting the server and recreating it.

Running Weblogic 12c, Eclipse 2019-12, JSF 2.2, CDI 2.0, Primefaces 10.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Holden
  • 177
  • 1
  • 2
  • 10
  • Could you show your imports please. Running CDI and @ManagedBean together is throwing up red flags for me. – Adam Waldenberg Apr 26 '22 at 14:36
  • Added the imports. – Holden Apr 28 '22 at 11:21
  • Those are the correct imports for "ordinary" managed beans (which will be deprecated in later versions btw). Any particular reason you are using those instead of CDI? Regardless - hard to pin this one down, but try adding `eager = true` to the bean and changing the name to just `"beanName"` instead of `"[beanName]"`. – Adam Waldenberg Apr 28 '22 at 14:41

0 Answers0