Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7772745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:56:57+00:00 2026-06-01T16:56:57+00:00

I have managed to break a working application, and cannot work out how to

  • 0

I have managed to break a working application, and cannot work out how to fix it.

I have a java web-app which runs on “tc server” on a Windows7 box from within Eclipse (spring STS version.)

The app will use java.awt.robot to perform a screen capture, and display the captured image on the subsequent page.

So far so good, and I have been able to collect a bufferedImage from the screen and display it on a subsequent page within the web-app.

And then I somehow broke the web-app, possibly be loading the Android SDK and Eclipse tools.

Now, I am getting an exception from Robot because it cannot run in a HeadlessEnvironment.
Google searches indicate that a headlessEnvironment is for running without a screen and keyboard, but I have both.
The application worked previously without ever encountering the HeadlessEnvironment.

If I debug and display the GraphicsEnvironment;

    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();

I get a HeadlessGraphicsEnvironment object based on a Win32GraphicsEnvironment.

whilst:

String nm = java.security.AccessController.doPrivileged
(new sun.security.action.GetPropertyAction("java.awt.graphicsenv", null));
System.out.println("java.awt.graphicsenv = " + nm);

gives

java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment

My poor upgrade to android led me to originally abandon the upgrade and reinstall the latest SpringSource toolset. This encountered the HeadlessEnvironment problem, so I have reverted back to my original version of eclipse, which now also has the same problem.

I feel rather stuck now, and as most searches are telling me how I can turn Headless mode ON, can anyone explain how to turn headless mode back off again ?

Many Thanks !

<————- EDIT: Stack Trace Added ——————————————————>

05-Apr-2012 18:42:51 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [viewerServlet] in context with path [/WebView]  threw exception [Request processing failed; nested exception is java.lang.RuntimeException:  java.awt.AWTException: headless environment] with root cause
java.awt.AWTException: headless environment
at java.awt.Robot.<init>(Robot.java:75)
at uk.co.fred.MSWindowsHandler.WindowHandlerUtilities.setupRobot(WindowHandlerUtilities.java:191)
at uk.co.fred.MSWindowsHandler.WindowHandlerUtilities.scanWindow(WindowHandlerUtilities.java:71)
at uk.co.fred.Scanner.ScanServiceImpl.scanScreenToBufferedImage(ScanServiceImpl.java:66)
at uk.co.fred.viewer.controller.scan.control.ScanControlController.postPage_control_Scan(ScanControlController.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
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:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
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:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.traceNextValve(HttpRequestOperationCollectionValve.java:112)
at com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:94)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:279)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:56:58+00:00Added an answer on June 1, 2026 at 4:56 pm

    Issue Resolved:
    Within the Server launch configuration within Eclipse there are a set of configuration parameters which included the statement:

    -Djava.awt.headless=true
    

    By creating another Server configuration in Eclipse and selecting a “Base” type instead of an “Insight” type of tc Server Instance, I was able to get a not Headless Environment.

    It seemed like the “Insight” type for tc server insisted on a Headless run environment (although I did not investigate further.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have somehow managed to break my infopath form :( When I try to
I have managed to create a custom action in C# using MakeSfxCA which is
I have a pretty big web application that I created last year using ASP.NET
I am currently working on a Photoshop-like transformer application to work with DisplayObjects as
I have managed to make the footer fixed in my web page. I used
I'm curently working on my first Android app, which is my first pice of
I have managed to set up Cassandra + Thrift and the Python wrapper for
I have managed to get a cron job to run a rake task by
I have managed to bring the following output with this query SELECT DISTINCT IF(purchaseproduct_customerid=0,contactperson,vendorname)
I have managed to put this condition and rule below together to redirect a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.