Running headless not solving problem with X11 connectivity error

I'm having a variation on a problem referenced in quite a few places, but I don't seem to be getting any closer to a solution.
I'm running a stand-alone, console-only application that uses javax.swing.text.html.HTMLEditorKit to return plain text from HTML for use in multi-part e-mails. That class is causing the following error when running on the Unix server:
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:175)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:124)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at java.awt.Toolkit$2.run(Toolkit.java:796)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:787)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1572)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:731)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1269)
at javax.swing.text.StyleContext.reclaim(StyleContext.java:448)
at javax.swing.text.StyleContext.addAttribute(StyleContext.java:305)
at javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:568)
at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1497)
at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1307)
at javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:1255)
at javax.swing.text.StyleContext.addStyle(StyleContext.java:117)
at javax.swing.text.StyleContext.<init>(StyleContext.java:97)
at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:177)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:387)
at javax.swing.text.html.HTMLEditorKit.createDefaultDocument(HTMLEditorKit.java:218)
I don't have the option of starting an X11 service on this server, so I have to find another way around.
I'm using Java 1.4.2, so my understanding is that headless mode should solve this problem for me. I've tried adding the statement
System.setProperty("java.awt.headless","true");
to the code with no avail, and tried running it with the option "-Djava.awt.headless=true" from the command line, also with no luck.
Is anyone able to give me a tip on what other course of action I can try?

Thanks, but I'm not sure what you mean. I don't know that I have access to "the source of X11GraphicsEnvironment" and I'm not confident I could locate and solve the problem if I did.
I'm a little puzzled that it's not working in headless mode, because everything that my searching turned up indicated that it worked fine in 1.4.2 unless heavyweight components were used, which they aren't.

