Error Java Net Socketexception Unknown Proxy Type Http
Contents |
here for a quick java proxyselector example overview of the site Help Center Detailed answers
Java.net.proxy Example
to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Connecting with different Proxies to specific addresses up vote 5 down vote favorite 6 I am developing a Java webservice application (with JAX-WS) that has to use two different proxies to establish separated connections to internet and an intranet. As solution I tried to write my own java.net.ProxySelector that returns a java.net.Proxy instance (of type HTTP) for internet or intranet. In a little test application I try to download webpage via URL.openConnection(), and before I replaced the default ProxySelector with my own. But it results in an exception: java.net.SocketException: Unknown proxy type : HTTP at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:370) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:844) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:792) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1026) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) at norman.test.ProxyTest.c
Support Requests DavMail POP/IMAP/SMTP/Caldav to Exchange Brought to you by: mguessan Summary Files Reviews Support Donate Tickets ▾ Support Requests Patches Feature Requests Bugs Discussion Mailing Lists News Code Create Ticket View Stats Group Searches Changes Closed Tickets Open Tickets Help Formatting Help #173 Error: Unknown proxy type : HTTP Status: open Owner: nobody Labels: None http://stackoverflow.com/questions/2175742/connecting-with-different-proxies-to-specific-addresses Priority: 5 Updated: 2015-02-11 Created: 2012-11-06 Creator: Viktor Kruglikov Private: No I'm behind proxy. Recently exchange server was updated to 2010 and DavMail stopped to work with next error: Connect exception: java.net.SocketException Unknown proxy type : HTTP Could not find any help in internet https://sourceforge.net/p/davmail/support-requests/173/ about this problem. Here is part of my error log: 2012-11-06 11:47:55,765 INFO [ImapConnection-48688] org.apache.commons.httpclient.HttpMethodDirector - Retrying request 2012-11-06 11:47:55,765 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpMethodDirector - Attempt number 3 to process request 2012-11-06 11:47:55,765 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.open() 2012-11-06 11:47:55,765 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpConnection - Open connection to 192.168.0.10:3128 2012-11-06 11:47:55,766 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams() 2012-11-06 11:47:55,766 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpMethodDirector - Closing the connection. 2012-11-06 11:47:55,767 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.close() 2012-11-06 11:47:55,767 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams() 2012-11-06 11:47:55,767 INFO [ImapConnection-48688] org.apache.commons.httpclient.HttpMethodDirector - I/O exception (java.net.SocketException) caught when processing request: Unknown proxy type : HTTP 2012-11-06 11:47:55,767 DEBUG [ImapConnection-48688] org.apache.commons.httpclient.HttpMethodDirector - Unknown proxy type : HTTP java.net.SocketException: Unknown proxy type : HTTP at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:395) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.
Speaker BureauLog inRegisterSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not https://community.oracle.com/thread/1294000?start=0 post a blank message. Please type your message and try again. More discussions in Java Applet Development All PlacesJavaJava SEJava Applet Development This discussion is archived 1 Reply Latest reply on http://bugs.java.com/view_bug.do?bug_id=6631273 Dec 14, 2009 10:55 AM by 843807 Applet problem through a proxy 843807 Dec 7, 2009 10:08 AM Hi!!! I've a problem with an Applet through a proxy. I would be error java grateful if someone could answer, please! This applet is a File Uploader applet of the CMS OpenCms. With this applet the user can upload a file or a set of files with a previous preview of file. When I execute the applet with Internet direct connection I have no problem, but when I need use a proxy for connection it not work!!! error java net I use SO Windows XP and Java Plug-in version 1.6.0_17 (required for Google Chrome browser) and I test execution over JRE 1.6.0_06 and JRE 1.6.0_17 (configured by Java Control Panel). I test in IE 7, Firefox 3.5 and Chrome 3.0 with the same results. I enter Proxy information in network configuration of Java control panel. The server is outside my company network. When I call to JSP that loads the applet, the Java Plug-in use proxy information for download the Applet (jar, properties, etc...) and this process is OK. The Applet download and execute OK, and show a file selector panel for upload files to server. When I click OK, and the Applet start the upload process, it create a ZIP contains the file set to upload and use Jakarta Common HTTPClient for establish HTTP Connections to the server. In this moment, seems that the Java plug-in not bypasses the proxy data correctly to the Applet or the management of Applet connections through a proxy from the plug-in isn't correctly!!! I have the next messages in a Java console: ........... basic: Subprograma cargado. basic: App
RepublicDenmarkEcuadorEgyptEstoniaFinlandFranceGermanyGreeceGuatemalaHondurasHong KongHungaryIndiaIndonesiaIraqIrelandIsraelItalyJapanJordanKazakhstanKoreaKuwaitLaosLatviaLebanonLithuaniaMalaysiaMaldivesMaltaMexicoMoldovaNepalNetherlandsNew ZealandNicaraguaNorwayOmanPakistanPanamaParaguayPeruPhilippinesPolandPortugalPuerto RicoQatarRomaniaRussiaSaudi ArabiaSerbia & MontenegroSingaporeSlovakiaSloveniaSouth AfricaSpainSri LankaSwedenSwitzerland -- FrenchSwitzerland -- GermanTaiwanThailandTurkeyUkraineUnited Arab EmiratesUnited KingdomUnited StatesUruguayVenezuelaVietnamYemen Communities Social Applications Oracle Mix Oracle Blogs Oracle Wiki Oracle on Facebook Oracle on Twitter Networks Oracle ACEs Oracle PartnerNetwork Oracle Technology Network Knowledge Base Oracle User Groups Oracle Discussion Forums Support My Oracle Support Community I am a... Java Developer Database Admins and Developers System Admins and Developers Architect C-Level Executives Chief Financial Officer (CFO) Chief Information Officer (CIO) Other Roles Analyst Investor Job Seeker Partner PeopleSoft Customer Siebel Customer Sun Customer Student Midsize Company I want to... Support Create or Update Service Request Search Support Knowledge Database Download Patches Education Find Oracle University Training Choose an Oracle Certification Path Partner Find a Partner Solution Access Software and Technical Support Attend a Partner-Only Event Attend Training Download Logos Manage Solutions Catalog Other Tasks Purchase Oracle Products Online Browse Oracle Documentation Search Oracle Documentation Check Oracle Earnings Check Oracle Price Lists Download Oracle Software Find an Oracle ACE View Oracle Benchmarks Filters: All Bugs.java.com Blogs Corporate Site Discussion Forums Documentation Training PartnerNetwork Technology Network Products and Services Products Oracle Database Enterprise Manager Oracle Fusion Middleware Oracle Applications Server and Storage Systems Development Tools Oracle On Demand Oracle CRM On Demand Products A-Z List Solutions Java Business Intelligence Enterprise Performance Management Data Warehousing Governance, Risk, and Compliance For Midsize Companies See All ??? Services Advanced Customer Services Consulting Financing On Demand Support Oracle University Industries Communications Education and Research En