Http plugin issue

Forum to discuss the Web client version of Servoy.

Http plugin issue

Postby nestrocuation » Fri Jun 28, 2013 8:11 pm

I am trying to use google chart api to show chart on my home page .In servoy developer (Windows 7) it works perfectly , but in my server(Centos) its throwing error .

Here is my code
Code: Select all
var chartURL='http://chart.apis.google.com/chart?chs=335x198&chd=t:2,1&cht=p3&chdlp=b&chdl=Accounting(2)|Healthcare(1)';
globals.chartHTMLContent=plugins.http.getMediaData(chartURL);


Here is error i get in my server
Code: Select all
ERROR [http-443-10] com.servoy.j2db.util.Debug - Throwable [DC576298-61E4-4231-9360-1702A02E75E0 onpolicy_qms]
java.net.UnknownHostException: chart.apis.google.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:227)
        at sun.net.www.http.HttpClient.New(HttpClient.java:300)
        at sun.net.www.http.HttpClient.New(HttpClient.java:317)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
        at com.servoy.extensions.plugins.http.HttpProvider.js_getMediaData(HttpProvider.java:374)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:311)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1774)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:837)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:158)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3192)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:156)
        at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:574)
        at com.servoy.j2db.FormController.executeFunction(FormController.java:4936)
        at com.servoy.j2db.FormController.executeFormMethod(FormController.java:5272)
        at com.servoy.j2db.FormController.executeOnLoadMethod(FormController.java:5120)
        at com.servoy.j2db.FormManager.getFormController(FormManager.java:800)
        at com.servoy.j2db.server.headlessclient.dataui.WebTabFormLookup.getWebForm(WebTabFormLookup.java:147)
        at com.servoy.j2db.server.headlessclient.dataui.WebTabFormLookup.getWebForm(WebTabFormLookup.java:135)
        at com.servoy.j2db.server.headlessclient.dataui.WebSplitPane.getChildForms(WebSplitPane.java:763)



Nirav
nestrocuation
 
Posts: 61
Joined: Tue Jun 08, 2010 11:27 pm

Re: Http plugin issue

Postby ROCLASI » Sat Jun 29, 2013 11:38 am

Hi Nirav,

The exception is Unknown Host. So this means the server can't get an IP for this hostname.
Are your DNS settings correctly setup on this server? Can you reach other hostnames from there or is it only this URL ?

Hope this gets the further.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Http plugin issue

Postby nestrocuation » Tue Jul 02, 2013 10:48 pm

Thanks a lot , it actually worked it was my bad .
nestrocuation
 
Posts: 61
Joined: Tue Jun 08, 2010 11:27 pm


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 2 guests