0

For a databases course I am running apache and getting an error 52 when trying to submit a form.

I have seen that this is from running an old version of java but I have the latest version so I'm pretty stuck.

exception: javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/InsertAirline

root cause: java.lang.UnsupportedClassVersionError: InsertAirline : Unsupported major.minor version 52.0 (unable to load class InsertAirline)

I'm using the following command to compile:

javac -d ../apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/classes -classpath ../apache-tomcat-6.0.18/lib/servlet-api.jar:ojdbc6.jar *.java

Any ideas?

Is the driver ojdbc6 the problem?

Or could it be an error in my source code (html or java files)?

I have java version "1.8.0_73"

I appreciate any and all help!

hellow3rld
  • 1
  • 2
  • 2

1 Answers1

3

It seems you are compiling your files with java 1.8 but the tomcat where you are running them runs with an older java version.

Either run tomcat with java 1.8 or compile your code with a target version equivalent to the jre running your tomcat.

neomega
  • 712
  • 5
  • 19