Similar Messages

  • Solve Problem with USB Connection / Read this it i...

    i can not load maps on my n97 mini. the error 'usb connection lost...' show on the screen in map loader but at the first day i had no problems.
    i wonder why. i look for driver, ovi suite, pc suite, usb at the pc, read in the forum and many more. but nothing solve the problem. after 2 days i use accidentally the original cable which comes with the nokia n97 mini (it is a ca-101) and all my problems are gone ! bevor i use an 'old' ca-101 cabel from my n82 and i can not upload a map but the handy is shown in the pc system with all drivers and no problems. only loading big megabytes data on the handy crashes the usb connection. with the n97 mini ca-101 cabel no problem with gigabytes. i look for another ca-101 cable from the 6220 from my wife and i have the same problems (i never used bevor this cable for a connection to any handy ! it was brand new !). it seems that 'old' ca-101 cabels do not handle big data with the n97 mini. i look on the gold spring clips in the micro usb and could see that the are a little smaller and not so high in the jack in the 'old' cables. all three cables are original from nokia and not from china ! if you are also problems look on the produkt id on the plastics. if the letters are gold you have a cable like my n97 mini cable, but if the letters are black on a silver button you have an 'old' cable.
    i hope i can help another with this maniac problem
    greetings

    I can verify this on win7 with latest PC suite.
    I was using the cable that came with my 6500s as I didn't want to tackle the rats nest of wiring behind my pc.
    This cable is a ca101 with silver writing on the plastic tab, made in China.
    Using this cable, my 6620c would not complete a backup, it would just sit for hours on 2-4%.
    Tested with the ca101 cable that came with the 6620c (gold writing, made in Thailand).
    This time the backup completed in about 2 minutes.
    Thank you so much for finding this, it has been driving me crazy!

  • EPrint problem with CP1525nw - connection error

    I just installed a CP1525nw in our home network.  It's wired, and we can print and access the printer's web page from every computer - no problems with local printing.
    However, I'm not able to successfully complete the ePrint setup. When printing the information sheet using the control panel, I quickly get the message "Connection Error, Check Connection", and it asks me to hit 'ok' to return to the main menu.  
    I am able to turn ePrint on and off, as well as enable and disable ePrint, both from the printer's webpage as well as the front LED menu.  Each time I toggle the latter, I get a new email address.  This successfully displays in the printer's LED window, so I know the printer is able to connect to the internet.  
    When I manually go to hp's ePrint website, and try to register my printer using the email address, it fails - unrecognized.
    I'm aware that in order to complete the installation, the information sheet must successfully print.  That seems to be the only thing failing.  Any thoughts?
    Here is some information about the printer and environment:
    - Apple AP Extreme
    - Printer directly wired to AP
    - IP: 10.0.1.17, DNS 10.0.1.1 (router)
    - Firmware: 20101125
    Thanks again.

    Everything is now working just fine.  I wish I could say that I know what changed, but it must be magic.  
    This morning, after letting the ePrint stuff rest for a few days, I removed the service (using the web server), cycled power on the printer, added the ePrint service to the printer, and now everything is just fine.  I'm able to print from our iPad no problem.  
    Seems hp fixed something, just not sure what.

  • Problem with X11: Xlib: connection to ".0" refused by server

    Hi all,
    I've problem with X11 on os x 10.6.2.
    Every time I move my macbook pro from office to home (and viceversa)
    X11 needs to be quit and restarted otherwise I get the following
    error:
    Xlib: connection to ".0" refused by server
    and X11 won't launch windows. Now this error is certainly linked
    to the fact that the computer changes IP address.
    What's the best way to solve the problem ?
    below you find the first lines of my .xinitrc
    thanks
    marco
    14:49> cat ~/.xinitrc
    #!/bin/sh
    $Id: xinitrc,v 1.2 2003/02/27 19:03:30 jharper Exp $
    userresources=$HOME/.Xresources
    usermodmap=$HOME/.Xmodmap
    sysresources=/etc/X11/xinit/.Xresources
    sysmodmap=/etc/X11/xinit/.Xmodmap
    merge in defaults and keymaps

    marcoajello wrote:
    and X11 won't launch windows. Now this error is certainly linked
    to the fact that the computer changes IP address.
    Yes this look like a bug as old as 10.4 .
    Keep in mind that X11 wasn't made for mobile users .
    What's the best way to solve the problem ?
    below you find the first lines of my .xinitrc
    I havn't been able to find a definite fix to this problem.
    Nonetheless I have a workaround which avoid me to have
    to restart my X11 twice a day. I'm a mobile user, I use
    many different network locations, and I use X11 full time too.
    I created an isolated location named "- isolated" so as to
    keep it on top of my Location menu. This location is simply
    built by removing all the services "Ethernet", "AirPort"…
    Then, when I leave my home, I always switch to my "- isolated" Location.
    When I arrive at my office or within a meeting, I switch to the correct
    Location.
    I can proceed with my work in progress within X11 applications.
    And I can open new X11 applications without any trouble.
    When I leave my office I also swith to my "- isolated" location.
    If you find any better workaround, please post it.
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • Upgrading to 6.1.1 hasn't solved the problem with network connection on 4S. Still "No Servise"!

    Upgrading to 6.1.1 hasn't solved the problem with network connection on 4S. Still "No Servise"!

    Same here.  Everything was fine running on ios 6.0, I don't know what possessed me to upgrade!  I contacted O2 and thet went through the usual settings; reboot; airplane mode etc and it works for a while (like 5 mins) then service is losted with the network.  I've even deleted the exchange email account and rebooted as read on the internet that this would fix the problem.... guest what....yep no joy!  This is clearly a faulty software update and need fixing pronto!  I've read that ios6.1.2 will be out soon to fix the firmware that was suppose to fix the initial network problem.   When will this be realeased Apple?!  It's hardly fit for purpose when I can't make calls or surf the internet. 

  • I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    Hi ..
    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    If that doesn't help, tap Settings > General > Reset > Reset Network Settings
    You may have to re enter your Wi-Fi password.
    If nothing above has helped, try here >  iOS: Troubleshooting Wi-Fi networks and connections

  • TS1398 hi, my iphone is not connecting to wifi. there is no problem with the connection of wifi. i tried so much but the connection is not stable. some times it connect and sometimes not connecting at all. if connected also its disconnecting again.pls hel

    hi, my iphone is not connecting to wifi. there is no problem with the connection of wifi. i tried so much but the connection is not stable. some times it connect and sometimes not connecting at all. if connected also its disconnecting again.pls help

    At the very least, I recommend you restart your router, (your internet box).
    More detail on your problem is needed - are you in a submarine? On the moon? On a tropical island?
    You can help yourself by providing as much info as you can about your present situation - what kind of router do you have? Have you moved it? DId you update it?  Did you do anything to change your setup, and if you did, what?

  • Why do we run into stupid basic problems with firefox?

    I have jre1.6_u31 installed on a Windows 7 and the brilliant
    firefox keep tell me that I've to install the jre_1.6_u29 missing plugin when I try to run an applet...a simple applet!! The plugin doesn't appear on add-ons manager then i use "check your plugins" and the stupid response is: "For your safety, Firefox has disabled your outdated version of Java. Please upgrade to the latest version."
    Running an applet is basic! Why are u making new versions when older ones are better? I' m sick of running into this stupid problems with firefox! Everything works on ie, chrome and safari but not on Firefox!
    I' m sick of trying to solve firefox basic problems!
    We have a site that has one thousand ore more visits per day...and we only have troubles with firefox! What do I tell the costumers? I' m not going to give them solutions difficult and confusing as usually your solutions are! They are common people not developers as me...they just want the things to work! I gave up and the solution that I give to them now is to stop using firefox and uninstall it. And people ask I chrome is becoming the second most used browser...here is your answer...
    I' m a developer and I've to develop I don't have the time patiente to trying solving basic firefox problems. If you don't know how to solve the problems then stop developing this and save us the headaches.

    Have you updated Java lately? You say you have jre1.6_u31 installed, but "Java(TM) Platform SE 6 U31" is not showing in the Plugins submitted with your question (click "More system details" to the right of your original question post). To enable, Add-ons > Plugins, and enable the item.
    If your OS is 64-bit and you have 32-bit browsers (Firefox) and 64-bit browsers installed, then you need to install both the 32-bit and 64-bit versions of Java.
    *See --> https://www.java.com/en/download/faq/java_win64bit.xml
    '''Older versions of Java blocked in Firefox''' --> https://addons.mozilla.org/en-US/firefox/blocked/p80 <br />
    '''Using/Updating Java''' --> [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox] <br />
    '''Unblocking Java''' --> https://support.mozilla.org/en-US/kb/unblocking-java-plugin
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Problem with database connectivity

    Hi guys,
    I'm having a problem with database connectivity . I'm using the mySQL database & org.gjt.mm.mysql driver.
    I've kept the org folder under the directory where the Database.java program is residing .
    My program is as follows:
    import java.sql.*;
    public class Database
         Connection con;
         public void connect()
              System.out.println("In connect.");
         public Connection connectDB(String username,String password,String database)
              try
                   Class.forName("org.gjt.mm.mysql.jdbc.Driver");
                   String url="jdbc:mysql:"+database;
                   con=DriverManager.getConnection(url,username,password);
              catch(SQLException e)
                   System.out.println("SQL Exception caught:"+e);     
              catch(Exception e)
                   System.out.println("Exception e caught:"+e);     
              return con;
         public static void main(String args[])
              try
              Connection c;
              Database db=new Database();
              c=db.connectDB("root","","//192.168.0.2/squid");
              System.out.println("Connection created.");
              c.close();
              catch(Exception e)
                   System.out.println("Exception caught:"+e);     
    It gets compiled but gives the following error when run.
    Exception e caught:java.lang.ClassNotFoundException: org.gjt.mm.mysql.jdbc.Driver
    Connection created.
    Exception caught:java.lang.NullPointerException
    I don't know why the class is not found.Pl . help me rectify my mistake.Is there any other path to be set?
    Thanks.

    You need to run it with the JDBC driver in the classpath
    java -classpath .;[mySqlJdbcDriver.jar] Database

  • SAP Screen Personas error "A problem with network connectivity has been detected"

    Hi,
    We just installed Personas release 100 SP02 and performed the
    configuration steps necessary. But when we acces the url and logon to
    personas we get the following erre
    A problem with network connectivity has been detected.
    Please check you connection and refresh your browser.
    Any help to solve this issue would be appreciated.
    Best Regards.

    Please use this checklist to see if everything is correct:
    1. restgui service handler class has CL_HTTP_EXT_ITS_BASIC
    2. SPRO -> Sap screen Personas -> Maintain system has
           - 3 letter system id
           - "Server.Url" without typo and value in http(s)://<SERVER>:<PORT>/ format 
           - "Service.Uri" without typo and value as /restgui
    3, Note 2026487 is installed
    4. If target system is different from source system then you are able to access the following
             - http(s)://<TARGETSERVER>:<PORT>/clientaccesspolicy.xml
             - http(s)://<TARGETSERVER>:<PORT>/crossdomain.xml
    5. role is assigned to user under /n/persos/admin_ui -> User Maintenance -> Search -> Show user -> Role
    If you still get error, then if you are using SSO, please check if you have configured login/create_sso2_ticket parameter correctly.
    Thanks
    Chinthan

  • Problem with wifi connection

    Hello everyone i'm new user of BlackBerry and i must say it's great phone
    but I have a one little problem with wifi connection:
    when i open "Call Management" and turn on wifi connection, find my home router network and connect with it- i have not green hook like with my telephone connection but only white minus
    Sou I think BB find my wifi connection but can't take internet from router?
    I had only one time working connection, but next day it lost
    The same problem i found on other forums but no one know how to solve the problem.
    Please help me solve this problem.
    ps: sorry for my english hope all is understandable
    Regards

    I, too had problems connecting my iTouch with my home computer. I did everything suggested and then called Apple. They worked very hard for me to find the problem ... even the engineers got involved. They found that the Symantec firewall downloaded from my ISP, Comcast, interfered with the iTouch communicating with the computer. As soon as I disabled the Symantec wall (not the internal mac firewall) my iTouch was back communicating with my computer. Apple deserves a lot of credit for isolating the problem. So, for those of you with this problem, check out your third party security software and remove what you must. Kudos to Apple customer service on this one.

  • Problem with wifi connectivity

    I am facing problem with wifi connectivity of iPhone, on status bar it displays full signal however it does not opens even a single window whenever I try to surf internet on it.
    I have internet connection which is having speed of 2mbps, its really irritating when iPhone keeps on processing while same thing opens on PC within fraction of seconds. Any idea about this, how to solve this issue?

    Tap Settings App > General > Reset > Reset Network Settings. Then relog into Wi-Fi.

  • Since upgrade to ios6 l have been having problem with wifi connection and connecting to App Store and iTunes store

    Q since upgrade to iOS6 l have been having problem with wifi connection and getting into App Store and itunes

    Saw this on another post.
    Applecare Senior Advisor Txx Bxxx (I have his contact info in an email he just sent) just confirmed with me that the problem people are having with the App Store not loading is an apple issue with there servers, ITS NOT YOUR IPAD so don't go restoring it!   It's not happening to everyone however but they are looking into it, its really hit or miss.
    In the meantime ...........
    The Complete Guide to Using the iTunes Store
    http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-using-t he-itunes-store/
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    iTunes: Advanced iTunes Store troubleshooting
    http://support.apple.com/kb/TS3297
    Best Fixes for ‘Cannot Connect to iTunes Store’ Errors
    http://ipadinsight.com/ipad-tips-tricks/best-fixes-for-cannot-connect-to-itunes- store-errors/
    Try this first - Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    This works for some users. Not sure why.
    Go to Settings>General>Date and Time> Set Automatically>Off. Set the date ahead by about a year.Then see if you can connect to the store.
    ~~~~~~~~~~~~~~~~
    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting
    http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet
    http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • How to solve problem with Macbook/Boxee/TV?

    I have connected my macbook to my TV using an adaptor cable, and I have downloaded Boxee. I am able to see my computer screen on the TV, though it appears as a doubled version of it in which software does not run. This doubled screen is to the right of my normal computer screen. I can, for example, open Safari on my computer and drag the browser to the right (offscreen on my computer) and it will show up on my TV. I cannot see the Boxee program at all when I open it on my computer, as it does not drag and drop.
    Any thoughts? Is this a problem with my connection cable, and how I've attached the Macbook to the TV? Is this a problem with the display of my MacBook and/or Spaces? I am stumped.
    Thanks for your help.

    You have the display set in "extended desktop" mode. In "System Preferences">"Display" there should be an "Arrangement" tab when you have the TV hooked up to the MacBook and both screens working. Do you see two monitors side by side? One of them will have a "Menu Bar" at the top. Just click on the Menu Bar and drag it to the second monitor. That will make the second monitor your main screen. When you disconnect from the TV your Menu bar will automatically change back to the MacBook.

  • Problems with ipod connection.

    Problems with ipod connection.
    I have problems to connect my ipod to computer windows 7.
    When I connect I get the following error:
    "We encountered an ipod, but could not be identified correctly. Disconnect and reconnect the ipod and try again."
    And it recognizes the ipod when trying to go play music or videos make me the following error:
    "Error while trying to copy on disk. The device is not connected."
    I've uninstalled all apple applications and re-installing, as I formatted the ipod and continues to set the same error.
    What else can I do?

    Hello,
    While your symptoms don't exactly match the descriotion, this article may be usefull in discovering if there is a setting on your computer that is causing this to happen.
    iPod not recognized in 'My Computer' and in iTunes for Windows
    http://support.apple.com/kb/ts1369
    -Griff W.

Maybe you are looking for