我想知道该如何修复这个错误。我拿到机器时,机器上安装了错误的 Java,所以我的老板安装了 JRocket 来修复这个问题。
WebLogic 从那时起就一直有问题。我无法执行我的工作职责,因为我无法启动管理控制台来部署我的程序。
<Feb 8, 2013 11:12:09 AM EST> <Error> <HTTP> <BEA-101017> <[ServletContext@24724985[app:consoleapp module:console path:/console spec-version
:2.5], request: Workmanager: consoleWorkManager, Version: 0, Scheduled=true, Started=true, Started time: 175 ms
[
GET /console/login/LoginForm.jsp HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: JSESSIONID=jmWQRTxQGg3X2VKts2cQPwgQ2Qnw1WHNfdfmyGPGsxL9BDYB552v!1725644840; ADMINCONSOLESESSION=wdxyRVWTT368HDwVky3SM8VWT20Y0DC5Y6VK
93TpphPdl5C7yVzH!-418537281
Connection: keep-alive
Cache-Control: max-age=0
]] Root cause of ServletException.
java.lang.ClassFormatError: javax/servlet/jsp/jstl/fmt/LocalizationContext : Missing Code attribute
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
Truncated. see log file for complete stacktrace
>
实际上,完整的错误如下:
[
GET /console/login/LoginForm.jsp HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: JSESSIONID=jmWQRTxQGg3X2VKts2cQPwgQ2Qnw1WHNfdfmyGPGsxL9BDYB552v!1725644840; ADMINCONSOLES
ESSION=wnNQRVwM2hDDd6TyKhT3pVhKKJJjnJJ6xBpScC2flWhXVLxKdzDy!-592106223
Connection: keep-alive
Cache-Control: max-age=0
]] Root cause of ServletException.
java.lang.ClassFormatError: javax/servlet/jsp/jstl/fmt/LocalizationContext : Missing Code attribu
te
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:1
01)
at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:8
6)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.ja
va:43)
at com.bea.console.utils.ResourceBundleCache.getBundle(ResourceBundleCache.java:49)
at com.bea.console.taglib.html.SetBundle.doStartTag(SetBundle.java:33)
at jsp_servlet._login.__loginform._jsp__tag0(__loginform.java:401)
at jsp_servlet._login.__loginform._jspService(__loginform.java:190)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelp
er.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125
)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416
)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:327)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppS
ervletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServl
etContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321
)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.jav
a:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
答案1
这似乎是 CLASSPATH 问题。您需要检查类路径并确保 CLASSPATH 中有正确的 jar。
答案2
当您更改 JDK/JRE 时,可能需要更新几个地方才能正常工作。确保使用正确的版本(使用 进行检查ps
)。