• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange SQLException

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello:

I have the following code:



The class which contains this code has a main method so I can test it. When I execute the main method from within JDeveloper, everything works fine. However, when I include this class in a web application and deploy it to the embedded OC4J server, the same code throws an exception on the last line above:

09/03/20 14:31:11 java.sql.SQLException: Internal Error
09/03/20 14:31:11 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
09/03/20 14:31:11 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
09/03/20 14:31:11 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION.initCollElemTypeName(OracleTypeCOLLECTION.java:985)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION.getAttributeType(OracleTypeCOLLECTION.java:1015)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleNamedType.getFullName(OracleNamedType.java:96)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeADT.createStructDescriptor(OracleTypeADT.java:2108)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeADT.unpickle81(OracleTypeADT.java:1432)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeUPT.unpickle81UPT(OracleTypeUPT.java:426)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeUPT.unpickle81rec(OracleTypeUPT.java:383)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle81_imgBody_elems(OracleTypeCOLLECTION.java:938)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle81_imgBody(OracleTypeCOLLECTION.java:882)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle81(OracleTypeCOLLECTION.java:702)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION._unlinearize(OracleTypeCOLLECTION.java:227)
09/03/20 14:31:11 at oracle.jdbc.oracore.OracleTypeCOLLECTION.unlinearize(OracleTypeCOLLECTION.java:199)
09/03/20 14:31:11 at oracle.sql.ArrayDescriptor.toJavaArray(ArrayDescriptor.java:663)
09/03/20 14:31:11 at oracle.sql.ARRAY.getArray(ARRAY.java:282)

I am using the same JDBC driver in both cases. I found that the exception contained the error code 17001 but that didn't help much. I have seen this problem reported many times but I have never seen a solution.

Anybody have ideas?

Thanks
Eric
 
Ranch Hand
Posts: 430
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do the version of the jdk the same in both projects?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it developer machine and server machine is same ?
OR, try changing the way you passed parameters to this code

May be fourth OUT parameter needs some thing other than OracleTypes.ARRAY, "ORG_FIRST_CHAR_OBJ_TAB"
 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the responses. Both ways of running occur within JDeveloper s they use the same JDK. aqnd they are on the same machine. JDevloper contains a built-in server. So I ran the code both from its main method from Jdeveloper and as part of a web application running in the built-in server.

Eric
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.google.com/search?q=java.sql.SQLException:+Internal+Error+at+oracle.jdbc.oracore.OracleTypeCOLLECTION.initCollElemTypeName gives interesting results.

It makes me think of a driver bug or a driver <--> database version mismatch.
 
pie. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic