Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
|
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2005, 04:48 AM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default java.sql.SQLException: Invalid column type

Hello

Iam using jdk 1.2.2 and jdbc 1.1 Iam calling a stored procedure in the java code which returns a cursor. When I use the registerOutParameter, I get the following error:
SQLException : java.sql.SQLException: Invalid column type

The java code at which the error is thrown is as follows:
callStmt.registerOutParameter(1,Types.OTHER);


The complete error log shown on the weblogic console is as follows:

SQLException : java.sql.SQLException: Invalid column type
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:269)
        at oracle.jdbc.driver.OracleStatement.get_internal_ty pe(OracleStatement.
java:6383)
: at oracle.jdbc.driver.OracleCallableStatement.registe rOutParameterBytes(
OracleCallableStatement.java:244)
        at oracle.jdbc.driver.OracleCallableStatement.registe rOutParameter(Oracl
eCallableStatement.java:393)
        at oracle.jdbc.driver.OracleCallableStatement.registe rOutParameter(Oracl
eCallableStatement.java:462)
        at weblogic.jdbc.pool.Statement.registerOutParameter( Statement.java:640)


Plsss help me

 
Old July 1st, 2005, 07:39 AM
Registered User
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Strange enough all the Types defined in java.sql.types are not recognized by the Oracle Implementation of the CallableStatement

Hereafter is the list of the values accepted by the "get_internal_type" method

SQL External Type | Oracle Internal Type
------------------|---------------------
     -7 | 6
     -6 | 6
     -5 | 6
     2 | 6
     3 | 6
     4 | 6
     5 | 6
     6 | 6
     7 | 6
     8 | 6
------------------+---------------------
     999 | 999
------------------+---------------------
     1 | 96
------------------+---------------------
     12 | 1
------------------+---------------------
     -1 | 8
------------------+---------------------
     91 | 12
     92 | 12
     93 | 12
------------------+---------------------
     -3 | 23
     -2 | 23
------------------+---------------------
     -4 | 24
------------------+---------------------
     -8 | 104
------------------+---------------------
     2004 | 113
------------------+---------------------
     2005 | 112
------------------+---------------------
     -13 | 114
------------------+---------------------
     -10 | 102
------------------+---------------------
     2002 | 109
     2003 | 109
------------------+---------------------
     2006 | 111
------------------+---------------------
     -14 | 998
------------------+---------------------


As you can see neither Types.OTHER (1111) nor Types.JAVA_OBJECT are valid SQL Types for this method








Similar Threads
Thread Thread Starter Forum Replies Last Post
java.sql.SQLException [email protected] SQL Server 2000 1 March 22nd, 2006 08:57 AM
java.sql.SQLException: Column 'somenam' not found. gargon1 JSP Basics 3 August 5th, 2005 12:35 PM
java.sql.SQLException: Invalid argument(s) in call dharmendra_rh Java Databases 1 May 5th, 2005 02:58 AM
java.sql.SQLException: [Microsoft][ODBC Driver Man [email protected] Java Databases 1 May 5th, 2005 02:40 AM
java.sql.SQLException: Error loading JDBC Driver jdphjp Java Databases 1 August 5th, 2004 12:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.