ERROR: Inconsistent java and sql object types

I am getting a nested object table in the form of an oracle.sql.ARRAY. I then call getResultSet() on this array and try to cast each object into a Java implementation of the SQLData interface (also defined in the connections type map).
This approach works for one nested object table but not for another. I get the error message:
"Inconsistent java and sql object types"
Does this mean that my Java to Oracle type mappings are wrong? Any help would be appreciated.
Regards
Steve

i had a similar situation. found out it was occuring because the oracle type had not been granted to the appropriate user.
todd kegley

Similar Messages

  • Inconsistent java and sql object types

    Hi,
    I have run into error "Inconsistent java and sql object types"
    while mapping a java class to a sql object type. The java class
    is just a duplicate of sql data structure and I pretty much
    follow the JDBC Developer's GUide's examples (20-43 to 20-45)
    to create the mapping java class.
    Any one runs into simliar problem or any clues?
    Thanks,
    Ed
    Exception in thread "main" java.sql.SQLException: Inconsistent java and sql object types: InstantiationException:
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.sql.STRUCT.toClass(STRUCT.java:433)
    at oracle.sql.STRUCT.toJdbc(STRUCT.java:366)
    at oracle.jdbc.oracore.OracleTypeUPT.unpickle80rec
    (OracleTypeUPT.java:236)
    at
    oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80rec_elems
    (OracleTypeCOLLECTION.java:553)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80rec
    (OracleTypeCOLLECTION.java:383)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80
    (OracleTypeCOLLECTION.java:329)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unlinearize
    (OracleTypeCOLLECTION.java:218)
    at oracle.sql.ArrayDescriptor.toJavaArray
    (ArrayDescriptor.java:501)
    at oracle.sql.ARRAY.getArray(ARRAY.java:197)

    The safest way would be to use JPublisher to generate the type classes. In your application, you can just use the generated code to manipulate the object.

  • The java and sql object type  was not matched

    My table(Oracle10.2) has a varying arrays column. For mapping to java classes, I use JDeveloper(10.1.3.1.0) to generate java classes. Then I try to insert a record into this varrying arrays column with java. While it always complaints java.sql.SQLException.the java and sql object type was not matched. I can not find the reason.
    My java code:
                   StructDescriptor structdesc = StructDescriptor.createDescriptor(
                             "VARRAY_SEQ", con);
                   int nid=20;
                   int pid=546;
                   BigDecimal mynid=new BigDecimal(nid);
                   mynid=mynid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   BigDecimal mypid=new BigDecimal(pid);
                   mypid=mypid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   Object[] attributes = { "ASDF", mynid, "Developer", mypid,
                             "rwretw" };
                   STRUCT Rel = new STRUCT(structdesc, con, attributes);
                   stmt.setObject(8, Rel);
                   stmt.execute();
                   stmt.close();
    And the STRUCT is
    public RelSeq(String nucl, java.math.BigDecimal neId, String nuor, java.math.BigDecimal pId, String phor) throws SQLException
    { _init_struct(true);
    setNucl(nucl);
    setNeId(neId);
    setNuor(nuor);
    setPId(pId);
    setPhor(phor);
    }

    My table(Oracle10.2) has a varying arrays column. For mapping to java classes, I use JDeveloper(10.1.3.1.0) to generate java classes. Then I try to insert a record into this varrying arrays column with java. While it always complaints java.sql.SQLException.the java and sql object type was not matched. I can not find the reason.
    My java code:
                   StructDescriptor structdesc = StructDescriptor.createDescriptor(
                             "VARRAY_SEQ", con);
                   int nid=20;
                   int pid=546;
                   BigDecimal mynid=new BigDecimal(nid);
                   mynid=mynid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   BigDecimal mypid=new BigDecimal(pid);
                   mypid=mypid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   Object[] attributes = { "ASDF", mynid, "Developer", mypid,
                             "rwretw" };
                   STRUCT Rel = new STRUCT(structdesc, con, attributes);
                   stmt.setObject(8, Rel);
                   stmt.execute();
                   stmt.close();
    And the STRUCT is
    public RelSeq(String nucl, java.math.BigDecimal neId, String nuor, java.math.BigDecimal pId, String phor) throws SQLException
    { _init_struct(true);
    setNucl(nucl);
    setNeId(neId);
    setNuor(nuor);
    setPId(pId);
    setPhor(phor);
    }

  • PL/SQL Object Type - Java oracle.jbo.domain

    PL/SQL Object Type <-> Java oracle.jbo.domain
    can anybody help me, getting my domains to work?
    Following scenario:
    in pl/sql we have an object type called MULTI_LANGUAGE. This type is used for storing multilingual texts as nested table in one(!) column.
    So the object MULTI_LANGUAGE contains a member variable LANGUAGE_COLLECTION of type LANGUAGE_TABLE, which itself is a nested table of objects
    of the type LANGUAGE_FIELD (this again is only a language id and the corresponding content)
    Also the methods setContent(langID, langContent) and getContent(langId) are defined on Object MULTI_LANGUAGE.
    For example: Table having primary key, 2 other columns and one column of object type MULTI_LANGAGE (=nested table of objects)
    |ID|Column1|Column2|  multilingual Column  |
    |--|---------------------------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | hello         | |
    |  |       |       |  -------------------  |
    |1 | foo   | bar   | | 2 | hallo         | |   <- Row Nr 1
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ola           | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | world         | |
    |  |       |       |  -------------------  |
    |2 | abc   | def   | | 2 | welt          | |   <- Row Nr 2
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ???  ;-)      | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|Now i've tried to modell this structure as an oracle.jbo.domain.
    class MultiLanguage extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("LanguageColl", "LANGUAGE_COLL", 0, oracle.jbo.domain.Array.class, 2003, "ARRAY", -127, 0, false, "campusonlinepkg.common.LanguageField");
    and
    class LanguageField extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("Id", "ID", 0, oracle.jbo.domain.Number.class, 2, "NUMERIC", -127, 0, false);
    attrs[(1)] = new DomainAttributeDef("Content", "CONTENT", 1, java.lang.String.class, 12, "VARCHAR", -127, 4000, false);
    Is there anything wrong with this StructureDef?
    When running the BC-Browser with -Djbo.debugoutput=console -Djbo.jdbc.driver.verbose=true parameters I get suspect warnings when browsing the records
    [196] Executing FAULT-IN...SELECT NR, NAME FROM B_THESAURI BThesauri WHERE NR=:1
    [197] SQLException: SQLState(null) vendor code(17074)
    [198] java.sql.SQLException: Ungültiges Namensmuster: XMLTEST.null
    ...snip: detail of stack...
    [240] SQLException: SQLState(null) vendor code(17060)
    [241] java.sql.SQLException: Deskriptor konnte nicht erstellt werden: Unable to resolve type "null"
    ...snip: detail of stack...
    [280] Warning:No element type set on this array. Assuming java.lang.Object.
    (XMLTEST is the name of the schema)
    Seems as if the framework can't read the TypeDescriptor or does not know which descriptor to read (XMLTEST.null??)
    Do I have to implement my own JboTypeMap?
    Please help, I'm stuck.
    Thanks in advance, Christian

    Thanks for your suggestion, but it seems to me as if there is one level missing.
    in pl/sql I have following structure:
    Struct MULTI_LANGUAGE (Object type) - outermost
      Array LANGUAGE_TABLE (nested table type)
        Struct LANGUAGE_FIELD (Object type simple) - innermostthe reason why i had to wrap another struct around the array was because it is not possible to define methods on a nested table. this is only possible on objects.
    on the outermost object type (which holds the array of language fields) I needed to define following 2 methods for direct access:
    getContent (langId in number) returns varchar2
    setContent (langId in number, langContent in varchar2)
    I would like to rebuild the same structure in java, because newly written java code should live in perfect harmony with legacy pl/sql code ;-)
    Both applications (Java and pl/sql) have to access the same data as long as migration to java goes on.
    Is this nested structure too much for a Domain?
    Any other suggestions?
    Thanks again, Christian

  • Require help on Array of Nested tables and Oracle Object type

    Hi All,
    I have a scenario where I have some millions of records received from a flat file and the record is stored in Table as below:
    Tablename: FILE_RECORD
    Rows:
    FILE_REG_ID = 1
    RECORD_NBR = 1     
    PROCESSED_IND = U
    RECORD= 00120130326006A
    FILE_REG_ID = 1
    RECORD_NBR = 2     
    PROCESSED_IND = U
    RECORD= 00120130326003
    1) I have to read these records at once and
    a) Split the RECORD column to get various other data Eg: Fld1=001, Fld2=20130326, Fld3 = 003
    b) send as an Array to Java.
    2) Java will format this into XML and sent to other application.
    3) The other application returns a response as Successful or Failure to Java in XML
    4) Java will send RECORD_NBR and the corresponding response as Success or Failure back to PLSQL
    5) PLSQL should match the RECORD_NBR and update the PROCESSED_IND = P.
    I 'm able to achieve this using SQL Table type by creating a TYPE for Each of the fields (Flds) however the problem is Java cannot Access the parameters as the TYPE are of COLUMN Types
    Eg: For RECORD_NBR
    SUBTYPE t_record_nbr IS FILE_RECORD.T010_RECORD_NBR%TYPE;
    Can you please let me know how I can achieve this to support Java, I know one way that is by creating an OBJECT TYPE and a TABLE of the OBJECT TYPE.
    Eg: T_FILE_RECORD_REC IS OBJECT
    FILE_REG_ID number(8), RECORD_NBR number (10), PROCESSED_IND varchar2(1), RECORD varchar(20)
    Create type T_FILE_RECORD_TAB IS TABLE OF T_FILE_RECORD_REC
    However I'm facing a problem to populate an Array of records, I know I'm missing something important. Hence please help.
    It would be helpful to provide some guidelines and suggestions or Pseudo or a Code to achieve this. Rest all I can take up further.
    Thanks in advance,

    I know once way that is creating a OBJECT TYPE and a TABLE of OBJECT TYPE, howeve I feel I'm missing something to achieve this.You're right, you need SQL object types created at the database level. Java doesn't know about locally defined PL/SQL types
    However you can do without all this by creating the XML directly in PL/SQL (steps 1+2) and passing the document to Java as XMLType or CLOB.
    Are you processing the records one at a time?

  • Implementing First In First Out Behaviour Using PL/SQL object types

    Hi Friends,
    I have a Integer Array of type Varray, I want to implement first in first out behaviour using Pl/SQL object type.Please provide me some idea that i can proceed. If you can provide me any sample code or any documentation,i will be very much thankful to you.Eagerly waiting for your reply.
    Thanks

    basically i have to implement a queue using pl/sql object types to traverse a tree as we can implement stack (LIFO).
    I can give an example of Stack implementation...
    CREATE or replace TYPE IntArray AS VARRAY(50) OF INTEGER;
    CREATE or replace TYPE IntStack_O AS OBJECT (
    maximalSize INTEGER
    ,top INTEGER
    ,position IntArray
    ,MEMBER PROCEDURE initialize
    ,MEMBER FUNCTION full RETURN BOOLEAN
    ,MEMBER FUNCTION empty RETURN BOOLEAN
    ,MEMBER FUNCTION getAnzahl RETURN INTEGER
    ,MEMBER PROCEDURE push (n IN INTEGER)
    ,MEMBER PROCEDURE pop (n OUT INTEGER)
    CREATE or replace TYPE body IntStack_O AS
    MEMBER PROCEDURE initialize IS
    BEGIN
    top := 0;
    -- Call Constructor und set element 1 to NULL
    position := IntArray(NULL);
    maximalSize := position.LIMIT; -- Get Varray Size
    position.EXTEND(maximalSize -1, 1); -- copy elements 1 in 2..50
    END initialize;
    MEMBER FUNCTION full RETURN BOOLEAN IS
    BEGIN
    RETURN (top = maximalSize); — Return TRUE when Stack is full
    END full;
    MEMBER FUNCTION empty RETURN BOOLEAN IS
    BEGIN
    RETURN (top = 0); — Return TRUE when Stack is empty
    END empty;
    MEMBER FUNCTION getAnzahl RETURN integer IS
    BEGIN
    RETURN top;
    END;
    MEMBER PROCEDURE push (n IN INTEGER) IS
    BEGIN
    IF NOT full
    THEN
    top := top + 1; — Push Integer onto the stack
    position(top) := n;
    ELSE
    –Stack ist voll!
    RAISE_APPLICATION_ERROR(-20101, ‘Error! Stack overflow. ‘
    ||’limit for stacksize reached.’);
    END IF;
    END push;
    MEMBER PROCEDURE pop (n OUT INTEGER) IS
    BEGIN
    IF NOT empty
    THEN
    n := position(top);
    top := top -1; — take top element from stack
    ELSE
    –Stack ist leer!
    RAISE_APPLICATION_ERROR(-20102, ‘Error! Stack underflow. ‘
    ||’stack is empty.’);
    END IF;
    END pop;
    END;
    Now if i run this..i will be getting the following output...
    DECLARE
    stack intstack_o := intstack_o(NULL,NULL,NULL);
    a INTEGER;
    BEGIN
    stack.initialize;
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1111);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1112);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1113);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    END;
    Output...
    Anzahl: 0
    Anzahl: 1
    Anzahl: 2
    Anzahl: 3
    Anzahl: 2
    1113
    Anzahl: 1
    1112
    Anzahl: 0
    1111
    Above is the Stack (Last In First Out) Implementations of integer array.Now my Requirement is Queue(First In First Out) Implementation of Integer array.

  • Problem with SQL object type extend

    Hi,
    i have a severe problem when i try to extend an SQL object type (that derive from an XMLSchema registration) with standard SQL operations. After update when i look the updated record with SQL (XMLDATA.*) then i find the new items. But when i load same XML as file from XML repository via FTP or WebDAV protocol i don't find the new items in that.
    Would anyone please help?
    Thanks in advance
    Gabor

    Hi Syed Emad,
    Could you please try to post a simple reproduce project in here?
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting error that variable1 and variable2 are type-incompatible

    Hi,
    I am geting error that VAR1 and TLINE1 are type-icompatible.my code is as follows .
    DATA : T_INDEX1(2)     TYPE P,
                  VAR1(1) TYPE C ,
                  TLINE1(70)     TYPE C.
    T_INDEX1 = 0.
      DO VARYING VAR1 FROM TLINE10 NEXT TLINE11.
        IF VAR1 NE SPACE OR T_INDEX1 GE 70.
          EXIT.
        ENDIF.
        T_INDEX1 = SY-INDEX.
      ENDDO.

    Hi
    Check now. you dont need full stop next to 100 coz it's not ended with that.
    IF wa_RESULT_PACKAGE-/BIC/AAA<= 100.
    \no need.
    AND wa_RESULT_PACKAGE-/BIC/BBB >= -500
    OR wa_RESULT_PACKAGE-/BIC/BBB <= 300 then
    RESULT_FIELDS-/BIC/CCC = 12.
    Else.
    RESULT_FIELDS-/BIC/CCC= 24.
    EndIf.
    Check the corrected one.
    IF wa_RESULT_PACKAGE-/BIC/AAA<= 100
    AND wa_RESULT_PACKAGE-/BIC/BBB >= -500
    OR wa_RESULT_PACKAGE-/BIC/BBB <= 300 then
    RESULT_FIELDS-/BIC/CCC = 12.
    Else.
    RESULT_FIELDS-/BIC/CCC= 24.
    EndIf.
    Regards,
    Chama.

  • Error when generating java classes from object types

    Hi,
    I'm using JDeveloper version 10.1.3.0.2
    I created an object type in the database, the definition is:
    TYPE domain_cls IS OBJECT (
    domain_idx           NUMBER(3)
    ) NOT INSTANTIABLE NOT FINAL
    I tried to create a java class for this object using JDeveloper, by using generate java menu item.
    I got the following error:
    oracle.jpub.JPubException: Warning: Cannot determine what kind of type is OBJMOI. DOMAIN_CLS. The following error occurred: ORA-06550: line 1, column 13:
    PLS-00103: Encountered the symbol "SYS" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "SYS" to continue.
    at oracle.jpub.sqlrefl.SqlReflector.addSqlType(SqlReflector.java:519)
    at oracle.jpub.sqlrefl.SqlReflector.addSqlUserType(SqlReflector.java:707)
    at oracle.jpub.publish.Publisher.addTypeOrPackage(Publisher.java:209)
    at oracle.jpub.publish.IntypeParser.TypeDeclaration(IntypeParser.java:238)
    at oracle.jpub.publish.IntypeParser.CompilationUnit(IntypeParser.java:75)
    at oracle.jpub.Doit.main(Doit.java:257)
    at oracle.jpub.Doit.main(Doit.java:102)
    at oracle.jdevimpl.cm.dt.jpub.JPubModel.publish(JPubModel.java:1047)
    at oracle.jdevimpl.wizard.jpub.JPubPanel.publish(JPubPanel.java:516)
    at oracle.jdevimpl.cm.dt.jpub.JPubAddin._doJPub(JPubAddin.java:174)
    at oracle.jdevimpl.cm.dt.jpub.JPubAddin.handleEvent(JPubAddin.java:81)
    at oracle.ide.IdeAction.performAction(IdeAction.java:661)
    at oracle.ide.IdeAction$2.run(IdeAction.java:889)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    any body can hlep in that please

    I would recommend using JAXB instead of the Oracle class generator. This will give a standards based object-to-XML platform.
    Oracle provides two JAXB implementations: one in the TopLink product, and the other in the XDK.
    For an example of using TopLink JAXB see:
    http://www.oracle.com/technology/products/ias/toplink/technical/tips/jaxb/index.htm
    TopLink also provides the ability to map existing Java objects to an existing XML Schema, for an example of this see:
    http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm
    -Blaise

  • Can you reference package variables in a pl/sql object type

    I'm trying to create an object type and I would like to use a type from a pacakge definition as one of the parameters for a method in the object. I read that types defined inside a PL/SQL package cannot be used as parameter. Does anyone have a workaround for this?

    You could move the type definition out from the package to a schema level object type. Then you should be able to use the schema level object type in both your package and the new object you wish to create.
    Below is a short example of what I mean:
    -- The way I interpreted your question
    CREATE OR REPLACE PACKAGE foo_pkg
    AS
    TYPE foo_obj IS RECORD (
    f1 NUMBER
    ,f2 VARCHAR2 (10)
    in_pkg_foo_obj foo_obj;
    END foo_pkg;
    SHOW errors
    CREATE OR REPLACE TYPE newFooObj IS OBJECT (
    f1 NUMBER
    ,f2 VARCHAR2 (3)
    ,f3 DATE
    ,MEMBER FUNCTION getAllFoos (inFoo IN foo_pkg.foo_obj)
    RETURN NUMBER
    SHOW errors
    CREATE OR REPLACE TYPE BODY newFooObj
    AS
    MEMBER FUNCTION getAllFoos (inFoo IN foo_pkg.foo_obj)
    RETURN NUMBER
    IS
    BEGIN
    RETURN 1;
    END;
    END;
    SHOW errors
    -- Clean up
    DROP PACKAGE foo_pkg;
    DROP TYPE newFooObj;
    -- Now try it with a schema level object type
    CREATE OR REPLACE TYPE foo_obj IS OBJECT (
    f1 NUMBER
    ,f2 VARCHAR2 (10)
    CREATE OR REPLACE PACKAGE foo_pkg
    AS
    in_pkg_foo_obj foo_obj;
    END foo_pkg;
    SHOW errors
    CREATE OR REPLACE TYPE newFooObj IS OBJECT (
    f1 NUMBER
    ,f2 VARCHAR2 (3)
    ,f3 DATE
    ,MEMBER FUNCTION getAllFoos (inFoo IN foo_obj)
    RETURN NUMBER
    SHOW errors
    CREATE OR REPLACE TYPE BODY newFooObj
    AS
    MEMBER FUNCTION getAllFoos (inFoo IN foo_obj)
    RETURN NUMBER
    IS
    BEGIN
    RETURN 1;
    END;
    END;
    SHOW errors
    DROP PACKAGE foo_pkg;
    DROP TYPE newFooObj;
    Bob

  • Oracle JDBC driver and the object types cache

    Hi there,
    Oracle JDBC Developer's Guide and Reference says (version 11gR1):
    Oracle JDBC drivers cache array and structure descriptors. This provides enormous performance benefits. However, it means that if you change the underlying type definition of a structure type in the database, the cached descriptor for that structure type will become stale and your application will receive a SQLException exception.http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/oraoot.htm#g1104293
    That is the problem we are having here... We have web services deployed to WebLogic server that use custom object types. Every time we have to change an object type definition the web services stop working (the error ORA-00902: invalid datatype is raised) and the only solution is to restart the JDBC data source which is quite disruptive to the development process.
    Is there a workaround to disable that "feature"?
    Thanks
    Luis

    Luis Cabral wrote:
    jschell wrote:
    Although if you are changing the object structure then the code to deal with it must change as well. So, especially in developement, why is restarting a problem?It is not that restarting per se is a problem. Here us developers do not have the required privileges to restart the JDBC pool and we have to ask the DBA to do it, and sometimes he is not immediately available. It is not a big thing but this can impact the development process.Your development process is hideously flawed then.
    The pool exists in the JEE server. And from your first post it seems that you have permission to restart that but not to access the management console. It is ridiculous to have access the the former and not the later.
    Not to mention that you should have your own JEE instance to develop on. Actually it is weird to me that a DBA would even be touching a JEE server. The competent ones I know don't even know how to do that. They know the database not the application servers.
    >
    In addition, having to restart a whole JDBC pool just because you changed a database object definition does not seem very flexible to me. Such issue does not exist in other connection types, for instance in OCI connections, that is why I thought there should be an option to turn it off if required.
    Well specifically you have to restart the pool because you were USING the object that changed.
    And I am rather certain that you can turn off the pool entirely.
    Even in production, I reckon that this may have a negative impact. For instance, say that you need to deploy a hot fix for a bug in one application that involves the re-creation of one single object type. This means that the whole JDBC pool, which may be used by other applications, may have to be shut down just because of that single object.Good point.
    I suggest you stop using complex objects in Oracle. I suspect that would eliminate the problem completely.

  • Problems with java and SQL

    Hi all. Not sure if I should ask this here or in an SQL forum. I�m trying to manipulate an access database through java via the JDBC-ODBC bridge driver. The program compiles ok but when I try to execute it I get an error. According to the error there is a syntax problem in my SQL create table statement but it doesn�t tell what the problem is and I�ve looked over the create statement and can�t find anything wrong with it. There is, however, an error code from the driver but I have no way of referencing it. Anyone here know why otherwise normal SQL code would cause a syntax error with java or how I can track the error to get a hint at what�s going wrong? Here is the code and the error:
    // java program to create an access database through JDBC
    import java.sql.*;
    public class videodb {
    public static void main(String args[]) {
         // attempt tp load DB driver
         try {
         // load the jdbc-odbc driver
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         catch (ClassNotFoundException cnfe) // driver not found
         System.err.println("Unable to load database driver");
         System.err.println("Details : " + cnfe);
         System.exit(0);
         try {
         // Create a connection to the data source
              Connection con = DriverManager.getConnection ("jdbc:odbc:vdds","","");
              // Create a statement to execute SQL commands     
              Statement stmt = con.createStatement();
              // create a table for DVD's
              stmt.executeUpdate ("create table DVD (id number(5), name char(30));");
              // insert a record into the DVD table
              //stmt.executeUpdate ("insert into DVD values (0001, 'StarGate');");
              // Close the connection
         con.close();
         catch (SQLException sqle) {
    System.out.println("Problem with SQL: " + sqle);
    System.out.println("Driver Error Number" + sqle.getErrorCode());     
    Error:
    Problem with SQL: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in CREATE TABLE statement.
    Driver Error Number-3551

    Here's what I got. I don't see anything that helps but I'm kinda new to using SQL and java together.
    D:\javatemp\viddb>java videodb
    Problem with SQL java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver
    ] Syntax error in CREATE TABLE statement.
    Driver Error Number-3551
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in
    CREATE TABLE statement.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
    at videodb.main(videodb.java:31)
    D:\javatemp\viddb>

  • When I click on firefox to open in my Mac, an error shows up: plug-in object Type error: id is undefined. When I click on the OK button, firefox opens. This never happened in FF 3. What is this?

    Also when I am in a site, such as an account, and click on a highlighted link, I get another error, {Javascript Application] can't create mcafee plug-in object: Type Error: components. classes [cid] is undefined. The only mcafee I had on my computer was the secure search and I uninstalled it, but I still get this message. When I click on the OK button with the error message, then the link opens up.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Concurrency and Oracle Object Types

    Hi All,
    I have a question regarding Concurrent usage of an Object type in Oracle.
    I have a java program which calls an Oracle stored proc with the object's table type as IN parameter. In my stored proc, I am populating an Oracle Object with data received from java and retrieving some data based on that.
    My java program can be invoked concurrently by 500 users at the same time - the application is built to handle that request load.
    Now in Oracle, if a bunch of requests are received at the same, would Oracle create multiple instances of this object type that would be usage to the multiple stored proc invocations? Or would there be a prob of concurrency?
    If multiple instance creation is not supported, is there some alternative I can use?
    My code roughly resembles:
    Object:
    contains two columns - name, age
    Stored proc - logic to retrieve and return data from a table based on the name, age received.
    When a bunch of requests access the stored proc simultaneously, will a bunch of instnaces of the object type get created? Or would there be a scenario where the object is common to all requests and hence data from one request would be conflicted due to data from another request?

    Hi Wiiliam
    Sorry for the late acknowledgement (i dozed off!).. Thanks for the response. So the private instance specific to a session ensure that theres no conflict between multiple requests to the same stored proc and hence no conflict of data... Great
    Chaitanya

  • Error using java and javascript

    I have a jsp page that links to a bean and is working fine (getting data from the database).
    On a html form I have a button with a picture that fires off javascript when clicked:
    <BUTTON TYPE=reset onclick=showinfo('<%=index%>')>
    <IMG SRC="http://localhost:8080/Portal/Images/q2.bmp" ALT="Info">
    </BUTTON>
    The javascript function just opens a new window and displays the text sent in:
    <Script Language=JavaScript>
    function showinfo(arrayindex)
    InfoWin=window.open("","InfoWin","width=345,height=220");
    InfoWin.document.write(arrayindex);
    return false;
    </Script>
    Well in the above example index is a number (pulled from the database using a java bean and javascript converts it into a string then the function displays it correctly. If I replace <%=index%> with regular text it works fine as well(because java isn't used to pull data)! The problem occurs when I retrieve text data from the database and send it to the function. The web page gives errors about a nonterminating string. But I can move the code to somewhere else on the form(as long as I don't send it to java script) and it will print the text to the screen. I can also view the source of the web page and the html shows the text from the data base as if I hard coded the text into the javascript!!!!!!!!!!!!!!!!!
    This must be a bug between java and javascript!
    -can pass numbers(from a database) between the two
    -can't pass text (from a database)between the two
    Any info would help!

    Found the problem myself!
    I am using an odbc connection to msaccess and the spaces in the text was messing things up!
    After taking out the spaces it worked again.

Maybe you are looking for

  • CharacterStyle Contains Properties Whose Getters Fail at Runtime

    For CS5, Actionscript: I have created some CharacterStyles in a document, and whoch to itterate over them in my Actionscript code, and work with the properties' values. The problem is that in may of the cases, the properties which interest me, when a

  • Negative eMac Display

    Our school has four eMacs. One of them, a 1GHz, 10.3.9 Panther, 256 MB RAM, and out of warranty, has started to have a display problem. The display is showing negative colours, like white shows as black, blue shows as orange etc. This only affects ou

  • [php+mysql] linked combo box in insert form?

    Hi all, I would like to add two list box on the same insert form. The two list box should be linked each other with a 1:1 relation. The data in the two compo box could be static data; no need to use dynamic data here). Selecting from list box 1 will

  • Where does DW CS5 store FTP and other data in W7

    My computer self destructed the boot sectors of it's system disc. I managed to get a clever chap to rescue all the app data and have managed to get back all my browserss book marks, pass words etc. My next stap is to try and get back all my presets a

  • Problem with JButton and NVDA

    I am using the following code and would like to hear NVDA and JAWS announce my button when I roll over it. The JFrame name and title bar components are announced, but that is all. Can someone help? import javax.swing.JButton; import javax.swing.JPane