Weblogic does not call the ProxySelector class for http url

We are using weblogic server for our project. I have created a ProxySelector class and made it the default in my code. When my code tried to access the external url, the ProxySelector is called for socket url but not http url. Because of this, I am not able to return any HTTP proxy object from the ProxySelector and it fails.
Note: The code works fine if I execute it from tomcat.

Hi This is the method that I have for invoking webservices. It uses a Dispatch API. The myProxySelector is an instance of MyProxySelector which is already made defult in the appication startup.
This MyProxySelector has a threadlocal variable useProxy to indicate whether the proxy should be used or not. so I am setting the variable just before reply = dispatch.invoke(sm);
public class WebServiceDispatch {
public Object invoke() throws GLException {
Object result = null;
try {
Service service = Service.create(getOperation().getServiceName());
service.addPort(getOperation().getOperationName(), SOAPBinding.SOAP11HTTP_BINDING, call.getServiceEndpoint());
Dispatch<SOAPMessage> dispatch = service.createDispatch(getOperation().getOperationName(), SOAPMessage.class, Service.Mode.MESSAGE);
initHandlers(dispatch);
Map<String, Object> ctx = dispatch.getRequestContext();
if (call.useWSS()) {
ctx.put(SOAPConstants.WSSE_SECURITY, new WSSHeader(getCredentials().getUsername(), getCredentials().getPassword(), call.sendEncryptedPassword()));
} else if (call.getCredentials() != null ) {
String user = getCredentials().getUsername();
if ( user != null ) {
ctx.put(Dispatch.USERNAME_PROPERTY, user);
if (getCredentials().getPassword() != null ) {
if (call.sendEncryptedPassword()) {
ctx.put(Dispatch.PASSWORD_PROPERTY, getCredentials().getPassword().getEncryption());
} else {
ctx.put(Dispatch.PASSWORD_PROPERTY, getCredentials().getPassword().getText());
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage sm = mf.createMessage();
SOAPHeader sh = sm.getSOAPHeader();
SOAPBody sb = sm.getSOAPBody();
for ( Iterator<?> it = call.getOperation().getOrderedParameters().iterator(); it.hasNext(); ) {
WebServiceParameter parameter = (WebServiceParameter) it.next();
if (parameter.isBodyParam()) {
sb.addChildElement((SOAPElement)call.getParameterValue(parameter));
} else {
sh.addChildElement((SOAPElement)call.getParameterValue(parameter));
String endPoint = call.getServiceEndpoint();
myProxySelector.setUseProxy(useProxyServer);
if (getOperation().getReturn() != null) {
reply = dispatch.invoke(sm);
result = getReplyElement(reply);
call.setParameterValue(getOperation().getReturn(), result);
} else {
dispatch.invokeOneWay(sm);
} catch (Throwable t) {
throw GLException.factory(new CausedBy("Error Invoking Web Service Dispatch"),t);
return result;
.........// more code to get webservice details from db and load useProxyServer flag value
Here is the ProxySelector code
public class MyProxySelector extends ProxySelector {
protected ThreadLocal<Boolean> useProxy = new ThreadLocal<Boolean>();
     public ThreadLocal<Boolean> getUseProxy() {
          return useProxy;
     public void setUseProxy(boolean useProxy) {
          setUseProxy(useProxy? Boolean.TRUE: Boolean.FALSE);
     public void setUseProxy(Boolean useProxy) {
          this.useProxy.set(useProxy);
     private ProxySelector jvmDefaultSelector = null;
     public ProxySelector getJVMDefaultSelector() {
          return jvmDefaultSelector;
     private static MyProxySelector myProxySelector = null;
     private MyProxySelector(ProxySelector jvmDefaultSelector) {
          this.jvmDefaultSelector = jvmDefaultSelector;
     public static MyProxySelector getInstance() {
          if(myProxySelector==null) {
               myProxySelector = new MyProxySelector(ProxySelector.getDefault());
          return myProxySelector;
     @Override
     public List<Proxy> select(URI uri) {
          try {
               if (uri == null) {
                    throw new IllegalArgumentException("URI can't be null.");
               Boolean useProxyObject = useProxy.get();
               if(useProxyObject == null) {
                    String protocol = uri.getScheme();
                    if ("http".equalsIgnoreCase(protocol) || "https".equalsIgnoreCase(protocol)) {
                         return getProxyList();
                    } else if(jvmDefaultSelector != null) {
                         return jvmDefaultSelector.select(uri);;
               if(useProxyObject.booleanValue()) {
                    String protocol = uri.getScheme();
                    if ("http".equalsIgnoreCase(protocol) || "https".equalsIgnoreCase(protocol)) {
                         return getProxyList();
          } catch(Exception e) {
          } finally {
               if (useProxy != null) {
                    useProxy.remove();
          return getNoProxyList();
     @Override
     public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
          if (uri == null || sa == null || ioe == null) {
               throw new IllegalArgumentException("Arguments can't be null.");
          if (jvmDefaultSelector != null) {
               jvmDefaultSelector.connectFailed(uri, sa, ioe);
private static final String PROXY_HOST = "glog.integration.http.proxyHost";
private static String httpProxyHost = GLProperties.get().getProperty(PROXY_HOST);
private static final String PROXY_PORT = "glog.integration.http.proxyPort";
private static String httpProxyPort = GLProperties.get().getProperty(PROXY_PORT);
private static ArrayList getNoProxyList() {
          ArrayList noProxyList = new ArrayList<Proxy>();
          noProxyList.add(Proxy.NO_PROXY);
          return noProxyList;
private static ArrayList getProxyList() {
     Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(httpProxyHost, Integer.parseInt(httpProxyPort)));
          ArrayList proxyList = new ArrayList<Proxy>();
          proxyList.add(proxy);
          return proxyList;
public static class Startup implements StartupShutdown {
public void load(T2SharedConnection conn) throws GLException {}
public void activate(T2SharedConnection conn) throws GLException {
     ProxySelector.setDefault(getInstance());
public void unload() throws GLException {}
Edited by: pshivrat on Sep 3, 2010 10:09 PM

Similar Messages

  • WLS 8.1, SP1 - Weblogic does not detect my servlet class has changed

              I've come across this problem in weblogic 7.0 sp2 and 8.1 sp1 and never found the
              solution. I've asked for solution in BEA's newsgroups and official support and
              NEVER received any suitable answer. I've found other people's quesions regarding
              this problem and they didn't found an answer either. I can't believe this is not
              happenning to more people and there is not solution!!!!!!
              Sometimes (don't know when or why) when we copy our servlets developed with JBuilder
              (6, 7 or 9) or javac and ant, into our exploded archive directory application,
              weblogic does not detect the change, and it serves the the servlet's old version.
              Of course, that servlet is not included in any classpath, and even if we delete
              the class file, it still executes the old version. We even delete the .wlnotdelete
              folder under our server, temp, etc. restart the machine, etc. and it does not
              load the updated servlet.
              The only solution is to change servlet's name and the reference in our web.xml.
              That's the moment that weblogic detects changes, but, for so long? Sooner or later,
              the problem appear again... or not. WHY!!??!! What should we change/delete or
              whatever for our new servlet to be updated?
              How can I force weblogic to register again as new servlets ALL my servlets?
              Now it's even happening to a class used in a very simple tag library. CAN'T BELEIVE
              IT!!!!
              It happens in NT 4.0 and W2K Prof. It happened in Weblogic 7.0 sp2 and now in
              Weblogic 8.1 sp1. It never happened in Weblogic 5.1 sp10.
              Looking forward to hearing a solution for this.
              

              I too am looking for this answer.
              I did notice that the BEA Docs mention that the compiled file needs to be in WEB-INF/classes,
              and mine is in WEB-INF/lib. However, ALL the .jar files are in the LIB directory.
              My jar file is never found when it's in the classes dir....
              Please let me know if you find the solution.
              "Ignacio Sanchez" <[email protected]> wrote:
              >
              >I've come across this problem in weblogic 7.0 sp2 and 8.1 sp1 and never
              >found the
              >solution. I've asked for solution in BEA's newsgroups and official support
              >and
              >NEVER received any suitable answer. I've found other people's quesions
              >regarding
              >this problem and they didn't found an answer either. I can't believe
              >this is not
              >happenning to more people and there is not solution!!!!!!
              >
              >Sometimes (don't know when or why) when we copy our servlets developed
              >with JBuilder
              >(6, 7 or 9) or javac and ant, into our exploded archive directory application,
              >weblogic does not detect the change, and it serves the the servlet's
              >old version.
              >Of course, that servlet is not included in any classpath, and even if
              >we delete
              >the class file, it still executes the old version. We even delete the
              >.wlnotdelete
              >folder under our server, temp, etc. restart the machine, etc. and it
              >does not
              >load the updated servlet.
              >
              >The only solution is to change servlet's name and the reference in our
              >web.xml.
              >That's the moment that weblogic detects changes, but, for so long? Sooner
              >or later,
              >the problem appear again... or not. WHY!!??!! What should we change/delete
              >or
              >whatever for our new servlet to be updated?
              >How can I force weblogic to register again as new servlets ALL my servlets?
              >
              >
              >Now it's even happening to a class used in a very simple tag library.
              >CAN'T BELEIVE
              >IT!!!!
              >
              >It happens in NT 4.0 and W2K Prof. It happened in Weblogic 7.0 sp2 and
              >now in
              >Weblogic 8.1 sp1. It never happened in Weblogic 5.1 sp10.
              >
              >Looking forward to hearing a solution for this.
              

  • ERR: This request does not match the context path for any installed web app

    We are currently using weblogic 6.1 SP6 and facing "Error 404 Page not found" error very oftenly.
              This error is first encounter while uploading file at File folder, although does not happen at every upload, but was quite consistent always at upload file stage. At this moment, this error can occur at any stage, when ever we run any heavy process on the server (like importing large amount of data or pushing the data to different ERP - system by using custom integration. The system works fine after restarting.
              Please help me out to resolve this issue as this very critcal for our production environment.
              ERROR:
              ####<May 12, 2005 4:17:12 PM SGT> <Error> <HTTP> <MatrixTransit> <myserver> <ExecuteThread: '13' for queue: 'default'> <> <> <101147> <HttpServer(7105637,null default ctx,myserver) found no context for "/ematrix/emxLogin.jsp". This request does not match the context path for any installed web applications and there is no default web application configured.>
              ####<May 12, 2005 4:17:15 PM SGT> <Error> <HTTP> <MatrixTransit> <myserver> <ExecuteThread: '13' for queue: 'default'> <> <> <101147> <HttpServer(7105637,null default ctx,myserver) found no context for "/ematrix/emxLogin.jsp". This request does not match the context path for any installed web applications and there is no default web application configured.>
              ####<May 12, 2005 4:17:16 PM SGT> <Error> <HTTP> <MatrixTransit> <myserver> <ExecuteThread: '13' for queue: 'default'> <> <> <101147> <HttpServer(7105637,null default ctx,myserver) found no context for "/ematrix/emxLogin.jsp". This request does not match the context path for any installed web applications and there is no default web application configured.>
              ####<May 12, 2005 4:17:17 PM SGT> <Error> <HTTP> <MatrixTransit> <myserver> <ExecuteThread: '13' for queue: 'default'> <> <> <101147> <HttpServer(7105637,null default ctx,myserver) found no context for "/ematrix/emxLogin.jsp". This request does not match the context path for any installed web applications and there is no default web application configured.>
              ####<May 12, 2005 4:17:18 PM SGT> <Error> <HTTP> <MatrixTransit> <myserver> <ExecuteThread: '13' for queue: 'default'> <> <> <101147> <HttpServer(7105637,null default ctx,myserver) found no context for "/ematrix/emxLogin.jsp". This request does not match the context path for any installed web applications and there is no default web application configured.>
              THANKS
              Rohit

    Rohit
              How did you resolve the issue?
              I am facing the same.
              Thanks
              Amit

  • Hi  I'm try to set up a new Epson printer SX 445 to my router/network but each time I run the set up wizard it fails to complete saying Security Key/Password Check fail.  *entered security key/password does not match the one set for for router.  I know th

    Hi
    On my macbook pro
    I'm try to set up a new Epson printer SX 445 to my router/network but each time I run the set up wizard it fails to complete saying Security Key/Password Check fail.
    *entered security key/password does not match the one set for for router.
    I know that the password is correct and have rechecked this by changing it a few times
    and I still get the same result.
    My network internet service provider is not interested and says to call Epson.
    Anybody have any clues how I can resolve this?
    Regards

    I personally suggest the new Drobo FS. Since it has an iTunes server built in and you can use any size sata hard drive in it it is better and a NAS that has to use the same size drives.

  • My icloud account on my new iphone does not match the user ID for itunes as it is an old apple ID. There is no password for this ID so I cant change it and it wont let me change the apple ID. Any help?

    my icloud account on my new iphone does not match the user ID for itunes as it is an old apple ID. There is no password for this ID so I cant change it and it wont let me change the apple ID. Any help?

    To change to iCloud ID on your phone you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID then sign in with the new ID.  If you don't know the password for the old ID, and if the old ID is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • I have changed my icloud email in my iphone but in macbook still using old email. I tried to delete the old email in macbook but it requires password and it does not accept the old password for the old email anymore. How do I remove this old email?

    I have changed my icloud email in my iphone but in macbook still using old email. I tried to delete the old email in macbook but it requires password and it does not accept the old password for the old email anymore. How do I remove this old email?

    Hello farahani hairon nizar,
    If your Apple ID was changed from your old account, you may have to change it back to your old account to be able to sign out and then change it back after that is done. Take a look at the article below for more information. 
    If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/en-us/HT203828
    Regards,
    -Norm G.  

  • TS1702 The Calendar app that came on my i4S Phone does not sync the correct time for items posted on my Yahoo Calendar.  Actually, they post exactly 4 hours earlier than the correct time on my Yahoo Calendar.  Does anyone have a "fix" to correct the "time

    The Calendar app that came on my i4S Phone does not sync the correct time for items posted on my Yahoo Calendar. Actually, items post exactly 4 hours earlier than the correct time on my Yahoo Calendar.   My i4S is in the correct New York time zone.  Help?

    I posted this question a while ago and didn't receive any responses but there are a lot of people who have viewed it and 10 have said they have the same question so I thought I would update you that I added my nanny to my exchange server account (created an email for her) and I send all invites to that email address and they work.  So sending invites from an exchange server account to a non-exchange server account apparently is a bug so to solve it, get on an exchange server I guess.

  • When I press on a land line number, the phone does not call the number, but comes up with a screen to send a text to it.  How do I get my phone to default to phoneing a landline?

    When I press on a land line number, the phone does not call the number, but comes up with a screen to send a text to it.  How do I get my phone to default to phoneing a landline?  When I press a mobile number in contacts, the phone automatically phones the number.  I do not mind this as I hardly ever send texts, but I would like to have the option of what to do.  This seems such an obvious issue but I can not solve it even with much web searching.  Thanks!

    I can't delete my question, so I'll just say that you press on the type of number written in the box to the left of the box you typye the number into.  Dumb or what? 

  • Does not meet the system requirement for installing BB App World

    I bought a Curve 8520 in Singapore yesterday. When i tried to download App world into this phone, it says "my phone does not meet the system requirement for the software".  does it refer to hardware specification or the BB O/s version on the phone. How can fix it because being able to use App world is one of the purposes that i buy a BB.
    Also, How about MS Live Messenger , facebook ?  Do I need to install them seperately through App World?
    Please help!

    Hi there!
    Please see these links for reference:
    http://na.blackberry.com/eng/services/appworld/download.jsp#tab_tab_system_requirements
    http://www.blackberry.com/app_includes/devicesoftware/appworld/appworld_availability_en.html
    A key component in accessing AppWorld is your carrier -- if they are not delivering it, then you can't get it. If you don't have an adequate plan from them that incudes it, then you can't get it. Hence, if you meet the hardware requirements AND it is available in your country, then you need to contact your carrier to find out how you can get it via their network.
    All that said, AppWorld is merely a storefront, vending apps developed by others...there are many other storefronts available that don't have the same restrictions.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Just got this error message - The installed graphics card does not meet the minimum requirements for Aperture

    Help.  I have an iMAC - not even one year old - just got this message - The installed graphics card does not meet the minimum requirements for Aperture.
    I have not made any changes to my machine. Help  - I can't get to my images

    Try restarting your system.
    If that does not help, we will need to know your Aperture version and MacOS X version. And do you use an external monitor? Then disconnect it before rebooting.

  • Help - just got message "The installed graphics card does not meet the minimum requirements for Aperture"

    Help - just got message "The installed graphics card does not meet the minimum requirements for Aperture"

    Please click Profile Update and follow the directions for updating your profile. Your computer may be too old to support Aperture however without knowing anything about your iMac it's impossible to say. Also there is an Aperture forum to use and you can look at Aperture's System Requirements below to see if you have the minimum.
    System Requirements
    Minimum
    One of the following Intel-based Mac computers:
    Mac Pro
    MacBook Pro
    MacBook
    MacBook Air
    iMac
    Mac mini
    Operating system:
    Mac OS X v10.5.8 or v10.6.2 or later
    Memory:
    1GB of RAM
    2GB of RAM required for Mac Pro
    Other requirements:
    DVD drive for installation
    1GB of disk space for application and documentation
    7GB of disk space for Sample Library

  • This PC does not meet the minimum requirements for this version of iTunes

    Trying to update my iTunes, the installer gives the error message:
    "This PC does not meet the minimum requirements for this version of iTunes"
    I have gone through the procedures listed in the support section, and have completely removed all Apple software, deleted the file folders etc etc.... still no joy.
    This is most annoying as I've just received my brand new iPhone 6+ and I was trying to backup my old device to iTunes so I could restore it onto the new phone and get using it today.  Hacked off big time :-\

    Well I've eventually managed a work-around.  Ver. 11.5.1 was no good because it wasn't compatible with my iphone 5, next one wasn't compatible with my iphone 6+, eventually got 11.4 installed so I could back up my old iphone 5 to it, then restore that backup onto my iphone 6+, which then wasn't up to date with the current iOS so I had to do that before it would sync my apps.
    What a ball ache.
    If someone would kindly let me know when the latest iTunes works again I's appreciate it, until then I'll have to stick with what I've got.
    I need to start again with my music collection, re-import everything and get it on my iphone, because I had to delete it all a few months ago when iOS updated because it didn't have enough storage space on the device!  Somehow lost it all off my iTunes in the process!
    TBH I've always found the Apple system hideously complicated and infuriating when it doesn't work properly.  Instead of making it more and more complex it needs simplifying and making fool-proof so people don't have to go through all this BS just to use their **** phone!

  • Your system does not meet the minimum requirement for this update (9996)

    Hi
    recently had to reformat my system with windows 7 profesional. All windows updates where performed and all the drivers where installed correctly except the ethernet driver. windows 7 cannot find a suitable driver. I then downloaded the driver from the link provided on the hpe-590t download site, which is described as a intel gigabyte driver sp52222, however  the software driver comes up with the following message your system does not meet the minimum requirement for this update (9996). Has anyone had a similar problem.
    Hardware Ids are:
    PCI\VEN_8086&DEV_0000&SUBSYS_00008086&REV_00
    PCI\VEN_8086&DEV_0000&SUBSYS_00008086
    PCI\VEN_8086&DEV_0000&CC_020000
    PCI\VEN_8086&DEV_0000&CC_0200
    Regards artie 

    I solicited the the assistance of another one of our experts who is a driver guru, you may see his reply here:
    http://h30434.www3.hp.com/t5/Desktop-Operating-Systems-Software-Recovery/Paul-Tikkanen/m-p/4990422#M...
    I tend to agree that either the NIC is bad or possiblly a factory restore would help.
    Please mark my post as SOLVED if it has resolved your problem. It helps others with similar situations.

  • Installed graphics card does not meet the minimum requirements for AP...

    2006 MP with an HD 2600 and a 7300 GT card installed, 8 GB RAM, OS 10.4.11. Tried to install Aperture v1 from CD and got the error message "The installed graphics card does not meet the minimum requirements for Aperture" which disallowed upgrading to v1.5.6 because v1 would not install. So I downloaded and installed the v2 trial and got the same error message.
    The release lever on the 7300 card would not work so I left it in slot 1 for now rather than risk breaking the card. That put the HD 2600 card in slot 2, which is not optimum but I do not think it should cause problems.
    23" ACD connected to the HD 2600 card.
    Ideas? I perused the threads and found similar reports but no solutions.
    TIA
    -Allen Wicks

    Answering my own question, I moved the ACD connection to the 7300 card and v2 Aperture installed OK.
    Now I guess I need to get precise details on how to eject the 7300 card (mainly better directions than Apple's as to exactly what direction to force the release lever toward). I applied way more force than I am accustomed to and the card did not release.
    Comments appreciated, TIA.
    -Allen Wicks

  • HT4007 The installed graphics card does not meet the minimum requirements for Aperture.

    The installed graphics card does not meet the minimum requirements for Aperture.  I have not used Aperture in a while and just got this error message.  I tried applying OS updates and reinstalling Aperture and still get the same message.  Does anybody have a solution or work around.

    Are you using a non-standard Graphics Cards?  Then this may be the reason.
    You may also get this error message, if you accidentally booted into "Safe Boot Mode". Then certain extensions of the Graphics card will be disabled and Aperture cannot be launched.
    Reboot and make sure that you this time will boot into regular boot mode.
    See: Mac OS X: What is Safe Boot, Safe Mode?
    If you are indeed running the system in Safe Mode, the question is, what made this happen? Do you use a wireless mouse and keyboard? There is a strange bug that makes Mac OS X boot into Safe mode, if you turn the wireless devices on, while the system is booting. Make sure they are active, before you boot.
    But if you did not boot into Safe Mode, you could try to boot into this mode to reset the graphics card and then boot again into regular mode.
    Merry Christmas!
    Léonie

Maybe you are looking for

  • How can i  get data from anather database system  ????????

    Hi every body.. I 've a problem ..... I've an old program work on "DOS" and it's content database which content all Data that i need for that program The data file extension with ".FD" , ".VW" , ".LSS" & "SLP" I want to kow:- 1) what is that database

  • Which jar file for the classpath ?

    At my office on my machine i have weblogic 8.1 and tomcat installed. weblogic have 2.3 version of servlet and tomcat have 2.4 version of servlet weblogic is for production purpose (development of servlet, jsp and ejb) and tomcat is for my own practic

  • Date Sort inside For Each

    Hi I am trying to date sort inside for each but it is not working i am using below code <?for-each:G_3?><?sort:BEG_DT;'ascending';data-type='text'?>BEG_DT END_DT <?end for-each?> Can any one please let me know how to solve this? Thanks in Advance Hav

  • Upgrade from 3.4 to 4

    Hi, I got the Ligthroom 3.4 Version as a birthday gift in april. How can I get the free upgrade? Can I still get the free Upgrade? I searched everywhere, but I don't know how to contact the customer support. Thanks for your help. Ben

  • Firefox does not load the website when clicking a hyperlink in another program

    I am using Firefox 5.0.1 in Snow Leopard 10.6.8. When I click on a hyperlink in another program, Firefox launch but show me a blank page, instead of the web page of that hyperlink. This only happen if Firefox is not launched prior to clicking the hyp