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.
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.
Created attachment 44210 [details] Server Output
Created attachment 44211 [details] sun-resources.xml
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.
The plugin should extend its check to the database name,user and password of the connection when attempting to create a connection pool resource.
Fixed. http://serverplugins.netbeans.org/source/browse/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/ide/sunresources/beans/ResourceConfigurator.java?r1=1.17&r2=1.18 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/ide/sunresources/beans/ResourceUtils.java?r1=1.23&r2=1.24
Verified fix on build : 200708031200
*** Issue 111520 has been marked as a duplicate of this issue. ***