commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EMR (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DBUTILS-125) Using Oracle OJDBC7 gives ORA-00933
Date Wed, 29 Apr 2015 16:56:06 GMT

    [ https://issues.apache.org/jira/browse/DBUTILS-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519716#comment-14519716
] 

EMR commented on DBUTILS-125:
-----------------------------

Using dbutils, it fails with v12 drivers, while working with v11 drivers. (both ojdbc6 and
7.jar)

Doing it the old fashioned way it works with v11 and v12 drivers.

// old fashioned way
            Connection conn = null;
            Properties connectionProps = new Properties();
            connectionProps.put("user", "myuser");
            connectionProps.put("password", "mypassword");
            conn = DriverManager.getConnection("jdbc:oracle:thin:@server:1521/foo", connectionProps);
            _log.debug("Got conn: "+conn.toString());
            DatabaseMetaData meta = conn.getMetaData();
            _log.warn("JDBC driver version is " + meta.getDriverVersion());
            String ePersonSql1 = " SELECT DISTINCT *  FROM schema1.reader_vw WHERE user_id
= 'xx1' OR barcode = 'xx1'  ";
            stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(ePersonSql1);
            while(rs.next()) {
                _log.debug("GOT DATA: "+
                        rs.getString(1) + "|" +
                        rs.getString(2) + "|" +
                        rs.getString(3) + "|" +
                        rs.getString(4) + "|" +
                        rs.getString(5) + "|" +
                        rs.getString(6) + "|" +
                        rs.getString(7)
                );
            }

> Using Oracle OJDBC7 gives ORA-00933
> -----------------------------------
>
>                 Key: DBUTILS-125
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-125
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: JDBC driver version is 12.1.0.1.0
>            Reporter: EMR
>            Priority: Minor
>
> Attempting to run an sql query with the latest version of the drivers, it fails with
ERROR (JavaApplication33.java:107) - ORA-00933: SQL command not properly ended.
> However, if I revert to the 11 version of the driver, the query works fine. Is there
a setting that I am missing between the two versions?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message