I have successfully deployed 2 EJB 3.0 Entity beans and a session bean to access them.As client app I've created a servlet and it all works fine.However, I created another application that uses JSF (MyFaces) in the same JBoss 4.0.3 configuration and deployed in the same place as the servlet and I just can't access teh SessionBean
The code is:
public class EJB3Bean
{
private Authors authorsBean;
protected List authors;
public EJB3Bean()
{
try
{
Context context = new InitialContext();
authorsBean = (Authors)context.lookup(Authors.class.getName());
} catch (NamingException e)
{
e.printStackTrace();
}
authors = authorsBean.getAllAuthors();//Exception here!
}
/**
* @return Returns the authors.
*/
public List getAuthors()
{
return authors;
}
}
Authors is an interface marked as @Remote that is implemented by the session bean.authorsBean is not null and the reference seems to be OK in debug mode.However, invoking a method of the class crashes the application in a huge stack trace.
It says at some point:javax.faces.el.PropertyNotFoundException: Bean: com.softwin.myfaces.ejb3.EJB3Bean, property: authors
It never gets passed the contructor as far as I can tell.
Help?
Debugging...:(