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.

Bug 102926 - Databinding not working on Tomcat 6 or 5.5.23
Summary: Databinding not working on Tomcat 6 or 5.5.23
Status: RESOLVED INVALID
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Winston Prakash
URL:
Keywords: RELNOTE
Depends on:
Blocks:
 
Reported: 2007-04-29 10:09 UTC by Yousuf Haider
Modified: 2007-06-05 06:24 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Tomcat server log (11.17 KB, text/plain)
2007-04-29 10:12 UTC, Yousuf Haider
Details
server console output (3.22 KB, text/plain)
2007-04-29 10:13 UTC, Yousuf Haider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Haider 2007-04-29 10:09:16 UTC
NetBeans IDE 6.0 Preview Build (M9)
WinXP
JDK 1.6

Deploying a application containing a component bound to a db table does not work.

Steps to recreate:
1. Download Tomcat6 or 5.5.23
1. Add a user with manager role in the
"tomcat6_install_directory/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>

3.Add the following jars to $TOMCAT/lib (for TC6) or $TOMCAT/common/lib (for
TC5.5.23):
 -commons-beanutils
 -commons-collections
 -commons-digester
 -commons-fileupload
 -commons-logging
 -javaee
 -jsf-api
 -jsf-impl
 -jstl
 -jstl

Note:
If you are using Tomcat 6 you will have to create the following two directories
in the $TOMCAT/conf folder due to a bug in TC6:
 -Catalina
 -Catalina/localhost

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 in the $TOMCAT/lib (for TC6) or
$TOMCAT/common/lib (for TC5.5.23) without any success.


Also note that there are no problems with Tomcat 5.5.17. Application deployed
easily and table contained data.
Comment 1 Yousuf Haider 2007-04-29 10:12:59 UTC
Created attachment 41938 [details]
Tomcat server log
Comment 2 Yousuf Haider 2007-04-29 10:13:35 UTC
Created attachment 41940 [details]
server console output
Comment 3 Yousuf Haider 2007-04-29 10:14:36 UTC
One thing more, there are no errors or exceptions in the server log.
Comment 4 John Baker 2007-04-30 07:20:33 UTC
Not database related.

Basic project fails also.

Create new J2EE 1.4 project
Add a Static Text and set the Text property to  Hello World
Deploy

Page is blank

Possibly another jar file is needed ?
Comment 5 Yousuf Haider 2007-04-30 16:49:36 UTC
I am having no problems with deploying a basic application.

Try copying only the following jars in TC5.5.23/common/lib:
-commons-beanutils
-commons-collections
-commons-digester
-commons-logging
-jsf-impl
-jsf-api
-jstl
-standard

When binding to a db table the component is rendered but it has no data in it. I
am not getting an empty page.


Comment 6 Yousuf Haider 2007-05-21 18:22:18 UTC
Seems like the init methods of the Session and page beans are not being called.
As a result the tables come up empty. 


Work Around :
   1.  add _init(); to getPage1() method of Page1.java
   2. add getSessionBean1().init(); to _init() method of Page1.java

Thanks to Dan Kolar for the tip.
Comment 7 Yousuf Haider 2007-05-21 18:53:15 UTC
I don't thinks its db issue anymore. More related to lifecycle processing. 
Filed a new bug here: http://www.netbeans.org/issues/show_bug.cgi?id=104434
Comment 8 Jayashri Visvanathan 2007-06-05 02:02:11 UTC
Can you mark this bug as INVALID ?
Comment 9 Yousuf Haider 2007-06-05 06:24:01 UTC
Marking issue as invalid since its a Tomcat issue.