I have a web application which gets deployed as .ear file on OC4J from Eclipse IDE . Everything is working perfectly fine as long as Java version is 1.4.2
As soon as I change the version to Java 1.5 or Java 1.6 the deployment goes forward and then fails with the following exception,
Unable to resolve datasource: jdbc/OracleDSoracle.oc4j.admin.internal.DeployerException: [myWebApp:myWebApp] - Unable to resolve datasource: jdbc/OracleDS
The jdbc/OracleDS only appears in application.xml and no where else in oc4j or my application.
If I remove the above line then, when I use Jdk 1.6 the exception changes to the following,
oracle.oc4j.admin.internal.DeployerException: com.evermind.naming.SubContext cannot be cast to javax.sql.DataSource
I have tried to search this problem but I am not getting any clues. It seems like a Java type casting problem occurring in the background between my application and Jdk 1.6 , which works fine in Jdk 1.4.2
Any comments , ideas are appreciated.
I hope you guys have recompiled the Java source files with the latest JDK.
Is this a standalone server or enterprise application server?
If you are just deploying the builds without recompiling as per the applicable JDK versions, you may get these errors.
If you have compiled with right version of JDK, then you need the server configured with right version of JDK/JRE.
Thanks for your reply. The builds are compiled each time the Jdk version is changed to Jdk 1.5 or 1.6, but it gives the same error. I have even placed Jdk 1.6 oracle drivers to connect to the database but that doesn't seem to make a difference.
Is there anyone who's using data-source.xml configuration for oracle on jdk 1.5 or jdk 1.6.