You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Sam Ruby <ru...@us.ibm.com> on 2001/06/04 01:55:42 UTC

Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection causes compatibility problems

+1 on the promptness of the reply.

-1 on the content on the reply.  IMHO, this change will wreak havok...  At
a minimum, it affects struts, xalan2, commons-dbcp, avalon, and castor.

Anybody else have an opinion on the subject?

And, if this won't be accepted as a bug, anybody have suggestions on how to
pursue this further?

- Sam Ruby
---------------------- Forwarded by Sam Ruby/Raleigh/IBM on 06/03/2001
07:51 PM ---------------------------

"Bret O'Neal" <pl...@sun.com> on 06/03/2001 06:52:20 PM

To:   rubys@apache.org
cc:
Subject:  Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection
      causes compatibility problems



Hi Sam Ruby,

The changes to the Interface are known about and have been
CCC approved. I know that doesn't help you but, it does make it
not a bug.

Regards,
Bret
----------------- Original Bug Report-------------------

category : java
subcategory : jdbc
release : merlin-beta
type : bug
synopsis : JDK1.4 additions to java.sql.Connection causes compatibility
problems
description : Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

Attempting to compile jakarta-struts on JDK1.4 produces the following
errors:

[javac] Compiling 132 source files to
/home/rubys/jakarta/jakarta-struts/target/library/classes
    [javac]
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:

class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.CallableStatement prepareCall(java.lang.String, int, int,
int)
from interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac]
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:

class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.Statement createStatement(int, int, int) from interface
java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.Savepoint setSavepoint() from interface
java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.Savepoint setSavepoint(java.lang.String) from interface
java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define void rollback(java.sql.Savepoint) from interface
java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.PreparedStatement prepareStatement(java.lang.String, int,
int,
int) from interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.PreparedStatement prepareStatement(java.lang.String, int)
from
interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.PreparedStatement prepareStatement(java.lang.String, int[])
from interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define java.sql.PreparedStatement prepareStatement(java.lang.String,
java.lang.String[]) from interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define void releaseSavepoint(java.sql.Savepoint) from interface
java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define void setHoldability(int) from interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
org.apache.struts.util.GenericConnection must be declared abstract. It does
not
define int getHoldability() from interface java.sql.Connection.
    [javac] public class GenericConnection implements Connection {
    [javac]              ^
    [javac] /home/rubys/jakarta/jakarta-
struts/src/share/org/apache/struts/util/GenericDataSource.java:626: class
org.apache.struts.util.GenericConnection is an abstract class. It can't be
instantiated.
    [javac]             return (new GenericConnection(this, conn,
autoCommit,
readOnly));
    [javac]                     ^
    [javac] Note: 25 files use or override a deprecated API.  Recompile
with "-
deprecation" for details.
    [javac] 13 errors, 1 warning
workaround : Remain on JDK 1.3
suggested_val :
cust_name : Sam Ruby
cust_email : rubys@apache.org
jdcid : rubys
keyword : webbug
company : Apache
hardware : x86
OSversion : Linux
bugtraqID : 4379943
dateCreated : 2001-06-01 18:00:34.3
dateEvaluated : 2001-06-03 15:51:21.810




---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection causes compatibility problems

Posted by Geoff Soutter <ge...@whitewolf.com.au>.
"Peter Donald" <do...@apache.org> wrote:
> At 10:48 AM 6/4/01 +1000, Geoff Soutter wrote:
> >However, what can they do? Presumably JDBC needs to change over time, and
> >this means that those who attempt to implement the interfaces must update
> >their stuff to be compatibile. Leaving JDBC set in stone for ever doesn't
> >seem like a viable option.
>
> nope though there is some people around here who suggest that it is ;)

:-)

> If you want to keep using the same name the standard way of doing it is to
> use something like
>
> interface Foo {}
> class AbstractFoo {}

yeah, thats cool, but what about JDBC? It's a bit late for that now isn't
it?

Geoff



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection causes compatibility problems

Posted by Peter Donald <do...@apache.org>.
At 10:48 AM 6/4/01 +1000, Geoff Soutter wrote:
>However, what can they do? Presumably JDBC needs to change over time, and
>this means that those who attempt to implement the interfaces must update
>their stuff to be compatibile. Leaving JDBC set in stone for ever doesn't
>seem like a viable option. 

nope though there is some people around here who suggest that it is ;)

>Or would you rather we do the MS thing and have
>CallableStatement2?

If you want to keep using the same name the standard way of doing it is to
use something like

interface Foo {}
class AbstractFoo {}

And suggest that most people extend AbstractFoo. When you need to change
Foo interface you also add methods to AbstractFoo that throw exceptions on
use, or perform noop.

Either way forward compatibility is easier and you still maintain the
advantages of having interface to define the comm layer.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection causes compatibility problems

Posted by Geoff Soutter <ge...@whitewolf.com.au>.
Strange. I was talking to the guy from Sun who lead the original JDBC spec
via email the other day and he mentioned how using interfaces in JDBC was a
bad decision because of forward compatibility problems. Now I know what he
means :-).

However, what can they do? Presumably JDBC needs to change over time, and
this means that those who attempt to implement the interfaces must update
their stuff to be compatibile. Leaving JDBC set in stone for ever doesn't
seem like a viable option. Or would you rather we do the MS thing and have
CallableStatement2?

Geoff

----- Original Message -----
From: "Sam Ruby" <ru...@us.ibm.com>
To: <ge...@jakarta.apache.org>
Cc: <jc...@jakarta.apache.org>
Sent: Monday, June 04, 2001 9:55 AM
Subject: Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection
causes compatibility problems


> +1 on the promptness of the reply.
>
> -1 on the content on the reply.  IMHO, this change will wreak havok...  At
> a minimum, it affects struts, xalan2, commons-dbcp, avalon, and castor.
>
> Anybody else have an opinion on the subject?
>
> And, if this won't be accepted as a bug, anybody have suggestions on how
to
> pursue this further?
>
> - Sam Ruby
> ---------------------- Forwarded by Sam Ruby/Raleigh/IBM on 06/03/2001
> 07:51 PM ---------------------------
>
> "Bret O'Neal" <pl...@sun.com> on 06/03/2001 06:52:20 PM
>
> To:   rubys@apache.org
> cc:
> Subject:  Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection
>       causes compatibility problems
>
>
>
> Hi Sam Ruby,
>
> The changes to the Interface are known about and have been
> CCC approved. I know that doesn't help you but, it does make it
> not a bug.
>
> Regards,
> Bret
> ----------------- Original Bug Report-------------------
>
> category : java
> subcategory : jdbc
> release : merlin-beta
> type : bug
> synopsis : JDK1.4 additions to java.sql.Connection causes compatibility
> problems
> description : Java(TM) 2 Runtime Environment, Standard Edition (build
> 1.4.0-beta-b65)
> Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
>
> Attempting to compile jakarta-struts on JDK1.4 produces the following
> errors:
>
> [javac] Compiling 132 source files to
> /home/rubys/jakarta/jakarta-struts/target/library/classes
>     [javac]
>
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericC
onnection.java:89:
>
> class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.CallableStatement prepareCall(java.lang.String, int, int,
> int)
> from interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac]
>
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericC
onnection.java:89:
>
> class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.Statement createStatement(int, int, int) from interface
> java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.Savepoint setSavepoint() from interface
> java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.Savepoint setSavepoint(java.lang.String) from interface
> java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define void rollback(java.sql.Savepoint) from interface
> java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.PreparedStatement prepareStatement(java.lang.String, int,
> int,
> int) from interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.PreparedStatement prepareStatement(java.lang.String, int)
> from
> interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.PreparedStatement prepareStatement(java.lang.String,
int[])
> from interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define java.sql.PreparedStatement prepareStatement(java.lang.String,
> java.lang.String[]) from interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define void releaseSavepoint(java.sql.Savepoint) from interface
> java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define void setHoldability(int) from interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericConnection.java:89: class
> org.apache.struts.util.GenericConnection must be declared abstract. It
does
> not
> define int getHoldability() from interface java.sql.Connection.
>     [javac] public class GenericConnection implements Connection {
>     [javac]              ^
>     [javac] /home/rubys/jakarta/jakarta-
> struts/src/share/org/apache/struts/util/GenericDataSource.java:626: class
> org.apache.struts.util.GenericConnection is an abstract class. It can't be
> instantiated.
>     [javac]             return (new GenericConnection(this, conn,
> autoCommit,
> readOnly));
>     [javac]                     ^
>     [javac] Note: 25 files use or override a deprecated API.  Recompile
> with "-
> deprecation" for details.
>     [javac] 13 errors, 1 warning
> workaround : Remain on JDK 1.3
> suggested_val :
> cust_name : Sam Ruby
> cust_email : rubys@apache.org
> jdcid : rubys
> keyword : webbug
> company : Apache
> hardware : x86
> OSversion : Linux
> bugtraqID : 4379943
> dateCreated : 2001-06-01 18:00:34.3
> dateEvaluated : 2001-06-03 15:51:21.810
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: (Review ID: 125649) JDK1.4 additions to java.sql.Connection causes compatibility problems

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/3/01 4:55 PM, "Sam Ruby" <ru...@us.ibm.com> wrote:

> And, if this won't be accepted as a bug, anybody have suggestions on how to
> pursue this further?
> 
> - Sam Ruby

Tomorrow, during the keynote, run up on stage and tell 15,000 people that
Sun can't even follow their own policies.

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Balmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org