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.
NetBeans IDE 6.0 Preview Build (M9) WinXP JDK 1.6 This problem is evident when you have code inside the init method initializing some resources such as a datasources. For example if you have a databound table it will show up empty. No exceptions in the server log. Problem only occurs on Tomcat version 5.5.20 and higher. On Tomcat 5.5.17 it works perfectly fine. Steps to recreate: 1. Download Tomcat 5.5.23. Add a user with manager role in the "$TOMCAT/conf/tomcat-users.xml" file Your file should look something like this: <?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="manager"/> <role rolename="standard"/> <user username="admin" password="adminadmin" roles="standard,manager"/> </tomcat-users> 2.Add the following jars to $TOMCAT/common/lib : -commons-beanutils -commons-collections -commons-digester -commons-logging -jsf-api -jsf-impl -jstl -standard 3. Add the server in the IDE and create J2EE1.4 project. 4.Drag a drop down list or table onto the page and then connect to JavaDB/MySql server and drop a db table onto the component. 5.Deploy application. The page will load, the component will be rendered but it will have no data, i.e. a table or drop down list will be empty. I tried copying the JDBC drivers $TOMCAT/common/lib without any success. Same issue with Tomcat 6. Work Around : 1. add _init(); to getPage1() method of Page1.java 2. add getSessionBean1().init(); to _init() method of Page1.java
Created attachment 42609 [details] Server Log
Created attachment 42610 [details] Server Output
UPDATE: It turns out that this is actually a Tomcat bug that was introduced in Tomcat 5.5.20. What is happening is that if the webapp is stored at a directory that has spaces in it then Tomcat is not able to pick up jars in the WEB-INF/lib folder. Tomcat has a method that returns the paths to all jars with tlds in them but when Tomcat is scanning for these jar files in the WEB-INF/lib folder it is getting the file paths containing '%20' instead of spaces and it is unable to convert the '%20' into spaces. As a result it concludes (wrongly) that there are no jars in the folder. The workaround is to place the webapp in a path with no spaces in it. In that case the project works fine and the table is displayed with data in it. You don't even need to place the jsf and jstl related jar files in the $TOMCAT/common/lib folder. It picks up the jar files from the webapps WEB-INF/lib folder as it should have always been doing. Here is the link for the bug on Tomcat's website: http://issues.apache.org/bugzilla/show_bug.cgi?id=42354 Its marked as fixed in nightly build and the fix will be integrated in Tomcat 5.5.24 apparently. Assigning keyword TOMCAT.
marking as invalid since its not a netbeans issue but a tomcat bug.