Sunday, October 28, 2012

Tomcat:run will cause backing bean target unreachable

The same piece of source code is working just fine without Maven but there is error whenever run running with maven goal tomcat:run.

/hello.xhtml @16,59 value="#{}": Target Unreachable, identifier 'helloBean' resolved to null

This appear that there is a backing bean called HelloBean is not being configure properly. But looking at the programming syntax, everything is just fine and perfect. See the piece below:

I just discover something from @alehro's answer in stackoverflow. That problem is actually referring to Jetty but surprisingly this is also apply to Tomcat. The workaround on this problem is to change the maven goal to tomcat:run-war.

No comments: