PreparedStatement.addBatch() throws SQLException: Unsupported feature

Hi,
We am using Oracle 8i with thin JDBC driver (classes12.zip) & JDK1.3.
If we use normal statement for batch update, using OracleStatement.addBatch() and OracleStatement.executeBatch(), it works fine. Problem occurs when doing batch update with prepared statement, using OraclePreparedStatement.addBatch() and OraclePreparedStatement.executeBatch(). The see the exception below
01-08-03 11:59:53 | ERROR | [Thread4] | user.BLineOS400CB_B1User:lvlAC_NOUser |
Error in bbojUser
java.sql.SQLException: Unsupported feature
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedSta
tement.java:2847)
at com.orbitech.frameworks.bline.user.BLineOS400CB_B1User.lvlAC_NOUser(U
nknown Source)
at com.orbitech.frameworks.bline.gen.BLineOS400CB_B1.invokeUserLvl(Unkno
wn Source)
at com.orbitech.frameworks.bline.gen.BLineOS400CB_B1.lvlAC_NO(Unknown So
urce)
at com.orbitech.frameworks.bline.gen.BLineOS400CB_B1.lvl(Unknown Source)
at com.orbitech.frameworks.bline.gen.BLineOS400CB_B1.blineMainPolymorph(
Unknown Source)
at com.orbitech.frameworks.bline.engine.BLine.execute(Unknown Source)
at com.orbitech.frameworks.bline.engine.BLine.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
01-08-03 11:59:53 | ERROR | [Thread4] | gen.BLineOS400CB_B1:lvlAC_NO | Error in
lvlAC_NO.
Please help... Do I need to change the JDBC driver. If Yes, which driver should I use.
Regards,
Mandar

Try using
((OraclePreparedStatement)theStmt).setExecuteBatch(blocking factor);
set the blocing factor to be something like 1000.
The the above doesn't work by itself, then try adding the following after connection.
((OracleConnection)conn.setDefaultRowPrefetch(blocking factor);
and then use the 1st statement.
Hope it works.

Similar Messages

  • Java.sql.SQLException: Unsupported feature

    Hi,
    I am receiving the following error after i added savepoints in my code
    connection.releaseSavepoint(savePt) is the statement where my code is failing..
    java.sql.SQLException: Unsupported feature
    JDK - tried with 1.4.2 and 1.5
    JDBC - using ojdbc14.zip
    Can someone help me please?
    Thanks in advance

    You need to know which version of the driver you are using...
    The following code shows both driver version and database version:
    import java.sql.*;
    import java.io.PrintWriter;
    public class dbinfo
      public static void main (String arr[]) throws Exception
        PrintWriter outWriter = new PrintWriter(System.out);
        DriverManager.setLogWriter(outWriter);
        String dbDriver="oracle.jdbc.driver.OracleDriver";
        // need to set values for YOUR database
        String dbURL = "jdbc:oracle:thin:@xxxxx:1521:yyyy";
        String dbPW = "zzzzz";
        String dbUser = "zzzz";
        Connection con = null;
        Class.forName(dbDriver);
        con = DriverManager.getConnection (dbURL, dbUser, dbPW);
        DatabaseMetaData dbmd = con.getMetaData();
        System.out.println("=====  Database info =====");     
        System.out.println("DatabaseProductName: " + dbmd.getDatabaseProductName() );
        System.out.println("DatabaseProductVersion: " + dbmd.getDatabaseProductVersion() );
        System.out.println("DatabaseMajorVersion: " + dbmd.getDatabaseMajorVersion() );
        System.out.println("DatabaseMinorVersion: " + dbmd.getDatabaseMinorVersion() );
        System.out.println("=====  Driver info =====");     
        System.out.println("DriverName: " + dbmd.getDriverName() );
        System.out.println("DriverVersion: " + dbmd.getDriverVersion() );
        System.out.println("DriverMajorVersion: " + dbmd.getDriverMajorVersion() );
        System.out.println("DriverMinorVersion: " + dbmd.getDriverMinorVersion() );
        System.out.println("=====  JDBC/DB attributes =====");     
        System.out.print("Supports getGeneratedKeys(): ");
        if (dbmd.supportsGetGeneratedKeys() )
          System.out.println("true");
        else
          System.out.println("false");
        con.close();
    }If your driver version is less than 9.2.0.1, the feature is not supported and you need a more recent version of the driver (which you can download from the URL in the previous post). If your driver version is greater than 9.2.0.1, the feature is supposed to be supported and you should contact Oracle support.

  • DatabaseMetaData.getAttributes throwing 'unsupported feature' exception

    Hi, maybe someone can help me with this.
    For a given schema, I'm trying to find the definition of a user-defined type. However, the getAttributes method of DatabaseMetaData throws an exception, claiming that the feature is unsupported.
    This is the code:
    Connection connection = null; ResultSet resultSet = null; try { connection = DriverManager.getConnection( URL, USERNAME, PASSWORD ); DatabaseMetaData dbMD = connection.getMetaData(); System.out.printf( "%s %d.%d%n", dbMD.getDatabaseProductName(), dbMD.getDatabaseMajorVersion(), dbMD.getDatabaseMinorVersion() ); resultSet = dbMD.getAttributes( null, null, "BATCH_T", "%" ); // this is line 32 // code to print the ResultSet } finally { if( resultSet != null ) resultSet.close(); if( connection != null ) connection.close(); }
    And this is the output:
    Oracle 10.2 Exception in thread "main" java.sql.SQLException: Unsupported feature         at oracle.jdbc.OracleDatabaseMetaData.getAttributes(OracleDatabaseMetaData.java:10980)         at udttest.Main.main(Main.java:32)
    The driver is the very latest one from the Oracle site, ojdbc6.jar, version 11.2.0.2.0. According to the JavaDocs of OracleDatabaseMetaData, the getAttributes method has been there since 9.0.2. So does this means that the method has merely been present, and always throws this exception?
    Alternatively, is there another way of programmatically retrieve information about a user-defined type?
    Thanks,
    - Peter

    Severity One wrote:
    jschell wrote:
    Severity One wrote:
    Yes, but the question was not how PL/SQL could know about how a Java object looks like, but how Java can know how a PL/SQL object looks like.You said the following.
    +"One issue we have at work is to pass to or receive from a PL/SQL stored procedure a Java object."+
    What I read from that is that you wish to get/send a "java object" to PL/SQL.
    Thus PL/SQL would in fact need to know what a "java object" is.No, you forgot to read the context: I wanted to know how Java could figure out how an Oracle user-defined type looked like, not the other way around. This business of "PL/SQL knowing about a Java object" is something you invented, that you keep harking on, and which I never said. So could you please drop it?
    I read what you posted, not your mind.
    Well, I could think of having the business logic for an application in PL/SQL, and using Java to create an API or web > > > Specifically, it's about an SMS sending application, which is interacting with just one table in Oracle and an SMS-C. Want to send an SMS? Insert it into the table. Want to receive one? Read it from the table. Any application that wants to send any number of SMS's, would therefore interact with this database, and a lot of things can be done purely in Oracle, without the need of having a separate application requiring the attention of support staff.Which I can implement completely and easily without using PL/SQL user defined types.Really? There are a lot of optional parameters when sending an SMS. It's not just sender, recipient and text content. So if I want to send, say an identical message to 10,000 recipients, or I want to send 10,000 individual messages; in both cases, with certain parameters for such things like time-outs, SMS-C port, protocol ID, data coding, delivery report options, priority, and all the other things that SMPP allows you to define, how would you pass those in a manner that doesn't lead to dozens of stored procedures, or very long parameter lists?
    Standard normal form in relational databases - an option table.
    And I doubt a valid format for delivery would work with 10,000 recipients stored in a single UDF verus a receiptant table.
    Not to mention of course that the fact that there might be one case for a UDF doesn't mean that the usage is a good idea for most applications. Or even that one application that uses a single UDF will need more than one of them.
    Restating what I said "...doesn't mean that it *normally* a good idea to use it."
    To clarify your confusion about that statement it means that there will in fact be some cases where it is acceptable but most cases it is not.
    Or do you prefer calling stored procedures with endless parameter lists? Or to have a whole bunch of insert and update statements called from Java?No idea what you are talking about. See the above example about sending SMS messages.
    Option table.
    First what you mention above is a standard idiom in all programming languages and used extensively since interactions between programming languages and relational database began.What, whole loads of stored procedures, or doing all the updates and inserts from Java? We've come to the conclusion that the inability to validate an SQL statement in Java source code is a bugger, and that it's better to do this sort of thing in a stored procedure. Also, using arrays means a significant performance improvement, and an array of objects/user-defined types is the next thing that comes to mind.
    That will not be a consideration in most applications. And for those applications where there is a proven performance bottleneck at the database layer most applications would be better served with one or more of the following
    1. Redoing the architecture/design
    2. Using a caching mechanism.
    3. Even look at redoing the requirements.
    Secondly I have no idea what you mean by "endles parameter lists". I do not have that problem. If you do then I can only suggest that you should look at problems with your design rather than than attempting to solve it with your implementation.If you have a lot of parameters, like with sending SMS messages, some of which are optional whilst others are not, and when many of these parameters are identical between different insert statements, you have two options:
    * use very long parameter lists.
    * use user-defined types; for example, an array with 'recipient + messages' types, and a single 'all other options' type.
    Or an option table.
    Perhaps not, but I didn't take off at a tangent. Anyway, one way of preventing binding is by having one of the frameworks figure out on its own what the other is doing. The whole reflection and annotation thing in Java lets you do that. Unfortunately, the getAttributes() method does not.
    First as you yourself noted it is irrelevant.No, that's something you claimed. When you ask for an example, don't brush them off as being irrelevant.
    My mistake then.
    Second dynamic interface code is NOT a mechanism that reduces coupling. The fact that it is dynamic does not alter the dependency.It reduced coupling between source code, which is what it's all about. I can always fix a library; it's a lot easier than changing dozens of applications.
    No it doesn't. Coupling is coupling. The manner of calling the methods doesn't alter the semantics that require that the method is called in the first place.
    That is similar to claiming that something like perl/javascript is less "coupled" because the language is interpreted versus C++ where the method calls are compiled. Which of course is not true.
    I can store data in a database, any database, in any number of ways. None of which would require a Oracle user defined type.True, but I'm using Oracle for more than just storing data. PL/SQL is extremely powerful for certain operations, and it'd be silly not to employ that power.Which has nothing to do with what I said.Quite frankly, I'm at a loss what point exactly you're trying to make. Passing data between Java and Oracle user-defined types and arrays is a total pain, so as a programmer I'm trying to find a way to do this in a standard way, something that can be put in a library. I agree that it a complex issue.
    It however is not something that most applications need however since most do not need UDFs.
    And so I have written such a library: small, database-agnostic (should work with any JDBC data source, although I haven't tested it yet), but with annotations to mark what UDT a class maps to, and to what field within the UDT each field of the class maps to. It's the annotation bit I was wondering whether it could be avoided. Obviously, because Oracle doesn't support the getAttributes method, it would no longer be database-agnostic. Which is not really a problem, because we only use Oracle, unless a vendor supports only some other database.
    Not sure what that means since most other databases do not support UDFs.
    That fact that a feature exists is not by itself a reason to use it. Java has 'strictfp' but I have never had a single business need that required that I use it. As such if I saw someone attempting to use it or stating that it must be used then I would insist that the provide specific details driven from the business needs that required its usage.The fact that you cannot think of a use or a business need, does not mean one does not exist. I suggest you re-read my first post, since that is not what I said.

  • Stored procedure call throwing SQLException

    Our application recently migrated to WLS8.1 SP3 from 7.0 SP4. While registering the value to OracleTypes.CURSOR, I am getting the following exception. We are using oracle 8.1.7, and thin driver(Solaris 5.9). After installing I noticed that WLS8.1 does not have the classes12.zip file under WL_HOME/server/ext/jdbc/oracle/ directory, moreover the 8.1.7 folder itself is missing. Does the existing driver files came with 7.0 version is good enough to run the application in 8.1.3. Any help is appreciated.
    Here is the code that I use:
    cs = connection.prepareCall("{call PROC_NAME(?)}");
    cs.setNull(1, OracleTypes.CURSOR);
    cs.registerOutParameter(1, OracleTypes.CURSOR);
    cs.execute();
    Object obj = cs.getObject(1);
    Here is the exception that I get :
    java.sql.SQLException: Unsupported feature: sqlType=-10
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.OraclePreparedStatement.setNullInternal(OraclePreparedStatement.java:3719)
         at oracle.jdbc.driver.OracleCallableStatement.setNull(OracleCallableStatement.java:4145)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:419)
    Thanks,
    Rajeev

    Rajeev Mani wrote:
    Our application recently migrated to WLS8.1 SP3 from 7.0 SP4.
    While registering the value to OracleTypes.CURSOR, I am getting
    the following exception. We are using oracle 8.1.7, and thin driver
    (Solaris 5.9). After installing I noticed that WLS8.1 does not have
    the classes12.zip file under WL_HOME/server/ext/jdbc/oracle/ directory,
    moreover the 8.1.7 folder itself is missing. Does the existing driver
    files came with 7.0 version is good enough to run the application in 8.1.3. Any help is appreciated.
    Hi. If the same code works in 70, and doesn't in 81, it must be because of the
    newer version of the oracle thin driver that comes with 81. You can use the classes12.zip
    that worked for you in 70 by putting it somehwere in yout 81 installation (server\lib for instance)
    and editing your startWebLogic scripts to list it explicitly before the weblogic stuff.
    Eg, just before the line in the script that calls java to start the server, put this:
    set CLASSPATH=\myinstall\server\lib\classes12.zip;%CLASSPATH%
    or for Unixes:
    setenv CLASSPATH /myinstall/server/lib/classes12.zip:$CLASSPATH
    Joe
    Here is the code that I use:
    cs = connection.prepareCall("{call PROC_NAME(?)}");
    cs.setNull(1, OracleTypes.CURSOR);
    cs.registerOutParameter(1, OracleTypes.CURSOR);
    cs.execute();
    Object obj = cs.getObject(1);
    Here is the exception that I get :
    java.sql.SQLException: Unsupported feature: sqlType=-10
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.OraclePreparedStatement.setNullInternal(OraclePreparedStatement.java:3719)
         at oracle.jdbc.driver.OracleCallableStatement.setNull(OracleCallableStatement.java:4145)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:419)
    Thanks,
    Rajeev

  • Oracle 11gR2 AQ Enqueue from Java - Exception : Unsupported Feature

    Hi all,
    Can anyone please explain the following error message?
    It would appear that OracleConnection.enqueue( queueName, enqopts, mesg ) doesn't work in this configuration....
    Is this expected or am I doing something silly? (And if so, what am I doing that is silly?)
    (Or is this yet another unexpected face-palm due to Standard Edition?)
    Many thanks,
    Regards,
    Rhodry Maelwaedd
    [Output]
    SQL>
    Connected to Oracle Database 11g Release 11.2.0.1.0
    Connected as SYS
    BANNER
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    User created
    Grant succeeded
    Connected to Oracle Database 11g Release 11.2.0.1.0
    Connected as aq
    PL/SQL procedure successfully completed
    PL/SQL procedure successfully completed
    PL/SQL procedure successfully completed
    Java created
    Procedure created
    OracleConnection obtained
    AQMessage properties constructed
    AQMessage constructed
    java.sql.SQLException: Unsupported feature
         at oracle.jdbc.driver.PhysicalConnection.doEnqueue(PhysicalConnection.java:9650)
         at oracle.jdbc.driver.PhysicalConnection.enqueue(PhysicalConnection.java:9548)
         at TestClient.enqueueAQMessage(JAVA_TEST:19)
    PL/SQL procedure successfully completed
    [Test]
    CONNECT SYS/************ AS SYSDBA;
    SELECT *
    FROM V$VERSION;
    CREATE USER aq IDENTIFIED BY aq DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE temp;
    GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE, JAVA_ADMIN, JAVAUSERPRIV, JAVASYSPRIV, JAVADEBUGPRIV TO aq;
    CONNECT aq/aq@***************i;
    SET SERVEROUTPUT ON;
    EXEC DBMS_AQADM.CREATE_QUEUE_TABLE( queue_table => 'INBOUND_QT', queue_payload_type => 'RAW', sort_list => 'PRIORITY, ENQ_TIME' );
    EXEC DBMS_AQADM.CREATE_QUEUE( queue_name => 'INBOUND_Q', queue_table => 'INBOUND_QT' );
    EXEC DBMS_AQADM.START_QUEUE( queue_name => 'INBOUND_Q' );
    create or replace and compile java source named java_test as
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.aq.*;
    public class TestClient
    public static void enqueueAQMessage( java.lang.String queueName, oracle.sql.RAW payload ) throws SQLException
    try
    OracleConnection conn = ( OracleConnection ) DriverManager.getConnection("jdbc:default:connection:");
    System.out.println( "OracleConnection obtained" );
    AQMessageProperties msgprop = AQFactory.createAQMessageProperties();
    System.out.println( "AQMessage properties constructed" );
    AQMessage mesg = AQFactory.createAQMessage( msgprop );
    mesg.setPayload( payload );
    System.out.println( "AQMessage constructed" );
    AQEnqueueOptions enqopts = new AQEnqueueOptions();
    conn.enqueue( queueName, enqopts, mesg );
    System.out.println( "AQMessage enqueued" );
    conn.commit();
    System.out.println( "Session committed" );
    conn.close();
    System.out.println( "OracleConnection closed" );
    catch( Exception e )
    e.printStackTrace();
    create or replace procedure test_java_enqueue_message(p_queuename varchar2, p_body raw) is
    language java name 'TestClient.enqueueAQMessage( java.lang.String, oracle.sql.RAW )';
    begin
    dbms_java.set_output(100000);
    test_java_enqueue_message(p_queuename => 'AQ.INBOUND_Q',
    p_body => utl_raw.cast_to_raw( 'Hello World' ) );
    end;
    /

    Hi all,
    By the way, I do understand that this ability isn't supported in the server-side driver ...( although I am kind of curious as to why )...
    If I change the Connection URL to use the jdbc:oracle:thin driver it does work... (can't get the oci driver to work though).
    Ah well, regards to all...
    Rhodry

  • Blob writing error      ORA-29532 Java call terminated Unsupported feature

    Hi there,
    I've got the following Java code which tries to write to a BLOB file. It's a version of some code to extract files from a zip archive, but with everything but the erroring call stripped out:
    create or replace and compile java source named zipunpack as
    package org.bristol.cyps;
    import oracle.sql.BLOB;
    import java.util.zip.*;
    public class ZipUnpack
    public static int unpack(BLOB ziparray[], String filename, BLOB filearray[])
    throws java.sql.SQLException, java.io.IOException
    BLOB file = filearray[0];
    java.io.OutputStream fileout = file.setBinaryStream(0L);
    return 1;
    This is published as follows:
    create or replace function zip_unpack (
    pio_zip in out nocopy blob
    , pi_filename in varchar2
    , pio_file in out nocopy blob
    ) return number as language java
    name 'org.bristol.cyps.ZipUnpack.unpack(oracle.sql.BLOB[], java.lang.String, oracle.sql.BLOB[]) return java.lang.Integer';
    And called like so:
    procedure send_zip_file (
    pi_zip in out nocopy blob
    , pi_filename in varchar2
    ) is
    file blob;
    completed integer;
    begin
    dbms_lob.createtemporary (
    lob_loc => file
    , cache => false
    , dur => dbms_lob.call
    completed := zip_unpack(pi_zip, pi_filename, file);
    if completed > 0 then
    bare_html.print_blob(file);
    else
    htp.print('File "' || pi_filename || '" not found');
    end if;
    end;
    This, as far as I can tell from the documentation, should work. Unfortunately, though, it generates an error:
    ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: Unsupported feature
    The particular line which is causing the error is the "java.io.OutputStream fileout = file.setBinaryStream(0L);" If I remove this, it runs fine. I'm flumoxed as to why this might be causing an "Unsupported feature" exception when it's documented as being supported. Can anyone shed any light?
    Cheers,
    Robert
    Message was edited for more clarity

    Hi,
    It looks like you are not using 10g JDBC. java.sql.Blob.setBinaryStream is a JDBC 3.0 method. In 9iR2 we added support for jdk14 and added stub methods for JDBC 3.0 behavior without fully implementing them. 10gR1 was the first version where the JDBC3.0 methods were fully supported.
    The workaround is to use the Oracle proprietary method oracle.sql.BLOB.getBinaryOutputStream
    Kuassi, http://db360.blogspot.com

  • JDBC ADPATER -  "Unsupported feature" in XI with CLOB type

    Hi experts,
    I have 15 patch XI level.  In  a stored procedure i  use  an in and out parameter with CLOB type.  I get the exception:
    com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'XXXX'): java.sql.SQLException: Unsupported feature
    If  i change the type CLOB by VARVHAR in the XI's XML (Design: Integration Buider), all works fine.
    The strored procedure has this parameter like CLOB.
    My question is
    Is not possible to use the CLOB type?  
    SAP recognize that it, it's possible:
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    Sorry for my english. Thanks in advance.

    Hi,
    Please make sure you use the 10.x driver for full stored procedure CLOB support.
    A CLOB is a not comparable Datatype in SQL.
    Regards,
    Prateek

  • Unsupport feature SQL exception ---JDK1.4 and oracle 10g driver

    here there,
    I got the unsupport feature SQLexeption, does anybody have any idea? JDK1.4 and oracle 10g driver should fully support JDBC 3.0. Am I right ?
    Thank you very much
    Avni
    here is my snippet code,
    Connection con = DriverManager.getConnection(url, user, password);
              DatabaseMetaData data = con.getMetaData();
              int jdbcVersion = data.getJDBCMajorVersion();
    and here is the exception,
    java.sql.SQLException: Unsupported feature
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:690)
         at oracle.jdbc.OracleDatabaseMetaData.getJDBCMajorVersion(OracleDatabaseMetaData.java:4061)
         at com.sbc.jdbc.ConnectionVersion.<init>(ConnectionVersion.java:36)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
         at org.eclipse.ve.internal.java.vce.launcher.remotevm.JavaBeansLauncher.main(JavaBeansLauncher.java:93)

    Avni,
    Works for me with Oracle 10g database, "ojdbc14.jar" JDBC driver (latest version -- 10.2.0.1.0 -- downloaded from OTN) and JDK 1.4.2_07:
    conn = ods.getConnection();  // Using 'OracleDataSource'
    DatabaseMetaData dbmd = conn.getMetaData();
    System.out.println("JDBC Major Version: " + dbmd.getJDBCMajorVersion());Above code prints out:
    JDBC Major Version: 10Good Luck,
    Avi.

  • Standard Blob Types- Unsupported feature

    Hi There,
    I have come across an issue i.e. On attemping to create a Large Object using the Standard Lob Types i.e. java.sql.Blob I get an Exception as shown below:
    java.sql.SQLException: Unsupported feature
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBEr
    ror.java:690)
    at oracle.sql.BLOB.setBinaryStream(BLOB.java:1016)
    Kindly, note my requirement
    Ora thin driver : 9.2.0.5
    Must try to only use java.sql.Blob instead of oracle.sq.BLOB
    Code must be WAS and WebLogic compatible//oracle.sql.BLOB; works for me
    OutputStream blobOutputStream = ((oracle.sql.BLOB) documentAsBlob)
    .getBinaryOutputStream();
    //java.sql.Blob; does not work ( preferrable-as it makes use of a Standard Type)
    OutputStream blobOutputStream = ((java.sql.Blob) documentAsBlob)
    .setBinaryStream(0L);
    I was wondering how to shoot this.
    Any ideas would be appreciated.
    Cheers!
    Dhiraj

    Hi There,
    I have come across an issue i.e. On attemping to create a Large Object using the Standard Lob Types i.e. java.sql.Blob I get an Exception as shown below:
    java.sql.SQLException: Unsupported feature
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBEr
    ror.java:690)
    at oracle.sql.BLOB.setBinaryStream(BLOB.java:1016)
    Kindly, note my requirement
    Ora thin driver : 9.2.0.5
    Must try to only use java.sql.Blob instead of oracle.sq.BLOB
    Code must be WAS and WebLogic compatible//oracle.sql.BLOB; works for me
    OutputStream blobOutputStream = ((oracle.sql.BLOB) documentAsBlob)
    .getBinaryOutputStream();
    //java.sql.Blob; does not work ( preferrable-as it makes use of a Standard Type)
    OutputStream blobOutputStream = ((java.sql.Blob) documentAsBlob)
    .setBinaryStream(0L);
    I was wondering how to shoot this.
    Any ideas would be appreciated.
    Cheers!
    Dhiraj

  • Unsupported feature in Mass Case Tester

    Hi,
    I am getting an unsupported feature error in Mass Case Tester when I am trying to use reference data for priming my rulebase.
    Please let me know what could be the possible cause of this error. Is the use of reference data not supported in the current released version of MCT?
    The details of the error are:
    This is an unsupported feature
    Exception: Exception
    Message: This is an unsupported feature
    Source: Oracle.Policy.Modeling.MassCaseTester
    HelpLink:
    TargetSite: Boolean Check()
    Stack Trace:
    at Oracle.Modeling.MassCaseTester.RulebaseChecker.Check()
    Thanks,
    Aakarsh

    Unfortunately you are correct - reference data is unsupported in the current released version of the MCT.
    It is planned to have it fixed for the 10.2 release.

  • Applet throws SQLException

    I have simple applet where a user clicks a button, which runs a stored procedure on a SQL database. The code that runs the SP is in a different class.
    In my applet I am trying to create an instance of that class and run the method that executes the stored procedure.
    The applet code is:
    public class clsButton extends Applet implements ActionListener
    public void init ()
    Button btnRunSp = new Button("Run Report All-YTD");
    setLayout(new FlowLayout(FlowLayout.CENTER));
    add(btnRunSp);
    public void actionPerformed(ActionEvent ae)
    sqlSPResults sqlRs = new sqlSPResults(); //Class for SP
    sqlRs.sqlRun(); //method that executes the SP
    The error I am getting is: "java.sql.SQLException; must be caught or declared to be thrown" and it points to the "." in sqlRs.sqlRun();.
    I have the throws SQLException statement on the method in the class I am trying to call:
    public class sqlSPResults
    public static void sqlRun() throws SQLException, IOException
    Not sure why the throws statement on the underlying method is not recognized and not sure how to solve the problem.
    TIA,
    Todd

    The "throws" clause on that method is recognized, and it is exactly that clause that requires your code in the clsButton class to catch the exception. To fix this problem, you usually have two approaches, as the error message says. You can catch the error, like this:try {
      sqlRs.sqlRun(); //method that executes the SP
    } catch(SQLException e) {
      // code that deals with an SQLException
    }Or sometimes you can declare that the method containing the line of code throws SQLException. In this case, however, you can't do that because you are implementing the actionPerformed method and you can't change its signature that way.
    You will also have to do the same for IOException, which is also thrown by the sqlRun method.

  • Cant schedule refresh - We can't perform this operation because this workbook uses unsupported features. Correlation ID: 42e1a475-20ea-41ae-9d8d-e1889d4c2d77

    Hi all,
    I have a workbook with a set of scheduled refreshes (powerquery via the gateway from web api). I've modified it by adding a new source from the azure marketplace. I've successfully added it to the DMG
    I've uploaded the new report and I'm able to browse it successfully in powerbi
    But when I try to schedule a refresh I get the following error against all the data connections
    We can't perform this operation because this workbook uses unsupported features. Correlation ID: 42e1a475-20ea-41ae-9d8d-e1889d4c2d77
    Also get the error if I uncheck the new data source
    Below is my PQ query for the new data source. Which unsupported feature am I using?
    let
    Source = Marketplace.Subscriptions(),
    #"https://api.datamarket.azure.com/Data.ashx/BoyanPenev/DateStream/v1/" = Source{[ServiceUrl="https://api.datamarket.azure.com/Data.ashx/BoyanPenev/DateStream/v1/"]}[Feeds],
    ExtendedCalendar1 = #"https://api.datamarket.azure.com/Data.ashx/BoyanPenev/DateStream/v1/"{[Name="ExtendedCalendar"]}[Data],
    #"Filtered Rows" = Table.SelectRows(ExtendedCalendar1, each [YearKey] >= 2010 and [YearKey] <= 2020),
    #"Inserted End of Month" = Table.AddColumn(#"Filtered Rows", "EndOfMonth", each Date.EndOfMonth([DateKey]), type datetime),
    #"Inserted End of Quarter" = Table.AddColumn(#"Inserted End of Month", "EndOfQuarter", each Date.EndOfQuarter([DateKey]), type datetime),
    #"Inserted End of Week" = Table.AddColumn(#"Inserted End of Quarter", "EndOfWeek", each Date.EndOfWeek([DateKey]), type datetime),
    #"Renamed Columns" = Table.RenameColumns(#"Inserted End of Week",{{"DateKey", "Date"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}, {"EndOfMonth", type date}, {"EndOfQuarter", type date}, {"EndOfWeek", type date}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Changed Type",{{"YearKey", "CalendarYear"}}),
    #"Inserted FiscalYear" = Table.AddColumn(#"Renamed Columns1", "FiscalYear", each Date.Year(Date.AddMonths([Date],6)), type number),
    #"Inserted FiscalMonth" = Table.AddColumn(#"Inserted FiscalYear", "FiscalMonthSortId", each Date.ToText(Date.AddMonths([Date],6),"MM"), type number),
    #"Inserted Month" = Table.AddColumn(#"Inserted FiscalMonth", "FiscalMonth", each Date.ToText([Date],"MMMM"), type text),
    #"Inserted Month1" = Table.AddColumn(#"Inserted Month", "CalendarMonthSortId", each Date.ToText([Date],"MM"), type number),
    #"Added Custom" = Table.AddColumn(#"Inserted Month1", "DateIsWeekDay", each if [DayOfWeekMon] > 5 then "no" else "yes"),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "HoursPerWeekDay", each if [DateIsWeekDay] = "yes" then 7.5 else 0.0),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"DateIsWeekDay", type text}, {"HoursPerWeekDay", type number}}),
    #"Added Custom2" = Table.AddColumn(#"Changed Type1", "Custom", each Function.Invoke(DateTimeZone.UtcNow,{})),
    #"Split Column by Delimiter" = let #"Changed Type" = Table.TransformColumnTypes(#"Added Custom2", {{"Custom", type text}}, "en-AU"),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type","Custom",Splitter.SplitTextByDelimiter(" +"),{"Custom.1", "Custom.2"})
    in #"Split Column by Delimiter",
    #"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Custom.1", type datetime}, {"Custom.2", type time}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type2",{"Custom.2"}),
    #"Renamed Columns2" = Table.RenameColumns(#"Removed Columns",{{"Custom.1", "RefreshDateUtc"}}),
    #"Added Custom3" = Table.AddColumn(#"Renamed Columns2", "RefreshDateLocal", each [RefreshDateUtc] + #duration(0,10,30,0)),
    #"Changed Type3" = Table.TransformColumnTypes(#"Added Custom3",{{"RefreshDateLocal", type text}}),
    #"Added Custom4" = Table.AddColumn(#"Changed Type3", "RefreshDate", each [RefreshDateLocal] & " (UTC + 10.5)"),
    #"Changed Type4" = Table.TransformColumnTypes(#"Added Custom4",{{"DateInt", Int64.Type}, {"CalendarYear", Int64.Type}, {"HalfYearKey", Int64.Type}, {"QuarterKey", Int64.Type}, {"MonthKey", Int64.Type}, {"MonthOfYear", Int64.Type}, {"MonthOfHalfYear", Int64.Type}, {"MonthOfQuarter", Int64.Type}, {"QuarterOfYear", Int64.Type}, {"QuarterOfHalfYear", Int64.Type}, {"HalfYearOfYear", Int64.Type}, {"DayOfYear", Int64.Type}, {"DayOfHalfYear", Int64.Type}, {"DayOfQuarter", Int64.Type}, {"DayOfMonth", Int64.Type}, {"DayOfWeekMon", Int64.Type}, {"DayOfWeekSun", Int64.Type}, {"WeekOfYearISO", Int64.Type}, {"FiscalYear", Int64.Type}, {"FiscalMonthSortId", Int64.Type}, {"CalendarMonthSortId", Int64.Type}}),
    #"Added Custom5" = Table.AddColumn(#"Changed Type4", "CalendarMonthId", each [DateInt]/100),
    #"Round Down" = Table.TransformColumns(#"Added Custom5",{{"CalendarMonthId", Number.RoundDown}}),
    #"Changed Type5" = Table.TransformColumnTypes(#"Round Down",{{"CalendarMonthId", Int64.Type}}),
    #"Added Custom6" = Table.AddColumn(#"Changed Type5", "Custom", each Date.ToText([Date],"ddd")),
    #"Renamed Columns3" = Table.RenameColumns(#"Added Custom6",{{"Custom", "DayName"}}),
    #"Added Custom7" = Table.AddColumn(#"Renamed Columns3", "PastMonthFilter", each if [CalendarMonthId] < Number.FromText(DateTimeZone.ToText(Function.Invoke(DateTimeZone.UtcNow,{}),"yyyyMM")) then 1 else 0)
    in
    #"Added Custom7"
    Jakub @ Adelaide, Australia Blog

    I don't think that's it. I deleted all the powerview reports and worksheets containing pivot tables/charts, and the refresh worked with the function.invoke() call.
    The only reason that's in there is because the execution stops there when I dont have it and i have to manually click an 'invoke' button. If there's a way to get around that i'll happily try that instead.
    Hmm.. i think I found it, but i'll need to do some testing next year after the holidays to verify
    I had added two text boxes (name and desc) to one of my worksheets. I was able to test connection/schedule and run a refresh once I had deleted them.
    Weird, because o365 excel services had no problem displaying the worksheet containing the text boxes, but it looks like workbooks that contain text boxes don't work on a scheduled refresh
    Jakub @ Adelaide, Australia Blog

  • Excel services unsupported feature? Missing pivottable filter field.

    I have checke the unsupported features list of Excel Services 2010 (and 2007) but I cannot find anything about this issue:
    If one adds a filter to a pivottable, in the Excel 2010 client users are able to filter both by the dimension tree and using a search field for string searches in the same dimension. When viewing the same work book via Excel services the search field is
    missing. Can anyone tell me if this indeed is an unsupported feature or if I can do something to get it to show up?

    I believe leveraging PowerPivot for SharePoint would resolve this.
    SharePoint - Nauplius Applications
    Microsoft SharePoint Server MVP
    MCITP: SharePoint Administrator 2010
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • JDBC-ODBC and PreparedStatement.addBatch?

    Hi
    I am using the driver "sun.jdbc.odbc.JdbcOdbcDriver". I want to use preparedStatement and addBatch, but I get the error message:
    java.sql.SQLException: Driver does not support this function
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.addBatch(Unknown Source)Are the any way to come around this or do i have to execute one SQL-command a time?

    suladna wrote:
    I'm using MySQL Connector/J version 5.1.6 as JDBC. Huh?
    No you are not.
    Connector/J is a type 4 jdbc driver. And it most definitely is not the driver that you are using in the exception that you printed.
    If you have Connector/J then the problem is that you are loading the wrong driver and using the wrong connection string.

  • Throw sqlexception: broken pipe when executing sql or other related code

    My env is:
    weblogic 704 + oracle 8i, use datasource to create conneciton pool with 10 connections
    when weblogic starts, but when I execute some sql , the system throwed out:
    java.sql.SQLException: Io Exception: Broken pipe
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:560)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2778)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:536)
    at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:53)
    at com.ztsoft.ejb.dao.EntityDAO.readClobToFile(Unknown Source)
    at com.ztsoft.ejb.dao.SL_FileContentTbDAO.readClob2(Unknown Source)
    at com.ztsoft.ejb.sessionbean.MainHandlerBean.readClobToFile(Unknown Source)
    at com.ztsoft.ejb.sessionbean.MainHandlerBean_oejxo1_ELOImpl.readClobToFile(MainHandlerBean_oejxo1_ELOImpl.java:531)
    at com.ztsoft.web.servlet.GetResultActionServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
    How can I solve ? thanks, this is very urgent, help me..

    CottonXu wrote:
    My env is:
    weblogic 704 + oracle 8i, use datasource to create conneciton pool with 10 connections
    when weblogic starts, but when I execute some sql , the system throwed out:
    java.sql.SQLException: Io Exception: Broken pipe
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)Hi. This indicates a problem between the oracle driver version and the DBMS
    version. The first thing to do is to go to oracle's download site and get
    their latest version of the thin driver that is appropriate for your DBMS
    and JVM, and then edit your startWeblogic script so the new driver is ahead
    of the weblogic.jar in the -classpath argument for the commandline that
    starts the server.
    Joe
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:560)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2778)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:536)
    at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:53)
    at com.ztsoft.ejb.dao.EntityDAO.readClobToFile(Unknown Source)
    at com.ztsoft.ejb.dao.SL_FileContentTbDAO.readClob2(Unknown Source)
    at com.ztsoft.ejb.sessionbean.MainHandlerBean.readClobToFile(Unknown Source)
    at com.ztsoft.ejb.sessionbean.MainHandlerBean_oejxo1_ELOImpl.readClobToFile(MainHandlerBean_oejxo1_ELOImpl.java:531)
    at com.ztsoft.web.servlet.GetResultActionServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
    How can I solve ? thanks, this is very urgent, help me..

Maybe you are looking for