You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Moritz Hoffmann (JIRA)" <ji...@apache.org> on 2013/03/20 21:07:15 UTC
[jira] [Comment Edited] (GERONIMO-6138) JDBC 4 API is not supported
[ https://issues.apache.org/jira/browse/GERONIMO-6138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13608100#comment-13608100 ]
Moritz Hoffmann edited comment on GERONIMO-6138 at 3/20/13 8:05 PM:
--------------------------------------------------------------------
Note: The tracker interprets some content as markup. Please look at the attached patches for correct diffs.
I was able to build a custom Geronimo with JDBC 4 support for DB2. Here are the instructions on what needs to be done.
- Checkout tranql and build it. It is available in SVN on https://svn.codehaus.org/tranql/ra/trunk/
- This will fail as the DB2 driver is not available. Install the db2jcc4 driver into the local maven repo using
mvn install:install-file -Dfile=${path to db2jcc4.jar} \
-DgroupId=com.ibm.db2 \
-DartifactId=db2jcc4 \
-Dversion=10.1 \
-Dpackaging=jar
mvn install:install-file -Dfile=${path to db2jcc.jar} \
-DgroupId=com.ibm.db2 \
-DartifactId=db2jcc \
-Dversion=10.1 \
-Dpackaging=jar
mvn install:install-file -Dfile=${path to db2jcc_license_cu.jar} \
-DgroupId=com.ibm.db2 \
-DartifactId=db2jcc_license_cu \
-Dversion=10.1 \
-Dpackaging=jar
- Change the tranql version to 1.8. I used the versions:set maven plug-in, set the version to 1.8, like this:
mvn versions:set -DnewVersion=1.8
This needs to be done for tranql-connector-[db2,parent,generic].
- Tell the DB2 connector to use db2jcc4:
--- tranql-connector-db2/tranql-connector-db2-common/pom.xml (revision 862)
+++ tranql-connector-db2/tranql-connector-db2-common/pom.xml (working copy)
@@ -34,7 +34,7 @@
<dependencies>
<dependency>
<groupId>com.ibm.db2</groupId>
- <artifactId>db2jcc</artifactId>
+ <artifactId>db2jcc4</artifactId>
<scope>provided</scope>
</dependency>
And:
--- tranql-connector-db2/pom.xml (revision 862)
+++ tranql-connector-db2/pom.xml (working copy)
@@ -44,20 +44,20 @@
</scm>
<properties>
- <db2.version>9.5</db2.version>
+ <db2.version>10.1</db2.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.ibm.db2</groupId>
- <artifactId>db2jcc</artifactId>
+ <artifactId>db2jcc4</artifactId>
<version>${db2.version}</version>
</dependency>
- Try to build the generic and db2 parts and install them in the local repository (mvn install). If a compile error occurs, then apply the following patch:
--- tranql-connector-db2/tranql-connector-db2-common/src/main/java/org/tranql/connector/db2/XAMCF.java (revision 862)
+++ tranql-connector-db2/tranql-connector-db2-common/src/main/java/org/tranql/connector/db2/XAMCF.java (working copy)
@@ -54,7 +54,7 @@
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException {
CredentialExtractor credentialExtractor = new CredentialExtractor(subject, connectionRequestInfo, this);
- XAConnection sqlConnection = getPhysicalConnection(subject, credentialExtractor);
+ XAConnection sqlConnection = getPhysicalConnection(credentialExtractor);
try {
ManagedXAConnection mxac = null;
if (preparedStatementCacheSize > 0) {
Try to build it again.
- Tell Geronimo to use our custom tranql 1.8 by changing some version numbers:
--- plugins/connector-1_6/pom.xml (revision 1452838)
+++ plugins/connector-1_6/pom.xml (working copy)
@@ -186,7 +186,7 @@
<dependency>
<groupId>org.tranql</groupId>
<artifactId>tranql-connector-db2-xa</artifactId>
- <version>1.7</version>
+ <version>1.8</version>
<type>rar</type>
<exclusions>
<exclusion>
--- pom.xml (revision 1452838)
+++ pom.xml (working copy)
@@ -81,8 +81,8 @@
<xbeanBundleUtilsVersion>3.12</xbeanBundleUtilsVersion>
<jetty>jetty8</jetty>
<txmanagerVersion>3.1.1</txmanagerVersion>
- <tranqlVersion>1.7</tranqlVersion>
- <tranqlDerbyVersion>1.7</tranqlDerbyVersion>
+ <tranqlVersion>1.8</tranqlVersion>
+ <tranqlDerbyVersion>1.8</tranqlDerbyVersion>
<jaxbImplVersion>2.2.3-1_1</jaxbImplVersion>
<monitoringConsoleVersion>${project.version}</monitoringConsoleVersion>
- Patch Geronimo to fix one compile error:
--- plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/datasource/DataSourceService.java (revision 1452838)
+++ plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/datasource/DataSourceService.java (working copy)
@@ -252,9 +252,9 @@
}
@Override
- protected XAConnection getPhysicalConnection(Subject subject, CredentialExtractor credentialExtractor)
+ protected XAConnection getPhysicalConnection(CredentialExtractor credentialExtractor)
throws ResourceException {
- XAConnection connection = super.getPhysicalConnection(subject, credentialExtractor);
+ XAConnection connection = super.getPhysicalConnection(credentialExtractor);
int isolationLevel = dataSourceDescription.getIsolationLevel();
if (isolationLevel != -1) {
try {
Afterwards Geronimo should build correctly. I also attach two SVN diffs containing all changes I made.
was (Author: antiguru):
I was able to build a custom Geronimo with JDBC 4 support for DB2. Here are the instructions on what needs to be done.
- Checkout tranql and build it. It is available in SVN on https://svn.codehaus.org/tranql/ra/trunk/
- This will fail as the DB2 driver is not available. Install the db2jcc4 driver into the local maven repo using
mvn install:install-file -Dfile=${path to db2jcc4.jar} \
-DgroupId=com.ibm.db2 \
-DartifactId=db2jcc4 \
-Dversion=10.1 \
-Dpackaging=jar
mvn install:install-file -Dfile=${path to db2jcc.jar} \
-DgroupId=com.ibm.db2 \
-DartifactId=db2jcc \
-Dversion=10.1 \
-Dpackaging=jar
mvn install:install-file -Dfile=${path to db2jcc_license_cu.jar} \
-DgroupId=com.ibm.db2 \
-DartifactId=db2jcc_license_cu \
-Dversion=10.1 \
-Dpackaging=jar
- Change the tranql version to 1.8. I used the versions:set maven plug-in, set the version to 1.8, like this:
mvn versions:set -DnewVersion=1.8
This needs to be done for tranql-connector-[db2,parent,generic].
- Tell the DB2 connector to use db2jcc4:
--- tranql-connector-db2/tranql-connector-db2-common/pom.xml (revision 862)
+++ tranql-connector-db2/tranql-connector-db2-common/pom.xml (working copy)
@@ -34,7 +34,7 @@
<dependencies>
<dependency>
<groupId>com.ibm.db2</groupId>
- <artifactId>db2jcc</artifactId>
+ <artifactId>db2jcc4</artifactId>
<scope>provided</scope>
</dependency>
And:
--- tranql-connector-db2/pom.xml (revision 862)
+++ tranql-connector-db2/pom.xml (working copy)
@@ -44,20 +44,20 @@
</scm>
<properties>
- <db2.version>9.5</db2.version>
+ <db2.version>10.1</db2.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.ibm.db2</groupId>
- <artifactId>db2jcc</artifactId>
+ <artifactId>db2jcc4</artifactId>
<version>${db2.version}</version>
</dependency>
- Try to build the generic and db2 parts and install them in the local repository (mvn install). If a compile error occurs, then apply the following patch:
--- tranql-connector-db2/tranql-connector-db2-common/src/main/java/org/tranql/connector/db2/XAMCF.java (revision 862)
+++ tranql-connector-db2/tranql-connector-db2-common/src/main/java/org/tranql/connector/db2/XAMCF.java (working copy)
@@ -54,7 +54,7 @@
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException {
CredentialExtractor credentialExtractor = new CredentialExtractor(subject, connectionRequestInfo, this);
- XAConnection sqlConnection = getPhysicalConnection(subject, credentialExtractor);
+ XAConnection sqlConnection = getPhysicalConnection(credentialExtractor);
try {
ManagedXAConnection mxac = null;
if (preparedStatementCacheSize > 0) {
Try to build it again.
- Tell Geronimo to use our custom tranql 1.8 by changing some version numbers:
--- plugins/connector-1_6/pom.xml (revision 1452838)
+++ plugins/connector-1_6/pom.xml (working copy)
@@ -186,7 +186,7 @@
<dependency>
<groupId>org.tranql</groupId>
<artifactId>tranql-connector-db2-xa</artifactId>
- <version>1.7</version>
+ <version>1.8</version>
<type>rar</type>
<exclusions>
<exclusion>
--- pom.xml (revision 1452838)
+++ pom.xml (working copy)
@@ -81,8 +81,8 @@
<xbeanBundleUtilsVersion>3.12</xbeanBundleUtilsVersion>
<jetty>jetty8</jetty>
<txmanagerVersion>3.1.1</txmanagerVersion>
- <tranqlVersion>1.7</tranqlVersion>
- <tranqlDerbyVersion>1.7</tranqlDerbyVersion>
+ <tranqlVersion>1.8</tranqlVersion>
+ <tranqlDerbyVersion>1.8</tranqlDerbyVersion>
<jaxbImplVersion>2.2.3-1_1</jaxbImplVersion>
<monitoringConsoleVersion>${project.version}</monitoringConsoleVersion>
- Patch Geronimo to fix one compile error:
--- plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/datasource/DataSourceService.java (revision 1452838)
+++ plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/datasource/DataSourceService.java (working copy)
@@ -252,9 +252,9 @@
}
@Override
- protected XAConnection getPhysicalConnection(Subject subject, CredentialExtractor credentialExtractor)
+ protected XAConnection getPhysicalConnection(CredentialExtractor credentialExtractor)
throws ResourceException {
- XAConnection connection = super.getPhysicalConnection(subject, credentialExtractor);
+ XAConnection connection = super.getPhysicalConnection(credentialExtractor);
int isolationLevel = dataSourceDescription.getIsolationLevel();
if (isolationLevel != -1) {
try {
Afterwards Geronimo should build correctly. I also attach two SVN diffs containing all changes I made.
> JDBC 4 API is not supported
> ----------------------------
>
> Key: GERONIMO-6138
> URL: https://issues.apache.org/jira/browse/GERONIMO-6138
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M1, 3.0.0
> Reporter: Arnaud MERGEY
> Fix For: 3.0.1
>
> Attachments: geronimo.patch, tranql.patch
>
>
> I try to deploy an application that uses some JDBC 4 API like java.sql.ResultSet.isClosed()
> This calls fails with following error
> java.lang.AbstractMethodError: org.tranql.connector.jdbc.ResultSetHandle.isClosed()Z
> According to JEE 6 specifications, JDBC 4 API should be supported in Geronimo 3, and it seems not.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira