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 113948 - At runtime connection fails to 2 databases - bind resource error
Summary: At runtime connection fails to 2 databases - bind resource error
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC All
: P1 blocker (vote)
Assignee: John Baker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-28 08:31 UTC by John Baker
Modified: 2007-09-04 16:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace from server log (8.34 KB, text/plain)
2007-08-28 08:33 UTC, John Baker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Baker 2007-08-28 08:31:31 UTC
After installing the JDBC Rowset plug-in there is a problem at runtime

1) Create a new Java EE 5 project with Glassfish as the default server
2) Drag and drop one Button to the page
3) In the Services tab, register an Oracle JDBC driver and an Oracle connection
jdbc:oracle:thin:@rave-cheetah.sfbay.sun.com:1521:ora9i
user = travel
password = travel

4)drop the HOTEL table from Oracle connection and bind to the button
5) Execute

Result: 
(Success) One button appears with data retrieved from Oracle

Then add a 2nd button and connect to a different database:

4) Drag and drop  a button component
5) Drag and drop the STATE table from the VIR connection and bind to the 2nd button
6) Execute

No buttons appear.

See attached stack trace
Comment 1 John Baker 2007-08-28 08:33:05 UTC
Created attachment 47566 [details]
stack trace from server log
Comment 2 John Baker 2007-08-28 08:38:39 UTC
For 6.0 the plan is to make the Rowset RI an nbm to download since the Rowset RI is really an external library.

The Rowset RI nbm is only needed for J2EE 1.4 projects with the source level set to 1.4 (J2SE 1.4 recommended)

When deploying to Java EE 5 servers, the Rowset RI is used from J2SE 1.5 and 1.6.
No bugs have been found with this configuration combination (the use case described in this issue works)

Once the Rowset nbm is installed, even new Visual Web projects that have the target server set to Glassfish
and source level 1.5, the use case in this issue fails as described.

Need to find out what is differs in Rowset RI 1.0.1 vs. the Rowset RI bundled with J2SE 1.5
Comment 3 John Baker 2007-08-28 08:39:22 UTC
Marking as INCOMPLETE as more investigation is needed
Still the issue will be discussed ASAP
Comment 4 John Baker 2007-08-28 08:44:15 UTC
This sounds like the issue David had encountered with the Rowset early on
but adding the Rowset extension seemed to fix the issue.

Could the Rowset extension not get included in the classpath ?
Comment 5 John Baker 2007-08-28 08:48:39 UTC
Currently, the implementation to support J2EE 1.4 project is not available.

I tested the latest local implementation from the project's module but found that after installing
the Rowset plugin that still a J2EE 1.4 project could not be created.

A note was sent to the owner of project's on this limitation
Comment 6 Lark Fitzgerald 2007-08-28 14:20:31 UTC
This may be a separate issue, but when you create a EE4 project (glassfish 58c) you see a Rowset error:
The project(s) ("jb") just opened require:
* The Rowset Reference Implementation (RI)
is required for the J2SE 1.4 project.
it is (they are) not installed in the IDE.
Pleae install the RI from the Update Center.

I checked, and its not there.
Comment 7 _ jimdavidson 2007-08-28 17:08:02 UTC
That particular exception usually indicates an access rights error.  E.g.,
 http://www.adp-gmbh.ch/ora/err/ora_00942.html

Could the RowSet RI be doing something that leads to a problem here?
Comment 8 John Baker 2007-08-28 21:03:01 UTC
Bind resource reference causes the JNDI name to be used for the 2nd connection.

After fixing the resource reference manually, deployment is fine
Comment 9 John Baker 2007-08-28 22:45:16 UTC
fix available
Comment 10 John Baker 2007-08-28 23:00:29 UTC
Fixed
If more than one database from different connections were used in an application there was no check to make sure
the JNDI name created had corresponded with the requested resource 

Checking in
visualweb/project/jsf/src/org/netbeans/modules/visualweb/project/jsf/services/DesignTimeDataSourceServiceImpl.java;
/cvs/visualweb/project/jsf/src/org/netbeans/modules/visualweb/project/jsf/services/DesignTimeDataSourceServiceImpl.java,v
 <--  DesignTimeDataSourceSe
rviceImpl.java
new revision: 1.12; previous revision: 1.11
done
Comment 11 _ alexpetrov 2007-09-04 16:02:55 UTC
Verified on:

Product Version: NetBeans IDE Dev (Build 200709040000) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 
System: Windows XP version 5.1 running on x86