gpt4 book ai didi

java - Web Script/share/page/api/javascript/debugger 已响应状态 500

转载 作者:可可西里 更新时间:2023-11-01 11:48:23 26 4
gpt4 key购买 nike

我在 CentOS 上安装了 Alfresco 4.2c。

要启用 JavaScript 调试,我转到 http://localhost:8080/share/page/api/javascript/debugger然后点击启用按钮:

enter image description here

不幸的是,单击此按钮只会显示以下错误:

enter image description here

Surf Web Script Status 500 - Internal Error

The Web Script /share/page/api/javascript/debugger has responded with a status of 500 - Internal Error.

500 Description: An error inside the HTTP server which prevented it from fulfilling the request.

Message: 01210001 Wrapped Exception (with status template): null

Exception: org.springframework.extensions.webscripts.WebScriptException - 01210001 Wrapped Exception (with status template): null

org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)

Server: Spring WebScripts - v1.2.0 (Release 1207) schema 1,000
Time: Feb 21, 2018 12:06:58 PM

Diagnostics: Inspect Web Script (org/springframework/extensions/webscripts/jsdebugger.post)

catalina.out 日志包含:

 2018-02-21 12:00:08,675  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-5] Exception from executeScript - redirecting to status template error: 01210000 Wrapped Exception (with status template): null
org.springframework.extensions.webscripts.WebScriptException: 01210000 Wrapped Exception (with status template): null
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:240)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:104)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jp.co.ichijo.alfresco.share.web.site.servlet.IchijoFilter.doFilter(IchijoFilter.java:85)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jp.co.ichijo.alfresco.share.web.site.servlet.AutoAddRequestHeaderFilter.doFilter(AutoAddRequestHeaderFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jp.co.ichijo.alfresco.share.web.site.servlet.AddRequestHeaderFilter.doFilter(AddRequestHeaderFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:224)
at org.mozilla.javascript.tools.debugger.SwingGui.<init>(SwingGui.java:152)
at org.springframework.extensions.webscripts.ScriptDebugger$AlfrescoGui.<init>(ScriptDebugger.java:165)
at org.springframework.extensions.webscripts.ScriptDebugger.activate(ScriptDebugger.java:86)
at org.springframework.extensions.webscripts.ScriptDebugger.show(ScriptDebugger.java:104)
at org.springframework.extensions.webscripts.bean.JavascriptDebuggerPost.executeImpl(JavascriptDebuggerPost.java:61)
at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
... 43 more
2018-02-21 12:06:58,230 ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-5] Exception from executeScript - redirecting to status template error: 01210001 Wrapped Exception (with status template): null
org.springframework.extensions.webscripts.WebScriptException: 01210001 Wrapped Exception (with status template): null
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:240)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:104)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jp.co.ichijo.alfresco.share.web.site.servlet.IchijoFilter.doFilter(IchijoFilter.java:85)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jp.co.ichijo.alfresco.share.web.site.servlet.AutoAddRequestHeaderFilter.doFilter(AutoAddRequestHeaderFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jp.co.ichijo.alfresco.share.web.site.servlet.AddRequestHeaderFilter.doFilter(AddRequestHeaderFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1771)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:224)
at org.mozilla.javascript.tools.debugger.SwingGui.<init>(SwingGui.java:152)
at org.springframework.extensions.webscripts.ScriptDebugger$AlfrescoGui.<init>(ScriptDebugger.java:165)
at org.springframework.extensions.webscripts.ScriptDebugger.activate(ScriptDebugger.java:86)
at org.springframework.extensions.webscripts.ScriptDebugger.show(ScriptDebugger.java:104)
at org.springframework.extensions.webscripts.bean.JavascriptDebuggerPost.executeImpl(JavascriptDebuggerPost.java:61)
at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
... 43 more

我的 Java 版本:

# yum list installed | grep openjdk
java-1.6.0-openjdk.x86_64 1:1.6.0.41-1.13.13.1.el6_8 @base
java-1.7.0-openjdk.x86_64 1:1.7.0.161-2.6.12.0.el6_9 @updates
java-1.8.0-openjdk.x86_64 1:1.8.0.161-3.b14.el6_9 @updates
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-3.b14.el6_9 @updates

最佳答案

  1. 安装最新的 Oracle Java SE(使用 CentOS 的 OpenJDK 软件包我只能安装 headless 版本,而我们需要带有 AWT/Swing 的完整版本)
  2. tomcat/bin/setenv.sh中设置JAVA_HOMEJRE_HOME为其路径,例如/usr/java/jdk1.8.0_161
  3. tomcat/scripts/ctl.sh 中删除您看到的所有 -Djava.awt.headless=true

如果您在另一个用户下运行图形用户界面(您需要一个用于调试器)而不是运行 Alfresco 的用户,您将收到错误 java.awt.HeadlessException - No X11 DISPLAY variable was set,但是该程序执行了需要它的操作。。我通过在 tomcat/bin/setenv.sh 中添加行 DISPLAY=":0.0"export DISPLAY 来修复它,但后来我得到了 java.lang.NoClassDefFoundError - 无法初始化类 sun.awt.X11GraphicsEnvironment 所以我只是放弃并以 alfresco 用户身份运行桌面环境,这解决了错误:

enter image description here

关于java - Web Script/share/page/api/javascript/debugger 已响应状态 500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48923746/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com