I need suggestions/help on the issue below: I am working on oracle migration work for a Java web application. I want to move my application from oracle 9i to 11g
The environment is : Jdk – 1.4.2 Weblogic 8.1(SP6) Database to connect to – Oracle 11g weblogic.db.url=jdbc:oracle:thin:@${weblogic.db.host}:${weblogic.db.port}/ weblogic.db.driver=oracle.jdbc.OracleDriver Oracle JDBC Driver version - "10.2.0.2.0"
When I query any table that has a CLOB datatype , the query fails to execute with the following error:
“Cannot assign value of type 'weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB' to property 'description_en' of type 'oracle.sql.CLOB'”.
I have read in oracle docs that weblogic 8.1(S6) supports oracle 11g .
Any other query which returns other than CLOB data type, it works fine, the issue is only with CLOB datatype that too with Oracle 11g :(
The same code works fine if it is connected to Oracle 9i, the only problem is with Oracle 11g.
My assumption is that I may be missing some extra wrappers/extensions which may be needed to map the CLOB datatype as I think there is no direct support from weblogic 8.1.
I also am thinking on below lines: If the application includes its own Oracle jar file so is not using the data source provided by WebLogic. But I do not know on how should I ascertain this.
Please help!
You need to upgrade your Java version. Java 1.4 is not supported by modern Oracle drivers.
Also, it is best practice to add the Oracle driver jars to the container classpath, and not include them in your application. Then the application needs to reference a datasource provided by the container. If you plan some Oracle-specific fireworks, you may need the driver jars at compile time. You need to mark them as "provided" in your Maven pom.xml.