when I deploy a project in Apache Tomcat 6.0
it's working fine. When I deploy the same project in weblogic server 10.3
it's showing an error like below:
Error 500--Internal Server Error
javax.servlet.ServletException: [HTTP:101249][weblogic.servlet.internal.WebAppServletContext@ae43b8 - appName: '_appsdir_ab_dir', name: 'ab', context-path: '/ab', spec-version: 'null']: Servlet class FirstServlet for servlet FirstServlet could not be loaded because the requested class was not found in the classpath . java.lang.UnsupportedClassVersionError: FirstServlet : Unsupported major.minor version 51.0.
Best Answer
Your project has been built with a JDK whose version is higher than WebLogic supports. 51.0 designates JDK 7, but Weblogic 10.3.1 (for example, insert your version here) supports JDK 5 at most.
You must either update Weblogic or make your project compatible to a earlier Java Version.
You'll find more information about WebLogic 10.3's compatibility on Oracle's homepage: http://docs.oracle.com/cd/E12840_01/wls/docs103/compatibility/compatibility.html