0

Could somebody tell me what is causing this error when using sqlj in Oracle 11g. I am using Solaris 8 and I have tried changing JDK versions (tried both 1.5 and 1.6).

bash-2.03$ ~/11.2.0.2/bin/sqlj -compile=false -classpath '~/11.2.0.2/sqlj/lib/translator.jar:~/11.2.0.2/sqlj/lib/runtime12.jar'
Exception in thread "main" java.lang.NoClassDefFoundError: sqlj/runtime/profile/DefaultLoader
at sqlj.tools.Sqlj.resetStaticVariables(Sqlj.java:2905)
at sqlj.tools.Sqlj.statusMain(Sqlj.java:189)
at sqlj.tools.Sqlj.main(Sqlj.java:150)

The same command works fine with Oracle 10g:

bash-2.03$ ~/10.2.0.3/bin/sqlj -compile=false -classpath '~/10.2.0.3/sqlj/lib/translator.jar::~/10.2.0.3/sqlj/lib/runtime12.jar'
Error: This SQLJ runtime must be run under an Oracle JDBC driver.

Thanks, Raj

Jon Heller
  • 34,999
  • 6
  • 74
  • 132
Raj
  • 708
  • 3
  • 10
  • 21

1 Answers1

1

According to this site the runtime12.jar should contain this class - so the question is - did you try running ls ~/11.2.0.2/sqlj/lib/runtime12.jar to verify the path exists?

RonK
  • 9,472
  • 8
  • 51
  • 87
  • Thanks for your reply. Yes, the path exists. The problem was due to wrong JDK version. It worked fine after I set the ORACLE_HOME and JAVA_HOME to the proper values (used JDK 1.5 to make it work). – Raj Apr 09 '11 at 11:27