This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | JSF from Entity Beans - does not deploy to JBoss | ||
---|---|---|---|
Product: | serverplugins | Reporter: | khooke <khooke> |
Component: | JBoss | Assignee: | Pavel Buzek <pbuzek> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
khooke
2006-04-04 15:42:05 UTC
Reassigning to JBoss guru. Simply do what IllegalStateException suggests you. It should be resolved as WONTFIX rather than invalid. It is a matter of JSF implementation in JBoss server. We cannot workaround this at least for the inability to rely on some implementaion details. The exception says: ...context listener is not setup in your web.xml. A typical config looks like this; <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> The only thing you must do is to add this element into the web.xml. Could you please try it and give us know whether it helps? Thanks. I added the missing <listener> section and this fixed one issue. However, there were still a number of issues I have found by trial and error, and the generated JSF pages are still not working: 1. the generated persistence.xml had the wrong jndi format for jboss. The jta-data-source element was generated as: <jta-data-source>jndi/store</jta-data-source> but it should have been: <jta-data-source>java:/store</jta-data-source> 2. The generated JSF Controller class had the ENtityManager reference defaulted to: @PersistenceContext(unitName = "ReplaceWithPersistenceUnitName") where is should have matched the generated value in the persistence.xml: @PersistenceContext(unitName = "OnlineStore-ejb") EAR now deploys ok, without error but JSF generated pages are not working, for other reasons: javax.servlet.ServletException: Cannot get value for expression '#{item.items}' javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) I don't know enough about JSF, but suspect I can debug this myslef if I learn some more. I think at this point this defect can be closed. I do not see a big problem fixing this. I will add a listener to web.xml if the listener class is available on cp. This has no impact on sun app server or tomcat and it does not create any dependency on myfaces. Note that if you switch from server to another you will likely have to add/remove jsf library so one more step is hopefully not a big issue. Checking in src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java,v <-- JSFFrameworkProvider.java new revision: 1.3.2.5.2.5; previous revision: 1.3.2.5.2.4 done Verified |