AnsweredAssumed Answered

'No X11 DISPLAY' Exception running 5.4 on Linux

Question asked by bernd.ruecker on Apr 1, 2011
Latest reply on Oct 11, 2011 by hewlet
We tested the current 5.4 tag on our production Linux machine (without X) and got the following exception when trying to access any web app, anybody any idea what that is and how we can disable it? The problem first occured with 5.4, 5.2 did work…


javax.servlet.ServletException: Servlet.init() for servlet Spring MVC Dispatcher Servlet threw exception
   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptDebugger' defined in URL [jar:file:/home/tomcat/Tomcat/tomcat-6.0.29/webapps/activiti-cycle/WEB-INF/lib/spring-webscripts-1.0.0-RC2.jar!/org/springframework/extensions/webscripts/spring-webscripts-application-context.xml]: Invocation of init method failed; nested exception is java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
   org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
   org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
   org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
   org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
   org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:443)
   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:459)
   org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:340)
   org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
   org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
   javax.servlet.GenericServlet.init(GenericServlet.java:212)
   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)

root cause

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:431)
   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.start(ScriptDebugger.java:61)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1468)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
   org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
   org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
   org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
   org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
   org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:443)
   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:459)
   org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:340)
   org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
   org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
   javax.servlet.GenericServlet.init(GenericServlet.java:212)
   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)

Outcomes