• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF Exception  RSS feed

 
Kaise a.Zakkar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI everybody.
I tried to generate JSF pages from some auto-generated entity bean classes using the NetBeans 6.1 , and Apache tomcat 6.6.
after all the related JSF will be generated successfully , am able to reach the main generated page that contains the basic links for CRUD operations for each relevant entity, however if i click on any of the links on this page am getting these two exceptions ,which are related to the some generated controller classes :

"javax.servlet.ServletException: javax.faces.FacesException: javax.naming.NameNotFoundException: Name entities.RecruiterController is not bound in this Context
** javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)root cause**

javax.faces.FacesException: javax.faces.FacesException: javax.naming.NameNotFoundException: Name entities.RecruiterController is not bound in this Context"

i don�t know what is exactly the cause of this problems .
i have followed exactly all the steps mentions in the following tutorial :
http://www.netbeans.org/kb/61/web/jsf-jpa-crud-wizard.html
I wonder if you can help me to find a solution to this problems.

Thanks allot .
With my best regards.
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we have a look at the generated faces-config.xml?

Thanks.
 
Kaise a.Zakkar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here it is .......Sorry its quite long.

<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>address</managed-bean-name>
<managed-bean-class>entities.AddressController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.Address</converter-for-class>
<converter-class>entities.AddressConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>address_create</from-outcome>
<to-view-id>/address/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>address_list</from-outcome>
<to-view-id>/address/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>address_edit</from-outcome>
<to-view-id>/address/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>address_detail</from-outcome>
<to-view-id>/address/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>billable</managed-bean-name>
<managed-bean-class>entities.BillableController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.Billable</converter-for-class>
<converter-class>entities.BillableConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>billable_create</from-outcome>
<to-view-id>/billable/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>billable_list</from-outcome>
<to-view-id>/billable/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>billable_edit</from-outcome>
<to-view-id>/billable/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>billable_detail</from-outcome>
<to-view-id>/billable/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>client</managed-bean-name>
<managed-bean-class>entities.ClientController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.Client</converter-for-class>
<converter-class>entities.ClientConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>client_create</from-outcome>
<to-view-id>/client/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>client_list</from-outcome>
<to-view-id>/client/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>client_edit</from-outcome>
<to-view-id>/client/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>client_detail</from-outcome>
<to-view-id>/client/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>consultant</managed-bean-name>
<managed-bean-class>entities.ConsultantController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.Consultant</converter-for-class>
<converter-class>entities.ConsultantConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>consultant_create</from-outcome>
<to-view-id>/consultant/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>consultant_list</from-outcome>
<to-view-id>/consultant/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>consultant_edit</from-outcome>
<to-view-id>/consultant/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>consultant_detail</from-outcome>
<to-view-id>/consultant/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>consultantStatus</managed-bean-name>
<managed-bean-class>entities.ConsultantStatusController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.ConsultantStatus</converter-for-class>
<converter-class>entities.ConsultantStatusConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>consultantStatus_create</from-outcome>
<to-view-id>/consultantStatus/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>consultantStatus_list</from-outcome>
<to-view-id>/consultantStatus/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>consultantStatus_edit</from-outcome>
<to-view-id>/consultantStatus/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>consultantStatus_detail</from-outcome>
<to-view-id>/consultantStatus/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>project</managed-bean-name>
<managed-bean-class>entities.ProjectController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.Project</converter-for-class>
<converter-class>entities.ProjectConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>project_create</from-outcome>
<to-view-id>/project/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>project_list</from-outcome>
<to-view-id>/project/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>project_edit</from-outcome>
<to-view-id>/project/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>project_detail</from-outcome>
<to-view-id>/project/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>recruiter</managed-bean-name>
<managed-bean-class>entities.RecruiterController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<converter>
<converter-for-class>entities.Recruiter</converter-for-class>
<converter-class>entities.RecruiterConverter</converter-class>
</converter>
<navigation-rule>
<navigation-case>
<from-outcome>recruiter_create</from-outcome>
<to-view-id>/recruiter/New.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>recruiter_list</from-outcome>
<to-view-id>/recruiter/List.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>recruiter_edit</from-outcome>
<to-view-id>/recruiter/Edit.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<navigation-case>
<from-outcome>recruiter_detail</from-outcome>
<to-view-id>/recruiter/Detail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The managed bean in question seems to in the declaration:



I tried searching for your error and ended up seeing another user with the same problem, but no solutions yet.

Another post (in Portuguese) mentions that they also experienced this problem in Tomcat and is suggesting to try other containers such as GlassFish.
 
Kaise a.Zakkar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply ,
Actually i thing that you are right about that .
Most probably the problem is because of Tomcat 6 , and may be its missing some of J2EE 5 libraries or other compatibility issues.
I will try another fully J2EE 5 compatible container and let you know .
Thanks and Regards
 
Gordon Dove
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[partial solution]
Hi, I just ran into this problem myself. Similar situation: I wanted to use the code generation, but not glassfish because the rest of our project is already developed with Tomcat.
After generating the app with GF, I switched the server to Tomcat, added Toplink essentials for the JPA, JSF, JSTL etc and changed the UserTransaction to a EntityTransaction, initialising it from em.getTransaction where it was used.
I noticed in passing that the original UserTransaction wasn't initialized, but then forgot all about it.
One of the previous posters said it is probably a J2EE problem and that is when I realized. The original transaction was initialized using container injection because of the @Resource annotation. Take that away and I get a completely different error ( and a lot further down the chain).

Hope this helps
Gordon
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!