NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
medi
Joined: 10 Dec 2008 Posts: 5
|
Posted: Wed Dec 10, 2008 11:36 am Post subject: MyFaces doesn't work with NetBeans 6.5? |
|
|
I'm trying to make a simple MyFaces dynamic web application example. This is what I use:
- NetBeans 6.5
- Apache Tomcat 6.0.18
- MyFaces 1.2.5:
- commons-beanutils-1.7.0.jar
- commons-codec-1.3.jar
- commons-collections-3.2.jar
- commons-digester-1.8.jar
- commons-discovery-0.4.jar
- commons-logging-1.1.1.jar
- myfaces-api-1.2.5.jar
- myfaces-impl-1.2.5.jar
- myfaces-shared-impl-3.0.5.jar - JSTL 1.1:
- standard.jar
- jstl.jar
/WEB-INF/web.xml:
| Code: | <?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>BasicExample</display-name>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<listener>
<listener-class>
org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app> |
/index.jsp:
| Code: | <%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<f:view>
<h:outputText>Test</h:outputText>
</f:view> |
This is the Apache Tomcat log error during project deployment in NetBeans:
| Code: | 2008-12-10 09:56:01 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
|
Several important facts:
- I deploy my sample web application to Apache Tomcat using NetBeans
- There is no JSF RI *.jar files in working project, nor in deployed project, nor in Apache Tomcat lib directory
- There is no com.sun.faces.config.ConfigureListener reference in web.xml file, nor in any other text file in my NetBeans project
- Same example worked on Eclipse IDE without any problem (which eliminates Apache Tomcat as potential cause of the problem)
- When I manually copy sample .war file which NetBeans builded to Apache Tomcat work directory, application works without any problem (which also eliminates Apache Tomcat as potential cause of the problem)
- I found this old thread (-> Link -<), with the same problem on Eclipse IDE, which was apparently solved in future Eclipse releases
The question is, why JSF RI error is showing, when there is no JSF RI stuff in my project, nor I'm using, including, importing them anywhere? I'm beginning to think that NetBeans' integrated support for JSF is causing troubles?! What's the purpose of MyFaces .jar files when I have to import JSF RI .jar files, in order to get this application work ... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|