cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript debugger error

fordville
Champ on-the-rise
Champ on-the-rise
When enabling the Javascript debugger, I'm getting the following error and I don't know how to proceed.  Appreciate any suggestions!  I'm running a default installation on a RHEL5 machine. 

***********************************************

The Web Script /alfresco/service/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:   01180010 Wrapped Exception (with status template): No X11 DISPLAY variable was set, but this program performed an operation which requires it.
   
Exception:   java.awt.HeadlessException - No X11 DISPLAY variable was set, but this program performed an operation which requires it.
   
   java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
   java.awt.Window.<init>(Window.java:432)
   java.awt.Frame.<init>(Frame.java:403)
   javax.swing.JFrame.<init>(JFrame.java:202)
   org.mozilla.javascript.tools.debugger.SwingGui.<init>(SwingGui.java:152)
   org.springframework.extensions.webscripts.ScriptDebugger$AlfrescoGui.<init>(ScriptDebugger.java:159)
   org.springframework.extensions.webscripts.ScriptDebugger.activate(ScriptDebugger.java:80)
   org.springframework.extensions.webscripts.ScriptDebugger.show(ScriptDebugger.java:98)
   org.springframework.extensions.webscripts.bean.JavascriptDebuggerPost.executeImpl(JavascriptDebuggerPost.java:61)
   org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
   org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
   org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
   org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
   org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
   org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
   org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   java.lang.Thread.run(Thread.java:619)
   
Exception:   org.springframework.extensions.webscripts.WebScriptException - 01180010 Wrapped Exception (with status template): No X11 DISPLAY variable was set, but this program performed an operation which requires it.
   
   org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)
   
Server:   Community v3.4.0 (d 3370) schema 4,113
Time:   Feb 18, 2011 9:15:39 AM
   
Diagnostics:   Inspect Web Script (org/springframework/extensions/webscripts/jsdebugger.post)
3 REPLIES 3

vigj
Champ in-the-making
Champ in-the-making
I have the same exact problem

in addition if I modify installLocation/tomcat/webapps/alfresco/web-inf/classes/log4j.properties
setting AlfrescoRhinoScriptDebugger=on

alfresco explorer does not start and in the error logger i find

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rhinoScriptDebugger' defined in class path resource [alfresco/web-scripts-application-context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException

I'm running 3.4d community edition

This is really a problem since i cannot debug my extensions

mikeh
Star Contributor
Star Contributor
I don't think the Rhino debugger works on headless servers.

If you're debugging anyway, then start Tomcat as the desktop user.

Thanks,
Mike

vigj
Champ in-the-making
Champ in-the-making
I solved running alfresco as a consolle application not as a service (i recreated the old alf_start.bat, alf_stop.bat etc)..