Announcement Announcement Module
Collapse
No announcement yet.
HttpInvoker + javaws + HTTP proxy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HttpInvoker + javaws + HTTP proxy

    I have a java web start application that uses HttpInvoker. The remote calls work fine if java is not configured to use an HTTP proxy. However, if I configure a proxy (via Java Control Panel), the remote method call fails with the stack trace below. My application doesn't configure a specific proxy itself, it needs to work with whatever's in the environment.

    Looking at the code for SocksSocketImpl, it looks like perhaps we shouldn't be in that class with an HTTP proxy configured, so I'm wondering if one of the spring or apache commons HttpClient layers is failing to get configured properly.

    org.springframework.remoting.RemoteAccessException : Cannot access HTTP invoker remote service at [...]; nested exception is java.net.SocketException: Unknown proxy type : HTTP
    Caused by: java.net.SocketException: Unknown proxy type : HTTP
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at org.apache.commons.httpclient.protocol.DefaultProt ocolSocketFactory.createSocket(DefaultProtocolSock etFactory.java:80)
    at org.apache.commons.httpclient.protocol.DefaultProt ocolSocketFactory.createSocket(DefaultProtocolSock etFactory.java:122)
    at org.apache.commons.httpclient.HttpConnection.open( HttpConnection.java:707)
    at org.apache.commons.httpclient.MultiThreadedHttpCon nectionManager$HttpConnectionAdapter.open(MultiThr eadedHttpConnectionManager.java:1361)
    at org.apache.commons.httpclient.HttpMethodDirector.e xecuteWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.e xecuteMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:323)
    at org.springframework.remoting.httpinvoker.CommonsHt tpInvokerRequestExecutor.executePostMethod(Commons HttpInvokerRequestExecutor.java:165)
    at org.springframework.remoting.httpinvoker.CommonsHt tpInvokerRequestExecutor.doExecuteRequest(CommonsH ttpInvokerRequestExecutor.java:103)
    at org.springframework.remoting.httpinvoker.AbstractH ttpInvokerRequestExecutor.executeRequest(AbstractH ttpInvokerRequestExecutor.java:134)
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.executeRequest(HttpInvokerClie ntInterceptor.java:177)
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.invoke(HttpInvokerClientInterc eptor.java:154)

    Suggestions greatly appreciated.

  • #2
    A JRE bug?

    Look at this bug report:
    http://bugs.sun.com/bugdatabase/view...bug_id=6709817.
    I have been experiencing the same problem with an applet (as in Oracle's bug report) yet it looks like the problem has nothing to do with the applet: in my case it's the browser plugin's network class loader that encounters this error after it has resolved the HTTP proxy. I just can't figure out why it ends up using the SOCKS Socket...

    Comment

    Working...
    X