• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent !

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic