SQL Exception : Type LONGINT .....

Hi,
I am using deploytool & J2EE 1.3.1...
I am trying to get a stateless session bean to create/reference a CMP2.0 entity bean.
I get the following error:
Context Exception caught = nested exception is: SQL Exception: Type LONGINT does
not recognize the format of the string 'Compiler'.
javax.ejb.EJBException: nested exception is: SQL Exception: Type LONGINT does no
t recognize the format of the string 'Compiler'.
SQL Exception: Type LONGINT does not recognize the format of the string 'Compile
r'.
The create method has a string key (in this case I pass the string "Compiler" and this is received in the ejbCreate method and I store it using the abstract method setName().
Has anybody any idea what this error means?
Thanks
Sean

Greetings,
Thanks for the help.
I am using cloudscape and have told the deploytool to
generate the SQL.Think of this as being only a "suggestion". The generated SQL is often incorrect, especially if your database schema is pre-existing. After generating the SQL, click on the method names and check the SQL statements for correctness.
I have given a new Abstract schema name, but still no
joy.This is really only relevant to your EJB QL. You should still check the mapping between EJB QL and SQL (refer again to the above :).
Any idea how one syn's up cloudscape and the abstract
schema?I hope this helps.
Thanks,
SeanRegards,
Tony "Vee Schade" Cook

Similar Messages

  • Mapping SQL data types (especially SMALLINT) to Java classes

    I want to know the reason for a certain pair of exceptions in JDBC�s mapping of SQL data types to Java classes.
    Sun�s web site ( http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/mapping.html ), Sybase�s site, and other sites contain mappings from SQL data types to Java primitive data types and/or Java classes. On that Sun web page, Section 9.9.1 maps mostly to Java primitive data types, and Section 9.9.3 maps mostly to Java classes. For the SQL data types that map to both primitive data types and classes, the class is typically the wrapper class of the primitive data type. For example, SQL�s DOUBLE data type maps to both the double primitive data type and its wrapper class (Double). However, Section 9.7 of that Sun web page says that there are exceptions for SQL�s TINYINT and SMALLINT. As expected, they map to the byte and short primitive data types, but they map to the Integer class, not the Byte and Short classes (which are the wrapper classes for byte and short). The web page does not state the reason for this pair of exceptions. It seems to me that SMALLINT data would either work for both short and Short or fail for both short and Short. I don�t see why it would work for short but fail for Short (as the web page implies).
    Can anybody think of a reason for the pair of exceptions? Thanks.

    ghs wrote:
    1) If a DBMS deals with the short and byte primitive data types (as the various web pages imply that it does), then why would it not deal with the Short and Byte wrapper classes?As another guess, because conversions get a little weird in java. Or at least they did in the past. As I recall (with not a lot of clarity) it is possible to do something like pass a perfectly valid string value into a short and get an exception. Whereas using Integer and then converting to Short works.
    Keep in mind that these are guesses.
    3) What I really want to know is this: If I use wrapper classes of Short and Byte (instead of Integer), what will be the harmful consequences (IF ANY)? So far, I have done some trivial testing with a Short for a SMALLINT column (I have not yet tried any TINYINT columns), and it seems to be working.I considered it risky to not test all target databases and drivers.
    Obviously testing will reveal problems.
    If you don't want to test then you might want to stick with integers.

  • SQL exception in File Adapter.

    Hi experts,
    I have a sender adapter of type file to retrieve data from ftp conexion. If I use a ftp client I can see remove the files, but when I active the communication channel appears this error in the communication channel monitor:
    Error: com.sap.aii.af.ra.ms.api.DeliveryException: Problem inserting 633c24f5-b66e-4216-17b8-b91aa544cfcc(OUTBOUND) into the database: java.sql.SQLException: ORA-01400: no se puede realizar una inserción NULL en ("SAPSR3DB"."XI_AF_MSG"."VERS_NBR")
    Any idea?
    What is the reason which a sql exception is raised?
    Thanks in advance.
    Jose Manuel

    Check Temporary Tablespace is Empty.
    Go thru this thread for other inputs to resolve ur problem :
    java.sql.SQLException

  • Can you confirm for me please? - jdbc to pl/sql record types

    Hi, I was hoping somebody could confirm the following please? I've been researching this in the Oracle JDBC docs and the Internet, but would feel more comfortable if somebody would confirm my findings.
    I have a 10g database pl/sql procedure that takes a pl/sql record type as both IN and OUT parameter. I'm not allowed to modify this legacy procedure, though I may create new supporting code.
    My research shows there is no inherit support in JDBC for Oracle pl/sql record types as per the Oracle JDBC docs.
    As a solution, if the procedure only returned a record type, my understanding is I could create a ref cursor in pl/sql, as well as a wrapper procedure that calls my original procedure, and returns the record type through the ref cursor. This could then be used by my JDBC code as JDBC supports ref cursors as a return type.
    However in my case, as the record type is both an IN and OUT parameter of my procedure, my research so far says JDBC support for ref cursors does not allow the writing of value to the ref cursor to be submitted back to the database. Is this correct?
    If this limitation exists, as such the better (and only?) solution is to create a shadow pl/sql procedure that takes all the record elements as separate IN OUT parameters and then create a private record based on the record type and pass it to the original procedure.
    Is my research here correct? Any help appreciated.
    Thanks & regards,
    CM.

    Chris,
    As far as I know, PL/SQL record types are not supported in JDBC.
    I believe you may be able to use TopLink.
    I think Kuassi Mensah may have some examples in his book Oracle Database Programming.
    Alternatively, you could use an Oracle object instead of a PL/SQL record.
    This would be similar to what you are suggesting except that instead of a ref cursor, you would transfer the PL/SQL record to an Oracle object.
    Good Luck,
    Avi.

  • How to access PL/SQL data types through JDBC

    Hi,
    We have stored procedures written in PL/SQL. These stored procs take both IN and OUT parameters. The parameter types are both regular datatypes like NUMBER, VARCHAR etc. So far so good. I know how to handle these data types.
    Some of the stored procs also use parameters that are defined as composite data types like %ROWTYPE or %RECORD. How would I set the values of these data types? Can I use the oracle extension - support for Oracle Objects to accomplish this. If so please let me know with an example. If not any other suggestions or help will be greatly appreciated.
    Thanks
    Karthik
    null

    JDBC (and SQLJ) only support SQL types as stored procedure arguments, not PL/SQL types.
    If your stored procedure uses a PL/SQL-only type, such as BOOLEAN, record types, or index-by tables, then you cannot call it from Java (or, for that matter, from other languages as well).
    There is one exception: scalar index-by table arguments have been supported since JDBC 8.1.7 in the JDBC-OCI driver (refer to the JDBC manual for specifics).
    One workaround is to create wrapper PL/SQL stored procedures that take SQL arguments and convert them to PL/SQL -and vice versa- and call the original PL/SQL stored procedures. For example, a record type could be exploded into individual arguments, or it could be converted into a SQL object type, index-by tables could be represented as SQL collection types, etc.
    You can find a small example of this in the back of the JPublisher manual, where an example is given how to call a PL/SQL stored procedure that takes BOOLEAN arguments.

  • Central Administraion Internal server error 500 | event id 5586 sharepoint foundation unknown sql exception 2812 could not find stored procedure dbo.proc_gettimerlock

    Hi,
    We have two SharePoint 2010 SP2 servers with one SQL 2012 Backend.
    Recently we cannot open the central administration, getting 500 internal server error and multiple SQL errors in event viewer:
    event id 5586 sharepoint foundation unknown sql exception 2812 could not find stored procedure dbo.proc_gettimerlock
    event id 5586 sharepoint foundation unknown sql exception 2812 occured could not find stored procedure 'proc_fetchdocforhttpget'
    Also I cannot run SharePoint configuration wizard, getting this error: sharepoint 2010 failed to resgister sharepoint services
    In the log file, I found this error "an exception of type microsoft.sharepoint.spexception was thrown 0x80131904"
    Any ideas?
    Thanks, Shehatovich

    As You can see below stored procedure has its specific Permission's, check user who is performing action as well as CentralAdministation Pool has right permission and their permissions are not modified from SQL Server.
    -Samar
     =
    Sr. Software engineer

  • 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.

  • Exception [type: SIGSEGV, Address not mapped to object]

    Hi,
    I'm working on an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
    I'm trying to execute the below:
          SELECT /*+ CURSOR_SHARING_EXACT */
                 vc.id_vehicle, gr.geoRouteId, g.name, round(g.length) length_, gr.active,
                 g.id_user id_user_georoute_owner, gr.grBindUserId id_user_bind_owner,
                 (SELECT count(*) FROM dual WHERE XMLEXISTS('$XML_ALM/user/alarmwhen[@direction="out"]' passing gr.geoRouteUser AS "XML_ALM") = 1) alm_out
            FROM configurator.t_vehicle_configuration vc, dispatch.v_georoute g,
                 xmltable('$XML/vehicleconf/GeoRoute/geoRoute[@active="1"]'
                   passing vc.x_configuration AS "XML"
                   columns geoRouteId   number  path '@id',
                           active       number  path '@active',
                           grBindUserId number  path '@id_user',
                           geoRouteUser xmltype path 'user'
                 ) gr
           WHERE vc.id_vehicle = 453
             AND g.id_georoute = gr.geoRouteId;but after few seconds I got the error in the object.
    The alert log says:
    +Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x38] [PC:0x483CEFD, evahtr()+495]+
    Errors in file /u01/app/oracle/diag/rdbms/evodb/EVODB2/trace/EVODB2_ora_13769.trc  (incident=301686):
    +ORA-07445: exception encountered: core dump [evahtr()+495] [SIGSEGV] [ADDR:0x38] [PC:0x483CEFD] [Address not mapped to object] []+
    Incident details in: /u01/app/oracle/diag/rdbms/evodb/EVODB2/incident/incdir_301686/EVODB2_ora_13769_i301686.trc
    The trace doesn't say more:
    +ORA-07445: exception encountered: core dump [evahtr()+495] [SIGSEGV] [ADDR:0x38] [PC:0x483CEFD] [Address not mapped to object] []+
    +========= Dump for incident 301686 (ORA 7445 [evahtr()+495]) ========+
    ----- Beginning of Customized Incident Dump(s) -----
    +Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x38] [PC:0x483CEFD, evahtr()+495]+
    The strange stuff is that if I remove the
    (SELECT count(*) FROM dual WHERE XMLEXISTS('$XML_ALM/user/alarmwhen[@direction="out"]' passing gr.geoRouteUser AS "XML_ALM") = 1) alm_out
    from the query, there is no problem.
    Do you have any suggestion?
    Thanks in advance,
    Samuel

    The strange stuff is that if I remove the
    (SELECT count(*) FROM dual WHERE XMLEXISTS('$XML_ALM/user/alarmwhen[@direction="out"]' passing gr.geoRouteUser AS "XML_ALM") = 1) alm_out
    from the query, there is no problem.That's probably because you're not using XMLExists correctly.
    The function returns a boolean value so you don't need to test for 1 or 0 as we had to with existsNode function before :
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb04cre.htm#sthref360
    It's also probably better to use a CASE expression instead of a subquery :
    SELECT /*+ CURSOR_SHARING_EXACT */
           vc.id_vehicle
         , gr.geoRouteId
         , g.name
         , round(g.length) length_
         , gr.active
         , g.id_user id_user_georoute_owner
         , gr.grBindUserId id_user_bind_owner
         , case when XMLExists('$XML_ALM/user/alarmwhen[@direction="out"]' passing gr.geoRouteUser AS "XML_ALM")
                then 1
                else 0
           end as alm_out
    FROM configurator.t_vehicle_configuration vc
       , dispatch.v_georoute g
       , xmltable('$XML/vehicleconf/GeoRoute/geoRoute[@active="1"]'
                   passing vc.x_configuration AS "XML"
                   columns geoRouteId   number  path '@id',
                           active       number  path '@active',
                           grBindUserId number  path '@id_user',
                           geoRouteUser xmltype path 'user'
         ) gr
    WHERE vc.id_vehicle = 453
    AND g.id_georoute = gr.geoRouteId
    ;Even better, you can test the condition directly in the COLUMNS clause with fn:exists XPath function.
    For example, something like this :
    SQL> with sample_data as (
      2    select xmltype('<root>
      3  <row><item>1</item><other id="a"/><other id="x"/></row>
      4  <row><item>2</item><other id="b"/></row>
      5  <row><item>3</item><other id="b"/></row>
      6  </root>') doc
      7    from dual
      8  )
      9  select x.*
    10  from sample_data t
    11     , xmltable(
    12         '/root/row'
    13         passing t.doc
    14         columns item number path 'item',
    15                 flag number path 'exists(other[@id="x"])'
    16       ) x
    17  ;
          ITEM       FLAG
             1          1
             2          0
             3          0

  • How to throw or catch sql exception for executeReader sql adapter

    Wcf sql adapter was created and executeReader was used.
    When an invalid sql statement was constructed and send it to wcf sql adapter, it will hanging there, and no response. No exception was catched even though send chape  was inside a catch block. How can I catch this kind of exception
    or throw this exception ? I need to give client an exception resposne.
    thanks
    Gary

    I used scope with exception handle which has Exception object type: "System.SystemException".
    I guess this type "System.SystemException" can catch any exception, including sql exception. Maybe I am wrong. I got error from window event:
    A message sent to adapter "WCF-Custom" on send port "WcfSendPort_SqlAdapterBinding_DalCore_Custom" with URI "mssql://shig-quad-2k3e1//DataSourceOne?" is suspended.
     Error details: System.Data.SqlClient.SqlException: Incorrect syntax near '='.
    Server stack trace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)
     MessageId:  {B24EF5B8-298A-4D4F-AA98-5E639361A7DB}
     InstanceID: {F8924129-265B-4652-B20E-8D25F8F20A51}
    If  "System.SystemException" can't catch all exception, which type can catch all exception ? I want to catch all exception in this catch block.
    thanks
    Gary

  • JDBC PL/SQL exception not shown in System Alert email

    Hi expert,
    The PL/SQL exception caught in the communication channeli  do not show up in the alert emails.  What could be  the reason behind it?
    We configured the SXMS_TO_ADAPTER_ERRLINES to capture the error message in alert category and configured the alert rule accordingly also. The system alert mail is show as below:
    If that is the PL/SQL error(Adapter Framework exception: null):
    Adapter type: JDBC
    Error text from the Adapter Engine:
    If that is the exception captured in Adapter Framework, not PL/SQL error:
    Adapter type: JDBC
    Error text from the Adapter Engine: Error when attempting to get processing resources: com.sap.aii.af.lib. util.concurrent.ResourcePoolException: Unable to create new pooled res ource: DriverManagerException: Can not establish connection:: SQLExcep tion: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist IBM AIX RISC System/6000 Error: 2: No such file or direc tory
    Is that because the system alert only can print out the detail error message captured in Adapter Framework? Is there any way to capture all of the possible errors in adapter engine?

    Hi Ruby,
    Please use the container variable  "SXMS_TO_ADAPTER_ERRTXT" in your alert category configuration to get the error text from Adapter Engine.
    The details of the container variable can be found at this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d0/d4b54020c6792ae10000000a155106/content.htm
    Regards, Gaurav.

  • SQL exception from servlet

    Can anyone suggest why i get an sql expection from my servlet? Or suggest another way performing this. I just get a my table but no results becuase of an sql exception in tomcat server console. degree id is the parameter from the html page
    try{
         conn = DriverManager.getConnection(url, user, password);
         String selectSQL = "SELECT * from book2readinglist WHERE readinglist = " + degreeid + ""; // change * to book_id or whatever it is
         System.err.println("DEBUG: Query: " + selectSQL);
         Statement stmt = conn.createStatement();
         ResultSet rs1 = stmt.executeQuery(selectSQL);
         //print out html head element
         out.println("<head>"+
              "<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">" +
              "<title>books</title>" +
              "</head>");
         // print out table header
         out.println("<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">" +
              "<tr><th><h4>Title</th></h4><th><h4>Author</th></h4><th><h4>Category</th></h4><th><h4>Cover</th></h4><th><h4>Publisher</th></h4><th><h4>Price</th></h4><th></th></tr>");
         //print out table rows one for each row returned in rs1
         while(rs1.next()){
              String selectSQL2 = "SELECT book from book2readinglist WHERE readinglist = " + degreeid + "";
              System.err.println("DEBUG: Query: " + selectSQL2);
    Statement stmt2 = conn.createStatement();
    ResultSet rs2 = stmt2.executeQuery(selectSQL2);
              while(rs2.next()){
              String selectSQL3 = "SELECT * from books WHERE idcol = " + rs2.getString("book") + ""; /
              System.err.println("DEBUG: Query: " + selectSQL3);
    Statement stmt3 = conn.createStatement();
    ResultSet rs3 = stmt3.executeQuery(selectSQL3);
         out.print("<tr>");
         out.print("<td><h5>" + rs3.getString("title") + "</td>");
         out.print("<td><h5>" + rs3.getString("author") + "</td>");
         out.print("<td><h5>" + rs3.getString("category") + "</td>");
         out.print("<td><img src=\"/assignment1/img/" + rs3.getString("cover") + "\" /></td>");
         out.print("<td><h5>" + rs3.getString("publisher") + "</td>");
         out.print("<td><h5>" + rs3.getString("price") + "</td></h5>");
    Thanks
    Nick

    i am afraid, exception stack trace would help us a lot in identifiyin wat, where, why an exception occured...

  • Unknow SQL Exception 214 occurred

    Team,
    some reason my SP2013 bloking to create any new content db, wepApps. it is giving following error without any clue
    Unknown SQL Exception 214 occurred. Additional error information from SQL Server is included below.  Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.  New Database Name :WSS_Content_f9c59c33c1cd46f4b5f8dd48f18ab6bc  The
    statement has been terminated.
    EventID:5586
    can anybody help me to resolve this problem.
    S.Venkata Appaji

    Hi,
    According to your error message, it says that you are calling sp_executesql with a VARCHAR statement, when it needs to be NVARCHAR.
    For your issue, you need to find the Procedure and use NVARCHAR in declation intead of VARCHAR like below:
    DECLARE @SQL NVARCHAR(300)
    SET @SQL = 'SELECT TOP 1 * FROM sys.tables'
    EXECUTE sp_executesql @SQL
    Instead of :
    DECLARE @SQL VARCHAR(300)
    SET @SQL = 'SELECT TOP 1 * FROM sys.tables'
    EXECUTE sp_executesql @SQL
    Reference:
    http://stackoverflow.com/questions/2743890/why-do-i-get-procedure-expects-parameter-statement-of-type-ntext-nchar-nvar?rq=1
    http://technet.microsoft.com/en-us/library/ee513056%28v=office.14%29.aspx
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • SQL Exception: Invalid column index while calling stored proc from CO.java

    Hello all,
    I am getting a "SQL Exception: Invalid column index" error while calling stored proc from CO.java
    # I am trying to call this proc from controller instead of AM
    # PL/SQL Proc has 4 IN params and 1 Out param.
    Code I am using is pasted below
    ==============================================
              OAApplicationModule am = (OAApplicationModule)oapagecontext.getApplicationModule(oawebbean);
    OADBTransaction txn = (OADBTransaction)am.getOADBTransaction();
    OracleCallableStatement cs = null;
    cs = (OracleCallableStatement)txn.createCallableStatement("begin MY_PACKAGE.SEND_EMAIL_ON_PASSWORD_CHANGE(:1, :2, :3, :4, :5); end;", 1);
         try
    cs.registerOutParameter(5, Types.VARCHAR, 0, 2000);
                        cs.setString(1, "[email protected]");
                             cs.setString(2, s10);
    //Debug
    System.out.println(s10);
                             cs.setString (3, "p_subject " );
                             cs.setString (4, "clob_html_message - WPTEST" );
                   outParamValue = cs.getString(1);
    cs.executeQuery();
    txn.commit();
    catch(SQLException ex)
    throw new OAException("SQL Exception: "+ex.getMessage());
    =========================================
    Can you help please.
    Thanks,
    Vinod

    You may refer below URL
    http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
    Thanks
    AJ

  • Retrieving PL/SQL Table Type returned by stored procedure using Java.

    Hi All,
    I am facing an issue in a Stored Procedure (SP) which returns Table Type, the PL/SQL complex type.
    Below mentioned is how my stored procedure looks like.
    CREATE OR REPLACE package sp_test_pkg as
    TYPE v_value_table_type is table of SW_VALID_CODE.swValue%Type
    index by binary_integer;
    v_swRMAStatus v_value_table_type;
    procedure sp_test
    (locale      in int,
              name      in SW_CODE.swName%Type,
              v_value_table out v_value_table_type,
    batch_size in int,
    out_batch_size in out int,
    status out int);
    end sp_test_lcode_code_pkg;
    My java program to access this stored procedure is as given below:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class OracleTest {       
         public static void main(String args[]) {
         Connection con = null;
    OracleCallableStatement cstmt = null;
    String url = "url";
         String userName = "username";     
         String password = "password";
    try
              DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());     
              con = DriverManager.getConnection(url, userName, password);
         cstmt = (OracleCallableStatement)con.prepareCall("begin " +
              "sp_test_pkg.sp_test_pkg(?,?,?,?,?,?); end;");
              cstmt.setInt(1, 1);
         cstmt.setString(2, "Test");
              cstmt.registerOutParameter(3, OracleTypes.ARRAY);
              cstmt.setInt(4, 10);
              cstmt.setInt(5, 1);
              cstmt.registerOutParameter(5, Types.INTEGER);
              cstmt.registerOutParameter(6, Types.INTEGER);
              cstmt.execute();
    } catch(Exception ex) {
    ex.printStackTrace(System.err);
    } finally {
    if(cstmt != null) try{cstmt.close();}catch(Exception _ex){}
    if(con != null) try{con.close();}catch(Exception _ex){}
    When i execute this java program, i get the following error:
    java.sql.SQLException: Parameter Type Conflict: sqlType=2003
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:245)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:389)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:452)
         at OracleTest.main(OracleTest.java:49)
    I am not sure where i am going wrong. I have never worked on such complex types before. I want to retrieve the complex table type returned by the stored procedure using my java source code.
    Can anyone please help me out in resolving this issue?. This is very urgent.

    JDBC does not recognise types declared in PL/SQL. This is documented in the Dev Guide. [Find out more|http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraarr.htm#1057625].
    The only work around would be to build a wrapper which calls your existing PL/SQL procedures and returns a SQL type instead. Obviously not knowing your precise scenario I have no idea how much work this entails for you. It may be worth building a code generator.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • SQL Exceptions

    Hi all
    I hope everyone knows that in SQL there are various kinds of exceptions that are thrown , which are vendor-specific.
    Now, while doing my program i came across situations, in a single java statement where i am inserting certain data in the database which can be a duplicate record.....(I am using MS Access). In the database there is one column which cannot contain duplicates, and hence when i add a record using such an insert statement, it throws an SQLException as follows
    java.sql.SQLException: General error
    now this 'General error' is one type of error, which is again vendor-specific.
    What i want to know is, how do i detect in java code which type of SQL exception is thrown and correlate it with the database vendor, so that i can show an appropriate error/warning message to the user of my application.
    Please help......
    Thank You.
    Vaibhav

    I use Derby in my applications, and their messages are cryptic (at best). However, on the website, there is documentation for the error codes (http://db.apache.org/derby/docs/dev/ref/rrefexcept71493.html) that are provided in their "obtuse" (I dislike using that word, but it fits) messages.
    What I did was write a parser for the documentation page's HTML that loaded the SQL State error codes into a properties file that would allow me to better see which type of error it is.
    Now... that is because I want to log the information more clearly to make error tracking easier when debugging. If you want to provide "special handling", I think there's not much of a choice but to continually utilize "instanceof" in some kind of helper/utility class.
    For example, in that case, I would write:
    public class SqlExceptionUtilities
       * Default constructor.
       * <br />Declared private to prevent utility class instantiation.
      private SqlExceptionUtilities() { }
       * Provide error handling for specific exception types.
       * @param e the exception to handle
       * @param logger the logger to utilize along-side the base error handling
      public static handle(SQLException e, Logger logger)
         if (e instanceof ProprietarySqlExceptionType1)
         else if (e instanceof ProprietarySqlExceptionType2)
         else if (e instanceof ProprietarySqlExceptionType3)
         else
              logger.err("Generalized SQL Exception encountered: " + e.getMessage(), e);
    }The other route I would consider taking is, again, a properties file that provides error handling capabilities based on the SQL exception's class name.
    Hope this helps.

Maybe you are looking for

  • AE CS6 - Focusrite Forte driver no longer supported?

    Hi, Following the latest update to AE CS6 my focusrite forte audio card is no longer accepted?  It works fine in every other program including the latest AE CC and all other Adobe CC programs and also Abelton Live, Cubase, Windows Media, Quicktime et

  • Can't run applet after mac os x upgrade

    hello, I have trouble running a simple java applet on my mac os X laptop .ie:double click on jar file, opens up but nothing happens The problem started when I upgraded my laptop to 10.2.5 [c18339:~] fred% java -version java version "1.4.1_01" Java(TM

  • How to convert large Word 2007 doc (1200 KB) to PDF with Acrobat 9 Standard

    I'm trying to convert a large Word 2007 document to PDF with Acrobat 9 Standard.  It gets as far as 58% and then says it is unable to complete the conversion.  How can I fix this?

  • How to Create EXTRACTOR from R3 QUERY

    Hi, I'd like to create an extractor from a custom ABAP R3 Query that must be executed with a variant. The standard extractor from a query doesn't allow to execute the query with a variant. The query variant drives some calculations and it's important

  • Key Command for Snapping

    I've found that turning off "snapping" at certain times is just as useful as turning it on are at others. Sure would be useful if there was a key command for toggling this feature on and off. Anyone know if there is such a command? If not, perhaps Ap