Web-Server

WebLogic Server 內部伺服器錯誤

  • April 18, 2015

當我在其中部署一個項目時,Apache Tomcat 6.0它工作正常。當我在其中部署相同的項目時,weblogic server 10.3它顯示如下錯誤:

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.

您的項目是使用版本高於 WebLogic 支持的 JDK 建構的。51.0 指定 JDK 7,但 Weblogic 10.3.1(例如,在此處插入您的版本)最多支持 JDK 5。

您必須更新 Weblogic 或使您的項目與早期的 Java 版本兼容。

您可以在 Oracle 首頁上找到有關 WebLogic 10.3 兼容性的更多資訊:http: //docs.oracle.com/cd/E12840_01/wls/docs103/compatibility/compatibility.html

可能您使用的是舊版本的 Weblogic,例如。(10.3.x) 和更高版本的 java例如 (jdk1.7.x)。解決方案是 1.如果可能,通過更高版本(或)更新您的 Weblogic 2.使用 jdk 1.6 編譯您的項目 轉到 IDE(例如 Eclipse)>右鍵點擊項目>屬性>選擇 java 編譯器>將編譯器合規性 1.7 更改為 1.6 >應用確定>轉到項目>清理並建構> 現在部署它。它肯定會工作。:)

引用自:https://serverfault.com/questions/336129