eclipse-ee4j / eclipse-ee4j/jersey

Support HttpURLConnection proxy configuration

Open
#579 12 comments 0 reactions 0 assignees View on GitHub
Component: core Priority: Critical Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

I have developed a swing application under NB (matisse) that uses the Jersey
client API to populate a JTable. All of my development was using the URL -
[http://localhost/testdata/rest](http://localhost/testdata/rest) and the recipient server was running on the same
system as the client. All was fine until I tried to deploy the server code on
another host in the network. When using any URL that points to a real host
(anything other than localhost), I get the included exception. It appears that
something is routing all non "localhost" requests (even if I use the hostname
of the local system) to a proxy?

com.sun.jersey.api.client.UniformInterfaceException: GET
[http://w2gz4p9c04.amer.corp.eds.com:8080/rest/elitfiles?](http://w2gz4p9c04.amer.corp.eds.com:8080/rest/elitfiles?)
batchsize=25&startpage=0&tonode&qname=D&fromnode&applid returned a response
status of 407
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:572)
at com.sun.jersey.api.client.WebResource.access$400(WebResource.java:68)
at com.sun.jersey.api.client.WebResource$Builder.get
(WebResource.java:454)
at connectconsole.ConnectConsoleView.populateBPTable
(ConnectConsoleView.java:624)
at connectconsole.ConnectConsoleView.getDoneQueue
(ConnectConsoleView.java:572)
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.jdesktop.application.ApplicationAction.noProxyActionPerformed
(ApplicationAction.java:662)
at org.jdesktop.application.ApplicationAction.actionPerformed
(ApplicationAction.java:698)
at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed
(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased
(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters
(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter
(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
#### Environment
Operating System: Windows XP
Platform: PC

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.