We have an application that is running fine in production with java version 1.5 and weblogic server 9.2.0. Now we are migrating the same application to Java version 6 and weblogic server 10.3.4. We have integrated our application using eclipse IDE and its working fine. But when I am trying to build the ear using ant script, I am getting below error -
[javac] C:/Build XML_10.3.4/src/com/dao/ApplyDAO.java:21: cannot access oracle.jdbc.OracleTypes
[javac] bad class file: C:\Build XML_10.3.4\ojdbc6.jar(oracle/jdbc/OracleTypes.class)
[javac] class file has wrong version 50.0, should be 49.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] import oracle.jdbc.OracleTypes;
[javac] 1 error
I have tried running the build by setting the ojdbc6.jar(copied from the weblogic 10.3.4 server\lib installation folder) or classes111.jar in classpath. Could anyone please assist me in finding out whats went wrong? Will appreciate the help...
I am not an expert about ant scripting but it seems to me that your ant script is using and expecting java 1.5 but your driver jar is for 1.6. You should define the correct javac used by your ant script.
Joined: Mar 31, 2011
Thanks for your help Fatih.
I had forgotten to change the version. Now I changed it to java 1.6 and now its giving me different error:
[javac] C:\Build XML_10.3.4\src\com\dao\ApplyDAO.java:27:oracle.jdbc.driver.OracleTypes is not public in oracle.jdbc.driver; cannot be accessed from outside package
[javac] import oracle.jdbc.driver.OracleTypes;
I have tried using classes111.jar and ojdbc6.jar. Thanks in advance.