• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Urgent !  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 '164.56.185.61: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.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set DISPLAY to
'164.56.185.61:0.0' instead of '164.56.185.61:0'
 
Sunita B B
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aruneesh ad all,
After setting export DISPLAY=164.56.185.61:0.0
Now its giving error that :
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '164.56.185.61: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
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!