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.
Used vwp trunk build070206_1: Deployed and run a visual webapp(ee1.4 source level)(see attachment for the application). Got HTTP Status 500 in the browser and the following error appears in the tomcat log: SEVERE: Servlet.service() for servlet Faces Servlet threw exception java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:145) at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:203) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)
Created attachment 38269 [details] webapp
As this is a Tomcat issue, I think Marco will be the most knowledgeable.
Apparently the jstl.jar is not included in the build any more. That has to be done for servers which don't provide it, like Tomcat.
Cannot reproduce it from the current trunk. If you found it's still reproducible, please give the steps instead of attaching project. (yes, the project built is not including the jstl.jar & standard.jar)
NB VWP build #0707241200 Mac OS X & WinXP 1. Connect to DB Derby Travel 2. Create new VWP project: application server - "Glassfish", Java EE version - "Java EE 5" 3. DnD JSF component Table on Designer and then DnD DB table "Trip" on it. 4. Run project. Result: Application will be deployed on Galssfish correctly. Data table will be shown in a web-browser. 5. Use popup menu item "Properties" for the project root tree node. In the dialog "Project Properties" select category "Run" and change server to "Apache Tomcat 6.0.13". Click "OK". 6. Run project. Result: Error-page will be shown in a web-browser. Tomcat log will contain the following exception: 26.07.2007 16:17:57 org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.extensions.avatar.event.DynaFacesContextListener java.lang.NoClassDefFoundError: javax/faces/FacesException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3771) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) 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:626) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:511) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 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:585) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1458) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:820) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:613) 26.07.2007 16:17:57 org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s)
The reason this is happening is that projects created on Glassfish do not need the JSF1.2 and JSTL libraries since they are already available on the server/lib. However Tomcat does not have those jars so when a project is created with Tomcat as target server the IDE adds the libraries to the project. When switching servers as in mentioned in the comment above this does not happen. The workaround is to add the following libraries from the library manager into the project JSF1.2 JSTL1.1 Another problem with switching projects is that projects on Glassfish have their datasources defined in sun-resources.xml file, while Tomcat has datasource information in context.xml. If project is switched after databinding has been done the IDE will not add the relevant entry in the context.xml file for Tomcat and so the page will not be displayed at runtime. The workaround is to add a resource tag under the Context tag of the context.xml file of the project so it should look like this: <?xml version="1.0" encoding="UTF-8"?> <Context path="/GF"> <Resource auth="Container" driverClassName="org.apache.derby.jdbc.ClientDriver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/APP_ApacheDerby" password="app" type="javax.sql.DataSource" url="jdbc:derby://localhost:1527/sample" username="app"/> </Context> (ofcourse substitute the relevant information with whatever database is being used.) Once these two steps are completed the project will deploy fine. Also if databinding is done after switching servers this step should not be necessary. As far as I can remember I don't think switching of servers is fully supported. Need more feedback from po-ting on that.
Thanks a lot Yousuf for the evaluation. Since there is a work around, lowering priority. If we don't support switching servers, we should a create FAQ with Yousuf's steps above.
"changing of servers is not supported" for the whole web project, not just visualweb. Not a planned NetBeans 6.0 feature. *** This issue has been marked as a duplicate of 111131 ***