Hi all, I have one problem on my Project. We were sending PDF files from Unix server to Web server(having CGI code). Now we want to send PDF file from unix server to same web server having new Java code(Rewrite Java for CGI) With this new setup PDF file is successfully posted to webserver.Also on webserver also PDF file is received correctly.But after posting file to webserver Unix side Java Program checks getResponse().getStatusCode() this cammand and this time we are getting following error.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '220.127.116.11:0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at <Unloaded Method> at java.lang.Class.forName0(Native Method) at java.lang.Class.forName0(Compiled Code) at java.lang.Class.forName(Compiled Code) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:63) at <Unloaded Method> at java.lang.Class.forName0(Native Method) at java.lang.Class.forName0(Compiled Code) at java.lang.Class.forName(Compiled Code) at java.awt.Toolkit$2.run(Toolkit.java:499) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:492) at java.awt.Window.getToolkit(Window.java:432) at HTTPClient.BasicKookieBox.<init>(CookieModule.java:848) at HTTPClient.DefaultKookiePolicyHandler.acceptCookie(Compiled Code) at HTTPClient.KookieModule.handleCookie(Compiled Code) at HTTPClient.KookieModule.responsePhase1Handler(CookieModule.java:391) at HTTPClient.HTTPResponse.handleResponse(Compiled Code) at HTTPClient.HTTPResponse.getStatusCode(HTTPResponse.java:179) at GSNClient.post(Compiled Code) at GPSGSNClient.main(Compiled Code)
First we were thinking may be X11 server is down on Unix side.But still if we try with CGI programming on web server side then its working fine. We changed only one input file on Unix side.Remaining code is as it is. Can some one help me on this issue? Why this error is throwing.
set DISPLAY to '18.104.22.168:0.0' instead of '22.214.171.124:0'
Sunita B B
posted 13 years ago
Hi Aruneesh ad all, After setting export DISPLAY=126.96.36.199:0.0 Now its giving error that : Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '188.8.131.52:0.0' as the value of the DISPLAY variable.
Can suggest what to do?
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java