java.lang.ClassCastException when trying to retrive a jdbc/OracleDS
Hello friends, I'm experiencing a rare problem, "java.lang.ClassCastException" when trying to retrive the jdbc/OracleDS datasource using JNDI lookup, the exception is there, either, when running in the embebed OC4J from JDev 10.1.3.3 or when deploying (the War) to my OracleIAS (10.1.2). Actualy we are programing the DataSource and changing the URL each time we update the application (in both environment: Developer and Production), it is just a temporary "work around" while we find the real solution.
We can't Cast a Oracle Object (oracle.jdbc.pool.OracleDataSource) to the java DataSource. Why?
Here you have the story:
The application wa started in Eclipse 3.2 with Tomcat 5, and we are using Struts 1.1 and Hibernate 3, in this environment we don't have problems. the problem happens during deploying the application to our Orace AS 10g (10.1.2). When googling for solution we found related problems in some forums, so we tried all the solutions explained in that post, including this. Finaly, we failed to find the solution.
After that, we migrate the application to JDeveloper 10.1.3.3, and then try the JNDI lookup and the problem STAY, then we did everything again into JDev:
- Changed the default jdk from 1.5 to 1.4.2_06, for the projects, the embebed OC4J and the Java Compiler....
- Configuring the DataSource manualy in the xml.
- Testing with several jdk version, trying on embebed oc4j, standalone oc4j, Oracle IAS, and so on.
- We have tried everything we found in the posts.
But .... the problem still :'(.
We have found that some guys have solved the problems with the change of the jdk and other small stuff, but all that were not enough for us.
Have somebody found other solution for this problem or we have some alien problem here?.
Thanks in advance.