Opening http url from R12.2.5 redhat linux

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Opening http url from R12.2.5 redhat linux

satish
Dear Erman,

Need your help.

we are doing google maps integration

Our developers want to call google maps url from their code.they have ran it successfully from jdeveloper but getting error when they place the same code in server.could you please let us know

They tried it through Java code of OAF. The page is successfully hitting the specified URI in the browser in the Local System. But when deployed in server we are getting “java.awt.HeadLess” exception.
In the process, we tried to test “xdg-open http://maps.google.co.in” command from Putty in Server as follows.

Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

ErmanArslansOracleBlog
Administrator
This is probably caused by the JRE that runs on your Linux OS..

you are talking about "HeadlessException" right?

If so, this exception is thrown when code that is dependent on a keyboard, display, or mouse is called in an environment that does not support a keyboard, display, or mouse.

You may try using -Djava.awt.headless=false for that JVM..

It depens on your application actually.
Probably, your Linux machine currently doesn't support display, keyboard, or mouse.

so, a true fix will be configure the machine according to the needs of your application.
It may also be related with the display.

- Be in runlevel 5 (init 5)
-Check whether the X11 server is installed
-Check whether DISPLAY variable is properly set
-Check by opening a VNC
-Heavyweight awt/swing components which requires display, mouse keyboard should be run on client side rather than server side. (this is for your developers)
Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

satish
Dear Erman

Thank you.

I am able to open vnc

Applications running on Linux platform try to get the value of the environment variable DISPLAY to find out where the GUI output should be shown. When this variable is not set you get the error
java.awt.HeadlessException: No X11 DISPLAY variable was set

Where should i set the display variable in r12.2.5

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

ErmanArslansOracleBlog
Administrator
I didn't understand what your application is, and how & where you deployed it and what documentation you followed..

Actually this is not documented for EBS 12.2..

Anyways, you need to set the DISPLAY before starting your application in your shell.


Ex:
export DISPLAY=:0.0  (if vnc is on port 0, you need to test this display before starting your application)

If your application is starting automatically when the WLS starts, then you should set the DISPLAY env variable before starting WLS.

You should also ensure that, your WLS managed server (Oacore in this case) is configured with the headless option -> -Djava.awt.headless=true

This can be seen by using Weblogic Console.. (servers - oacore Server start arguments )
Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

satish
Thanks for the update.

According to your previous updates
"You may try using -Djava.awt.headless=false for that JVM",i made it false and i will try
Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

ErmanArslansOracleBlog
Administrator
Was it true?
Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

satish
Hi Erman,

I has added it in arguments section for managed server.No value was there before

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Opening http url from R12.2.5 redhat linux

ErmanArslansOracleBlog
Administrator
This is not documented bytheway.
It should be tested.
I strongly suggest you to test this approach on some test setup before implementing it in production.
Also, ask Oracle Support for approval.