Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show user-friendly message in case of 'Connection refused' #11

Open
activeeon-bot opened this issue Feb 28, 2014 · 0 comments
Open

Show user-friendly message in case of 'Connection refused' #11

activeeon-bot opened this issue Feb 28, 2014 · 0 comments

Comments

@activeeon-bot
Copy link

Original issue created by Vladimir Bodnartchouk on 28, Feb 2014 at 18:03 PM - PRC-8


git rev. ae41b3c9c717d0a86066a56888d7aa0c96ab5d04

There should be a user-friendly message instead of the printed exception

PAConnect(url='http://localhost:8080/rest/rest', login='demo', pwd='demo');
log4j:WARN No appenders could be found for logger (org.jboss.resteasy.plugins.providers.DocumentProvider).
log4j:WARN Please initialize the log4j system properly.
(link: 1) "Error in PAConnect(http://localhost:8080/rest/rest) :"
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.ow2.proactive.scheduler.rest.SessionHandler.invoke(SessionHandler.java:58)
at com.sun.proxy.$Proxy0.init(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at RJavaTools.invokeMethod(RJavaTools.java:386)
Caused by: java.lang.RuntimeException: java.lang.reflect.UndeclaredThrowableException
at org.ow2.proactive.scheduler.rest.SchedulerClient.renewSession(SchedulerClient.java:811)
at org.ow2.proactive.scheduler.rest.SchedulerClient.init(SchedulerClient.java:163)
... 11 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy31.login(Unknown Source)
at org.ow2.proactive.scheduler.rest.SchedulerClient.renewSession(SchedulerClient.java:809)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.ow2.proactive_grid_cloud_portal.scheduler.client.SchedulerRestClient$RestClientExceptionHandler.invoke(SchedulerRestClient.java:182)
... 14 more
Caused by: java.lang.RuntimeException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused
at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:114)
at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:88)
at com.sun.proxy.$Proxy30.login(Unknown Source)
... 19 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:109)
at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
at org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:443)
at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:677)
at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:110)
... 21 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
... 33 more
Show Traceback

Rerun with Debug
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.reflect.InvocationTargetException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants