Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 107697 - Resource conflict on Glassfish when page uses 2 derby datasources
Resource conflict on Glassfish when page uses 2 derby datasources
Status: VERIFIED FIXED
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9
6.x
PC Windows XP
: P2 (vote)
: 6.x
Assigned To: Nitya Doraisamy
issues@serverplugins
:
: 111520 (view as bug list)
Depends on:
Blocks: 111037
  Show dependency treegraph
 
Reported: 2007-06-21 18:26 UTC by Yousuf Haider
Modified: 2007-08-21 19:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Server Output (140.16 KB, text/plain)
2007-06-21 18:26 UTC, Yousuf Haider
Details
sun-resources.xml (2.78 KB, text/xml)
2007-06-21 18:27 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-06-21 18:26:02 UTC
Build:200706211330
JDk6.
Glassfish v2b50

Steps to reproduce:
1. Create new VWP project.
2. Drop a listbox on the page.
3. Bind the listbox to a table from Sample APP schema.
At this point a new JDBC resource is defined in sun-resources.xml which uses a connection pool 'derby_netpool' (also
newly defined).
4. Now bind the listobx to a table from the Sample Travel schema.
At this point another JDBC resource as well as another connection pool with the same name 'derby_netpool' but with
differing parameter values is defined.

This causes  2 connection pools with the same name to be defined. As a result deployment fails with this error:

"The resource derby_netPool at META-INF\sun-resources.xml is having a conflict with another resource defined within
archive."

I've atttached the server log and sun-resources.xml.

Workaround is to change pool name in the sun-resources.xml in the 2nd connection pool entry as well as in the second
jdbc resource definition.

I believe this would also happen for other databases as well.
Comment 1 Yousuf Haider 2007-06-21 18:26:29 UTC
Created attachment 44210 [details]
Server Output
Comment 2 Yousuf Haider 2007-06-21 18:27:19 UTC
Created attachment 44211 [details]
sun-resources.xml
Comment 3 _ jimdavidson 2007-07-23 23:24:35 UTC
It looks like the problem is in ResourceConfigurator.createDataSource().

It checks whether the required pool already exists (which fails, because the database name is not the same), then
creates the pool with the same name.  I think it should either reuse the existing pool, or use a different name for the
new pool.
Comment 4 Nitya Doraisamy 2007-07-24 04:00:12 UTC
The plugin should extend its check to the database name,user and password of the connection when attempting to create
a connection pool resource. 
Comment 6 Yousuf Haider 2007-08-04 00:55:15 UTC
Verified fix on build : 200708031200
Comment 7 John Baker 2007-08-21 19:32:44 UTC
*** Issue 111520 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo