WebLogic 6.0 HttpURLConnection class won't let me connect to a proxy

          I am getting a '400' error (which means the server cannot understand
          the request, I believe) when I attempt to connect to a proxy server
          to download the auto-configuration (.pac) file - don't ask why,
          it's a long story.
          My code works fine when I run it outside WebLogic from a vanilla
          Java class (using Sun's standard URLConnection class), but as soon
          as I put it inside a servlet in WebLogic 6.0, and it's wrapped
          by the weblogic.net.http.HttpURLConnection class, I get the following
          stack trace:
          java.io.FileNotFoundException: Response: '400' for url: 'http://corporate-proxy-server-name:8080'
          at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:351)
          at com.csfb.gws.proxy.ProxyFinder.getProxyString(ProxyFinder.java:82)
          at com.csfb.gws.proxy.ProxyFinder.getProxiesForIpAddress(ProxyFinder.java:46)
          at com.csfb.gws.proxy.test.TestProxyFinderServlet.doPost(TestProxyFinderServlet.java:52)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
          at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)
          at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          Does anyone have any idea why this is happening? It certainly seems
          as though the WebLogic wrapper class is not working the same as
          Sun's standard HttpURLConnection.
          Any advice would be greatly appreciated.
          Cheers
          Dave
          

You can use something like this:
          URLStreamHandler handler = new sun.net.www.protocol.http.Handler();
          URL url = new URL(null, "http://yourserver", handler);
          to use Sun's handler instead of WebLogic's. (you will have to edit weblogic.policy
          accordingly to allow your code to specify handler).
          Dave Blumenfeld <[email protected]> wrote:
          > WebLogic Server automatically wraps its own HttpURLConnection class
          > around the Sun one. I haven't explicitly requested that it do so.
          > Don't know if I have any control over that.
          > "Xiang Rao" <[email protected]> wrote:
          >>
          >>Why not just use Sun's HttpURLConnection if it works fine
          >>for you?
          >>The only thing you need to do is adding java.net to any
          >>related
          >>variable declaration such as java.net.HttpURLConnection
          >>= (java.net.HttpURLConnection)url.openConnection().
          >>
          >>
          >>
          >>"Dave Blumenfeld" <[email protected]> wrote:
          >>>
          >>>I am getting a '400' error (which means the server cannot
          >>>understand
          >>>the request, I believe) when I attempt to connect to
          >>a
          >>>proxy server
          >>>to download the auto-configuration (.pac) file - don't
          >>>ask why,
          >>>it's a long story.
          >>>
          >>>My code works fine when I run it outside WebLogic from
          >>>a vanilla
          >>>Java class (using Sun's standard URLConnection class),
          >>>but as soon
          >>>as I put it inside a servlet in WebLogic 6.0, and it's
          >>>wrapped
          >>>by the weblogic.net.http.HttpURLConnection class, I get
          >>>the following
          >>>stack trace:
          >>>
          >>>java.io.FileNotFoundException: Response: '400' for url:
          >>>'http://corporate-proxy-server-name:8080'
          >>>
          >>> at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:351)
          >>>
          >>> at com.csfb.gws.proxy.ProxyFinder.getProxyString(ProxyFinder.java:82)
          >>>
          >>> at com.csfb.gws.proxy.ProxyFinder.getProxiesForIpAddress(ProxyFinder.java:46)
          >>>
          >>> at com.csfb.gws.proxy.test.TestProxyFinderServlet.doPost(TestProxyFinderServlet.java:52)
          >>>
          >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
          >>>
          >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          >>>
          >>> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
          >>>
          >>> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)
          >>>
          >>> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)
          >>>
          >>> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          >>>
          >>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          >>>
          >>>
          >>>Does anyone have any idea why this is happening? It certainly
          >>>seems
          >>>as though the WebLogic wrapper class is not working the
          >>>same as
          >>>Sun's standard HttpURLConnection.
          >>>
          >>>Any advice would be greatly appreciated.
          >>>Cheers
          >>>Dave
          >>
          Dimitri
          

Similar Messages

  • My ipod won't let me connect to wi-fi, won't let me restore or reset it, and it keeps telling me i knew a passcode for any one and I never set a password up. How do I fix this?

    My ipod won't let me connect to wi-fi, won't let me restore or reset it, and it keeps telling me i knew a passcode for any one and I never set a password up. How do I fix this? Says try again in 6180146 min. my passcode setting is off, but restrictions are on. Very frustrated. please help

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • HT1338 My iTunes won't let me connect my iPhone because it says I need an updated iTunes, but when I try to download the new iTunes, it says that my Mac software (10.5.8) is too old. However, there are no software updates available. What can I do?

    My iTunes won't let me connect my iPhone because it says I need an updated iTunes, but when I try to download the new iTunes, it says that my Mac software (10.5.8) is too old. However, there are no software updates available. What can I do?

    It depends on what iPhone you have.
    If it's an iPhone 4S or earlier, click here.
    If it's an iPhone 5, you need to buy a Mac OS X 10.6 DVD, and that requires an Intel Mac with at least 1GB RAM.
    (73384)

  • Deauthorizing iTunes on a computer?  My laptop won't let me connect my iPhone because it says I'm authorized on too many computers, but when I try to de-authorize another computer I use it won't let me.  What's up?

    Deauthorizing iTunes on a computer?  My laptop won't let me connect my iPhone because it says I'm authorized on too many computers, but when I try to de-authorize another computer I use it won't let me.  What's up?

    What do you mean it won't let you?  What exactly does it say? (Sorry to sound so exasperated but this is like the 6th post in a row where people have made vague statements which do little to help us find solutions without a game of 20 questions.)  I'm going to guess and say you can only deauthorize a computer to which you have physical access or VPN login.  The alternative is to deauthorize all which you can only do once a year.

  • I updated my itunes version and since then it won't let me connect to the itunes store. I'm connected to the internet but it says I'm not.

    I updated my itunes version and since then it won't let me connect to the itunes store. I'm connected to the internet but it says I'm not.

    Can't connect to the iTunes Store
    What happens when you try to delete apps?
    You can't delete the apps that came with the iOS

  • My brand new out the box airport extreme won't let anything connect to it.

    My brand new out the box 5th gen (2013) airport extreme won't let anything connect to it. I've tried several setups from sratch by the book. multiple resets and restores still nothing. It just keeps telling mt that the password is in correct even though it is 100% right.
    My curren set up is as follows. Phone Line -> ADSL2+ router -> Airport extreme. There is also an old airport express running of the router, this was done because the airport extremem was failing to work.
    Trying to connect:
    2x iPhone 4s
    2x macbook air
    2x Mac Pro.

    You will want the Extreme to be in bridge mode if it is currently disabled. (see image below)
    This will allow the ADSL2+ router to perform two important functions for your entire network: 1) Provide both the DHCP & NAT services, and 2) Provide PPPoE support to allow access to your ADSL ISPs network.
    If the Extreme is left in its default state, a router, it will conflict with the first item and you will have want is known as a "double NAT" condition. Something you will want to avoid.

  • After putting my iPad onto airplane mode it won't let me access apps without connecting to iTunes but it won't let me connect to iTunes how can I resolve this?

    After putting my iPad onto airplane mode it won't let me access apps without connecting to iTunes but it won't let me connect to iTunes how can I resolve this?

    Try "Pacifist"!
    Pacifist is an application for Mac OS X that opens up .pkg installer packages, .dmg disk images, .zip, .tar, .tar.gz, .tar.bz2, .pax, and .xar archives, and more, and lets you install individual files out of them. This is useful if you need to install just one file out of a package instead of the entire package

  • When I open iTunes it opens to my library but it won't let me connect to iTunes store says I'm not connected to internet but I am

    when I open iTunes it opens to my library but it won't let me connect to iTunes store says I'm not connected to internet but I am

    Use the alt key to create a copy of an Arrange section by dragging it.

  • I have just upgraded to ios7 on my iPhone 4s and it won't let me connect to wifi at all

    I have just upgraded to ios7 on my iPhone 4s and it won't let me connect to the wifi at all I'm tapping the wifi and nothing is happening?

    See this. http://support.apple.com/kb/ts1559

  • My ipod touch screen displays "ipod disabled" "connect to itunes".  It won't let me connect to itunes or sign in

    My ipod touch screen displays "ipod disabled" "connect to itunes".  It won't let me connect to itunes or sign in

    Hey there Rghanam01,
    I see that you have an iPod that has been put into recovery mode and will need to be restored. Here is an article that will help you address this issue:
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    http://support.apple.com/en-us/HT201263
    Note that if you don’t see your device in iTunes, you will want to use the instructions under the “Get more help” section of the article:
    Get more help
    Learn what to do if you don't see your device in iTunes for OS X, or in iTunes for Windows.
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Itunes store won't let me connect

    For the past week the Itunes store won't let me connect. It says "itunes requires Safari 4.0.3 or later to be installed to use the itunes store within itunes...use software update"
    I checked my software update and it says I have the latest version of Safari (I download it last week as well).
    Any ideas? I purchase music from itunes almost weekly so this is a real pain right now.

    iTunes could not connect to the iTunes Store. The network
    connection was refused. Make sure your network settings are correct and your network connections active, then try
    again. Network Dignostics are as follows:Microsoft Windows XP Home Edition Service Pack 2 (Build 2600)
    Dell Computer Corporation XPS-Z
    iTunes 7.0.2.16
    Current user is an administrator.
    Network Adapter Information
    Adapter Name: {57D93D1E-D893-487D-BF78-F6918D859FA4}
    Description: Intel(R) PRO/100 VE Network Connection
    IP Address: 192.168.1.97
    Subnet Mask: 255.255.255.0
    Default Gateway: 192.168.1.254
    DHCP Enabled: Yes
    DHCP Server: 192.168.1.254
    Lease Obtained: Wed Nov 29 20:35:13 2006
    Lease Expires: Thu Nov 30 20:35:13 2006
    DNS Servers: 192.168.1.254
    Network Connection Information
    Active Connection: LAN Connection
    Connected: Yes
    Online: Yes
    Using Modem: No
    Using LAN: Yes
    Using Proxy: No
    SSL 3.0 Support: Enabled
    TLS 1.0 Support: Disabled
    Firewall Information
    Windows Firewall is on.
    iTunes is enabled in Windows Firewall.
    Connection attempt to Apple web site was unsuccessful.
    The network connection was refused.
    Connection attempt to iTunes Store was unsuccessful.
    The network connection was refused.
    Secure connection attempt to iTunes Store was unsuccessful.
    The network connection was refused.
    What must I change?

  • Help!my iPod won't let me connect to wi-fi!

    My 2nd generation iPod won't let me connect to a wirelass network.Please help.

    - Does it see the wifi network
    - Does it connect to other networks?
    - If wifi is grayed out see:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    You are reallly not providing us enough information.

  • My iphone is disable please try in 249,00 mons but it won't let me connect to itunes either?

    my iphone is disable please try in 249,00 mons but it won't let me connect to itunes either?

    iOS: Unable to update or restore

  • My ipod touch screen froze on a blank white page and won't let me connect to itunes what to do?

    My ipod touch screen froze on a blank white page and won't let me connect to itunes what to do?

    It works for many users. In some cases the white screen is due to a hardware problem and there is nothing that one can do short of getting someonet to know what they are doing and take the iPod apart andmaybe fix the hardware problem.
    xxSoccerKyleeAnnaxx wrote:
    Can you please stop writing this on everyone's discussion because it obviously isn't working and I need a different answer....

  • My ipod is stuck on the apple logo and won't let me connect to itunes to reset it what do i do?

    My ipod is stuck on the apple logo and won't let me connect to itunes to reset it what do i do?

    Try:                                               
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

Maybe you are looking for

  • To Mac, or not to Mac, that is the question...

    Okay, so I don't know if I'm allowed to ask this in this forum, but I'll give it a try anyway. I will be starting college in the fall and will need a computer. I've had myself convinced for a while now that I want a MacBook...but now I'm starting to

  • Problem with CSS files when placed in multiple locations.

    Hi, In our application we have a folder structure for the code files. Folder structure looks something like the one shown below: ABC ---Scripts ---Stylesheets DEF Scripts Stylesheets Common   ---Scripts   ---Stylesheets   The problem is, if we create

  • After updating to ios 7.0.3 my wifi has been DISABLED and BLUETOOTH. Need help

    I need some help. How can I fix my iPhone4s? Yesterday I updated my ios to the newest version using my handset. And then early morning while using it the wifi suddenly turned off. I restarted my handset but still the same. The wifi still disabled. I'

  • Printer will only print one copy no matter how many I put in.

    Hi Im now using Windows 7 Word 2010 and since then I can only ever print one copy of my document no matter how many I ask for.  Has this happened to anyone else.  I have tried using a newer printer in the hopes it was a printer communication problem

  • Diablo 2 and/or Doom 3 on a MacBook, good idea?

    Well, these are the only games I'd play on the Macbook, D2 for sure Doom 3 might be changed for Prey, but anyways, I read somewhere that the MacBook can use up to 420something Mbs of ram for video, so can it run smoothly or will it crash and burn? Sh