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 86281 - connection pool configuration: missing properties for certain drivers
Summary: connection pool configuration: missing properties for certain drivers
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-02 08:30 UTC by Nitya Doraisamy
Modified: 2006-10-05 12:38 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff of fix on release55_dev (19.47 KB, text/plain)
2006-10-02 13:54 UTC, Nitya Doraisamy
Details
patch of fix (9.49 KB, text/plain)
2006-10-05 12:34 UTC, Nitya Doraisamy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nitya Doraisamy 2006-10-02 08:30:58 UTC
Use JDBC driver( smbase.jar, smsqlserver.jar and smutil.jar) to connect
MSSQL server. Create a Connect to DB works fine from IDE runtime. Use the same
application mention above. Create JDBC datasource and a JDBC connection pool
pointing to the MSSQL DB. This time the connection pool cannot connect to DB.  
 From admin GUI, if you click ping button of the connection pool. The  error
will thrown:
Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target
exception message: Connection could not be allocated because: [sunm][SQLServer
JDBC Driver]A value was not specified for a required property: serverName

Add serverName property either from IDE or admin GUI. Then the application works.
URL for connecting to SQL Server with the Sun DataDirect drivers is:

jdbc:sun:sqlserver://<server_name>[:<portNumber>];databaseName=<database>;selectMethod=cursor

It would probably be good to test with Sybase as well;
Comment 1 Nitya Doraisamy 2006-10-02 08:32:29 UTC
Moved comments from filer(Jim Davidson jimdavidson@netbeans.org) from issue
84391 to here,

I also tested the DataDirect drivers as obtained from DataDirect (i.e.,
non-Sun-branded):

Driver Class:
    com.ddtek.jdbc.oracle.OracleDriver
    com.ddtek.jdbc.sqlserver.SQLServerDriver
    com.ddtek.jdbc.db2.DB2Driver

URL:
    jdbc:datadirect:oracle://<server_name>[:<portNumber>];SID=<database>
    jdbc:datadirect:sqlserver://<server_name>[:<portNumber>];databaseName=<database>
    jdbc:datadirect:db2://<server_name>:<portNumber>DatabaseName=<database>

This time, SQL Server and DB2 worked, but the Oracle version failed with a
complaint about missing serverName.  Sure enough, the datadirect_oraclePool did
not have a serverName property.
Comment 2 Nitya Doraisamy 2006-10-02 13:54:03 UTC
Created attachment 34764 [details]
diff of fix on release55_dev
Comment 3 Nitya Doraisamy 2006-10-02 14:09:28 UTC
Jim, Could you use the attached diff of the fix in your build and test the
additional drivers. 
Provide your feedback on this issue. Since we are on the last day of P2 fixes,
we will have to decide on if and how we integrate this patch after you test.
Thanks
Comment 4 Nitya Doraisamy 2006-10-02 14:39:28 UTC
Checked in patch to release55_dev, after discussion with Petr Blaha.
Porting of fix into release55 dependent on verification and discussion.

Checking in sunresources/beans/CPWizard.xml;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/sunresources/beans/CPWizard.xml,v
 <--  CPWizard.xml
new revision: 1.1.16.3.2.4.2.3; previous revision: 1.1.16.3.2.4.2.2
done
Checking in sunresources/beans/WizardConstants.java;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/sunresources/beans/WizardConstants.java,v
 <--  WizardConstants.java
new revision: 1.1.16.4.2.9.10.2; previous revision: 1.1.16.4.2.9.10.1
done
Checking in ide/sunresources/beans/ResourceConfigurator.java;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/ide/sunresources/beans/ResourceConfigurator.java,v
 <--  ResourceConfigurator.java
new revision: 1.3.6.5.2.13.6.3; previous revision: 1.3.6.5.2.13.6.2
done
Checking in ide/sunresources/beans/ResourceUtils.java;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/ide/sunresources/beans/ResourceUtils.java,v
 <--  ResourceUtils.java
new revision: 1.2.4.3.2.16.6.3; previous revision: 1.2.4.3.2.16.6.2
done
Comment 5 _ jimdavidson 2006-10-03 07:34:57 UTC
Sorry, I was out part of the day, then had problems applying the patch.

I tested the two cases that I reported as broken yesterday:
    - Sun-branded DataDirect drivers on SQL Server
    - non-Sun-branded DataDirect drivers on Oracle

Both worked.  In each case I also used the app server admin console to check the
relevant connection pool:
    - sun_msftsqlPool
    - datadirect_oraclePool

In both cases the serverName property was set.
Comment 6 Petr Blaha 2006-10-03 13:09:12 UTC
The issue was verified. The fix might be merged in release55 after code review.
Comment 7 Nitya Doraisamy 2006-10-05 12:34:37 UTC
Created attachment 34911 [details]
patch of fix
Comment 8 Nitya Doraisamy 2006-10-05 12:35:21 UTC
Attached new patch of fix. Previous patch generated via Netbeans does not apply
correctly.
Comment 9 Nitya Doraisamy 2006-10-05 12:38:28 UTC
Fix checked into release55.
Code Reviewed by Ludo

Checking in sunresources/beans/CPWizard.xml;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/sunresources/beans/CPWizard.xml,v
 <--  CPWizard.xml
new revision: 1.1.16.3.2.6; previous revision: 1.1.16.3.2.5
done
Checking in sunresources/beans/WizardConstants.java;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/sunresources/beans/WizardConstants.java,v
 <--  WizardConstants.java
new revision: 1.1.16.4.2.11; previous revision: 1.1.16.4.2.10
done
Checking in ide/sunresources/beans/ResourceConfigurator.java;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/ide/sunresources/beans/ResourceConfigurator.java,v
 <--  ResourceConfigurator.java
new revision: 1.3.6.5.2.15; previous revision: 1.3.6.5.2.14
done
Checking in ide/sunresources/beans/ResourceUtils.java;
/cvs/serverplugins/sun/appsrv/src/org/netbeans/modules/j2ee/sun/ide/sunresources/beans/ResourceUtils.java,v
 <--  ResourceUtils.java
new revision: 1.2.4.3.2.18; previous revision: 1.2.4.3.2.17
done