'No X11 DISPLAY' Exception running 5.4 on Linux

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2011 04:54 AM
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 causeorg.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 causejava.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)
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2011 04:59 AM
Same issue here, you might want to check that out: http://forums.activiti.org/en/viewtopic.php?f=6&t=700&p=3249&hilit=scriptDebugger%27#p3249
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2011 06:21 AM
This is the only thing I can dig up: http://forums.alfresco.com/en/viewtopic.php?f=8&t=8332&st=0&sk=t&sd=a&start=15
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 10:02 AM
Hi all,
in order to solve the issue, I defined the logger:
Nothing changed. I still get the BeanInstantiation-Exception and the resulting headless-Exception.
Is there anything else I have to do? Maybe you have another advice for me?
Best Regards,
Gerardo
PS: The root-logger of the activiti-explorer, -cycle, -probe was already assigned to log-level=WARN. The ScriptDebugger should already be affected by the root-logger, shouldn't it. And because WARN is lower than DEBUG the scriptDebugger-Bean should not be instantiated in the first place. Did I miss something?
in order to solve the issue, I defined the logger:
<logger name="org.springframework.extensions.webscripts.ScriptDebugger">
<level value="info" />
</logger>
I added this logger to the log4j.xml in the WEB-INF/classes-folder of the four web-apps:- activiti-cycle
- activiti-rest
- activiti-probe
- activiti-explorer
Nothing changed. I still get the BeanInstantiation-Exception and the resulting headless-Exception.
Is there anything else I have to do? Maybe you have another advice for me?
Best Regards,
Gerardo
PS: The root-logger of the activiti-explorer, -cycle, -probe was already assigned to log-level=WARN. The ScriptDebugger should already be affected by the root-logger, shouldn't it. And because WARN is lower than DEBUG the scriptDebugger-Bean should not be instantiated in the first place. Did I miss something?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2011 04:26 AM
Gerardo,
I'm also puzzled by this, the debugger shouldn't be started in the first place…
I'm also puzzled by this, the debugger shouldn't be started in the first place…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2011 12:29 PM
Hi Frederik.
In the meanwhile we found the root source: A log4j.jar in the tomcat lib (required by a JIRA deployed on the server as well) caused no log4j configuration being read from the places we expected. Then the default was DEBUG, which caused this bug to be fired. Seems we need a dedicated TOmcat for it (on JBoss the webapps are still not running)…
Thanks for your help!
Cheers
Bernd
In the meanwhile we found the root source: A log4j.jar in the tomcat lib (required by a JIRA deployed on the server as well) caused no log4j configuration being read from the places we expected. Then the default was DEBUG, which caused this bug to be fired. Seems we need a dedicated TOmcat for it (on JBoss the webapps are still not running)…
Thanks for your help!
Cheers
Bernd

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2011 05:04 AM
Hi all,Will try it myself to make out what's the reason.
in order to solve the issue, I defined the logger:I added this logger to the log4j.xml in the WEB-INF/classes-folder of the four web-apps:
<logger name="org.springframework.extensions.webscripts.ScriptDebugger">
<level value="info" />
</logger>
I even defined a log4j.xml in the ${TOMCAT_HOME}/conf.
- activiti-cycle
- activiti-rest
- activiti-probe
- activiti-explorer
Nothing changed. I still get the BeanInstantiation-Exception and the resulting headless-Exception.
Is there anything else I have to do? Maybe you have another advice for me?
Best Regards,
Gerardo
PS: The root-logger of the activiti-explorer, -cycle, -probe was already assigned to log-level=WARN. The ScriptDebugger should already be affected by the root-logger, shouldn't it. And because WARN is lower than DEBUG the scriptDebugger-Bean should not be instantiated in the first place. Did I miss something?
~hewlet
