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 113519 - Problem in Database Table binding with Table component. IDE log Error : java.lang.NullPointerException at com.sun.sql.rowset.CachedRowSetXImpl.initMetaData(CachedRowSetXImpl.java:865)
Summary: Problem in Database Table binding with Table component. IDE log Error : java....
Status: RESOLVED WORKSFORME
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: _ jimdavidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 16:02 UTC by chenji
Modified: 2007-08-23 17:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
5.5.1 IDE Log file (25.68 KB, application/octet-stream)
2007-08-22 16:03 UTC, chenji
Details
Sun appserver log file (11.36 KB, application/octet-stream)
2007-08-22 16:04 UTC, chenji
Details
Image file (8.75 KB, application/octet-stream)
2007-08-22 16:05 UTC, chenji
Details
Databinding Screenshot (9.63 KB, image/png)
2007-08-23 17:55 UTC, _ jimdavidson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chenji 2007-08-22 16:02:25 UTC
Problem in Database Table binding with Table component submitted by one of our customer.

Connect to Oracle 9i database from NetBeans 5.5.1 IDE & VWP 5.5.1 using Oracle 10g drivers on Windows XP.
Select users table view data (data is returned, all ok) from connection.

Steps :

NetBeans 5.5.1 IDE -> File menu -> New Project -> Web -> Visual Web Application -> Provide a project name -> Finish.
2. Project opens under Projects Tab -> Page1.jsp -> Drag table component to the visual canvas from the pallete.
3. Drag table users from the connection on to that canvas and release mouse button once within boundaries of table..
4. The rowset and dataprovider shows up in outline but the table never shows "123" or "abc" not even the table fields also.
5. Clean and build is successful.

Also attached are the IDE & Server log files

Error stack in NetBeans 5.5.1 IDE Log File

*********** Exception occurred ************ at 1:07 PM on Aug 21, 2007
java.lang.NullPointerException
        at com.sun.sql.rowset.CachedRowSetXImpl.initMetaData(CachedRowSetXImpl.java:865)
        at com.sun.sql.rowset.CachedRowSetXImpl.getMetaData(CachedRowSetXImpl.java:2397)
        at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1372)
        at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDataProvider.java:494)
        at com.sun.webui.jsf.component.TableDesignInfo.linkBeans(TableDesignInfo.java:176)
        at com.sun.rave.insync.models.FacesModel.linkBeans(FacesModel.java:1143)
[catch] at com.sun.rave.insync.FacesDnDSupport.processLinks(FacesDnDSupport.java:940)
        at com.sun.rave.insync.FacesDnDSupport.importBean(FacesDnDSupport.java:510)
        at com.sun.rave.insync.FacesDnDSupport.importData(FacesDnDSupport.java:308)
        at com.sun.rave.designer.jsf.JsfForm.importData(JsfForm.java:602)
        at com.sun.rave.designer.WebForm.importData(WebForm.java:1628)
        at com.sun.rave.designer.DndHandler.doImportDataDelayed(DndHandler.java:582)
        at com.sun.rave.designer.DndHandler.importDataDelayed(DndHandler.java:425)
        at com.sun.rave.designer.DndHandler.access$000(DndHandler.java:117)
        at com.sun.rave.designer.DndHandler$1.run(DndHandler.java:350)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
----------------------------------END OF IDE LOG-----------------------------------------------------------------------

Creating the following table under default schema 'SCOTT' (scott/tiger)

Oracle 9i Database Schema :

create sequence seq_test
minvalue 1
maxvalue 100
start with 1
increment by 1
nocache;

create table users (
userid INTEGER NOT NULL,
username VARCHAR2(30) NOT NULL,
password VARCHAR2(30) NOT NULL,
firstname VARCHAR2(50) NOT NULL,
lastname VARCHAR2(50) NOT NULL,
email VARCHAR2(50) NOT NULL,
CONSTRAINT Userid_pk PRIMARY KEY (userid));

insert into users values(seq_test.nextval, 'Robin', 'smith', 'Robin', 'Smith', 'robin.smith@abc.com');
insert into users values(seq_test.nextval, 'John', 'F', 'John', 'F', 'john.f@abc.com');
Comment 1 chenji 2007-08-22 16:03:21 UTC
Created attachment 47072 [details]
5.5.1 IDE Log file
Comment 2 chenji 2007-08-22 16:04:31 UTC
Created attachment 47074 [details]
Sun appserver log file
Comment 3 chenji 2007-08-22 16:05:10 UTC
Created attachment 47075 [details]
Image file
Comment 4 _ jimdavidson 2007-08-23 07:48:03 UTC
Please don't set "Target Milestone" when filing an issue.  That's set by the engineer who's working on the bug (i.e.,
me) once it's been reproduced and there's a commitment to fix it.

Could you provide some information to track this down?  From your description, it looks like you never got as far as
deploying the project.  I.e., the problem occurs at design time, right?

Finally, which driver version are you using?  Latest is 10.2.0.3, but any v10 driver should work.
Comment 5 chenji 2007-08-23 07:59:40 UTC
We have recommended the customer to use Oracle 10g drivers & also we have asked him to use the Oracle Database 10g 
Release 2 (10.2.0.3) JDBC Drivers which can be downloaded from the following link

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html

And also the customer is also using the same driver, But still he encounters the problem in database table binding with
the table component in the visual editor in the IDE.

Please suggest..
Comment 6 _ jimdavidson 2007-08-23 17:53:56 UTC
Thanks for the details instructions.  I followed the given steps, using NB5.5.1, Oracle 9i, Oracle JDBC drivers
10.2.0.3.  Everything worked fine.  See attached screenshot showing databinding.

Looking at the IDE log file that you posted, I see an authentication failure:
"java.sql.SQLException: ORA-01017: invalid username/password; logon denied"

That could be part of your problem.
Comment 7 _ jimdavidson 2007-08-23 17:55:42 UTC
Created attachment 47195 [details]
Databinding Screenshot