Web Service Client, BindException, Address already in use, saaj.SOAPExcepti

Hello,
Am caught up with an error and i can't get past it, need some help here.
My application is a batch processing web service client, reads some input rows, sends web service requets, processes the responses and logs it.
The application runs well in normal mode, but under load(more thread count), I get this wierd error and I can't make it go away.
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
I have properly closed the connections after each web service calls, but it still says Address in use. Please refer below for the complete stack trace and a piece of the code. Am using SAAJ and JWSDP and am not using AXIS api. I have searched the web but couldn't find any solutions.
This is not an error that server is not closing connections properly as I was able to test with SOAPUI and LoadRunner with even higher threads and it ran without problems. SOAPUI and LoadRunner scripts were executed from the same client machine as my application uses. Please help.
For each inputrow
SOAPConnection connection = null;
try
SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
connection = soapConnFactory.createConnection();
SOAPMessage request = getRequest(inputRow);
SOAPMessage response = connection.call(request, "http://<<server>>:<<port no>>/Domain/Services/Mgmt");
finally
if (connection != null)
connection.close();                         
}catch(SOAPException se){
System.out.println("Error while closing connection. " + se.getMessage());
connection = null;
} // End of for loop
Stack Trace:
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
nImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:121)
at ClientImpl.getResponse(ClientImpl.java:440)
at input.InputSampler$MyCallable.call(Sampler.java:63)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:325)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:150)
... 12 more
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
ce)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown S
ource)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:282)
Is there something like connection pooling for web services, is that the answer to this issue, if yes, please let me know where i should start.
Thanks
Dev

Move server socket creation out of while loop. You don't need to create new server socket every time.

Similar Messages

  • "BindException: Address already in use" error all the time!

    I made a simple program that streams lines of text across the network/internet and a simple client program to display that text. The problem is, regardless of what port I choose, I always get this exception on the server's side:
    C:\Users\Nathan\Desktop>java LyricalUploader
    Started Listening
    Bound
    Started Listening
    Starting.java.net.BindException: Address already in use: JVM_Bind
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
            at java.net.ServerSocket.bind(ServerSocket.java:319)
            at java.net.ServerSocket.<init>(ServerSocket.java:185)
            at java.net.ServerSocket.<init>(ServerSocket.java:97)
            at LyricalUploader.main(LyricalUploader.java:11)What bothers me is it creates the ServerSocket just fine (that's what the output saying "Bound" means) and if I replace the new LyricalThread(ss.accept()).start(); line in the code below with new LyricalThread(ss.accept()).run();, it works fine, It just can't handle more than one client. I have tried many many ports and they all have the same result. What am I doing wrong?
    Here is the code:
    import java.net.*;
    import java.io.*;
    import javax.swing.JFileChooser;
    public class LyricalUploader{
    public static void main(String args[]){
      ServerSocket ss = null;
      int c=0;
      try{
        while(true){
          System.out.println("Started Listening");
          ss = new ServerSocket(49625);
          System.out.println("Bound");
          new LyricalThread(ss.accept()).start();
      catch(Exception e){
        e.printStackTrace();
        System.exit(1);
    import java.net.*;
    import java.io.*;
    public class LyricalThread extends Thread{
      Socket s = null;
      public LyricalThread(Socket so){
        s=so;
      public void run(){
        try{
          System.out.print("Starting.");
          PrintWriter out = new PrintWriter(s.getOutputStream());
          BufferedReader fin =new BufferedReader(new FileReader("Lyrics.txt"));
          System.out.print(".");
          String line = fin.readLine();
          System.out.println(".Done!");
          while(true){
            while(line!=null){
              out.println(line);
              //System.out.println(line);
              line=fin.readLine();
              Thread.sleep(1600);
            fin.close();
            System.out.println("End of Lyrics.txt file.");
            fin =new BufferedReader(new FileReader("Lyrics.txt"));
        catch(Exception e){
          e.printStackTrace();
          return;
      public static void main(String arg[]){
        new LyricalThread(null).start();
    }And the Client code:
    import java.net.*;
    import java.io.*;
    import javax.swing.JFileChooser;
    public class LyricalReader{
      public static void main(String args[]) throws Exception{
        Socket s = null;
        BufferedReader sin = null;
        FileOutputStream out = null;
        try{
          System.out.println("Started");
          System.out.print("Connecting...");
          s = new Socket("2.9.19.94",49625);
          System.out.println("Done!");
          System.out.print("Finding song...");
          sin = new BufferedReader(new InputStreamReader(s.getInputStream()));
          String line = sin.readLine();
          System.out.println("Done!\nStarted reading:\n\n\n\n\n\n");
          while(true){
            System.out.println(line);
            line = sin.readLine();
        }catch(Exception e){
          e.printStackTrace();
          sin.close();
          s.close();
          out.close();
        System.exit(0);
    }

    Hi,
    your Server must create only one ServerSocket, not multiples! So write
      try{
        ss = new ServerSocket(49625);
        System.out.println("Bound");
        while(true){
          System.out.println("Started Listening");
          new LyricalThread(ss.accept()).start();
      catch(Exception e){
        e.printStackTrace();
        System.exit(1);
      }and take the creation of the ServerSocket outside the while-loop.
    Martin

  • Problem creating web service client using WSM Policies

    Hello everyone,
    I'm trying to make a simple java client to a Web Service secured using a WSM 11gR1 policy (from Soa Suite 11.1.1.2.0). The policy on the server side is oracle/wss11_x509_token_with_message_protection_service_policy which I attached via the Weblogic Admin Console. To implement the client I'm trying to follow the instructions from this documentation: http://download.oracle.com/docs/cd/E15523_01/web.1111/e13713/owsm_appendix.htm#WSSOV386 section "Policy Configuration Overrides for the Web Service Client" and also I'm using OEPE 11.1.1.3.0 (Eclipse 3.5.0) to develop the client. The only weblogic jar I've added to the build path is the weblogic.jar . Unfortunately, the oracle.wsm.security.util.SecurityConstants.ClientConstants interface (used in the example A-6) is not included in this jar and I have no idea what other libraries should I include in order to follow the example. I tried manualy adding other jars but without success. In fact I found one jar which includes this interface, the wsm-secpol.jar but it does not have the properties described in the documentation, so I guess it's not the right jar, and also I don't think this is the right procedure since there might be another dependent jars. So I would like to know what libraries exactly I should add to the build path (or some other procedure if you noticed I'm doing anything wrong)
    Thank you !

    Hi
    I am having the same problem almost where i wrote a client to comsume a JWS server in https. Where the server is setup to require a certificate to connect to.
    My code:
    public static void main(String[] args) {
    try {
    DataBaseSyncServerImpl port = new DataBaseSyncServerImplService().getDataBaseSyncServerImplPort();
    int number1 = 20;
    int number2 = 10;
    System.out.printf("Invoking divide method(%d, %d)\n", number1, number2);
    double result = port.divide(number1, number2);
    System.out.printf("The result of dividing %d and %d is %f.\n\n", number1, number2, result);
    when run this code throw
    run:
    [java] Invoking divide method(20, 10)
    [java] Exception in thread "main" javax.xml.ws.WebServiceException: HTTP transport error: javax.net.ssl.SSLHandshak
    eException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCert
    PathBuilderException: unable to find valid certification path to requested target
    Does any one know how can I solve this problem or how can I make the client be able to use self signed certificates. Any help is greatly apprecited. Thanks

  • Address already in use: connect

    Dear all,I've got always this following exception, if I get three times the method getDimensionTree. This method simply reads one dimension tree in Essbaseand constructs a DataTreeModel (like JTree) with the member names.The source is like a sample code from Hyperion, but whyever it is crashing using the EES 6.5 with Essbase 6.5.3.I believe, that the connections aren't removed. But however the getConnections-iterator is always returning null. And I debug the logsbefore and after a connect and disconnect, to be sure everything is closed.I tried this with Essbase 7.0 and EDS 7.0 and it works perfect, but I am not allowed to use the version 7 because of other tools combination. There I am using the m_olapServer.connect(true, false), whichis not available at the 6.5 JAPI. Therefore there is apublic void connect(boolean useEesSvrAtOlapSvrNode) throws EssException with useEesSvrAtOlapSvrNode - If true, the enterprise server at the node where this olap server resides is used to traffic the requests between the JAPI client and the olap server. If false, the enterprise server that authenticated the user is used to traffic the requests.but I cannot understand the sense of the parameter flag. But I think that this doesn't matter.22:03:15,171 ERROR [EssbaseQuery] com.essbase.api.base.EssException: Cannot connect to enterprise server. Address already in use: connectcom.essbase.api.base.EssException: Cannot connect to enterprise server. Address already in use: connect at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:177) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.invokeMethod(EssOrbPluginTcpip.java:79) at com.essbase.api.session.EssOrbPluginTcpip.invokeMethod(EssOrbPluginTcpip.java:68) at com.essbase.api.session.EssOrbPlugin.getChildMemberNames(EssOrbPlugin.java:454) at com.essbase.api.base.EssCollection.getMembers(EssCollection.java:201) at com.essbase.api.base.EssCollection.<init>(EssCollection.java:59) at com.essbase.api.metadata.EssMember.getChildMembers(EssMember.java:871) at de.ebcot.bsctool.dw.essbase.EssbaseQuery.traverseDimension(EssbaseQuery.java:206)     public DataTreeModel getDimensionTree() throws DWException {          m_olapServer = (IEssOlapServer) m_domain.getOlapServer(m_config.getProperty(NamesEssbase.KEY_OLAP_SERVER_NAME));          // Open connection with olap server          m_olapServer.connect(true);          m_olapServer.setClientCachingEnabled(true);          m_olapServer.updatePropertyValues();        DataTreeModel   returnValue = null;        IEssCubeOutline cubeOutline = null;        try        {            cubeOutline = m_olapServer.getApplication(config.getProperty(NamesEssbase.KEY_APPLICATION_NAME)).getCube(config.getProperty(                    NamesEssbase.KEY_DATABASE_NAME)).openOutline();            IEssIterator  dims           = cubeOutline.getDimensions();            IEssDimension foundDimension = (IEssDimension) dims.getAt(0);            Node root = new Node(foundDimension.getDimensionRootMember().getName());            traverseDimension(root, foundDimension.getDimensionRootMember());            returnValue = new DataTreeModel(root);        } catch (EssException x) {            LOG.error(x, x);            throw new DWException("Failure while reading dimension members from cube: " + x.getMessage());        } finally {            try            {                if (cubeOutline.isOpen())                {                    LOG.debug("Closing cube...");                    cubeOutline.close();                    LOG.debug("Cube closed.");                } } catch (EssException x) {                LOG.error(x, x);                throw new DWException("Cannot close the cube: " + x.getMessage());            } } return returnValue; } // recursivley traverse of the tree to get every node private void traverseDimension(Node node, IEssMember mbr) throws EssException {           IEssIterator mbrs = mbr.getChildMembers(false);           for (int i = 0; i < mbrs.getCount(); i++)           {               NodeCombination child = new NodeCombination(((IEssMember) mbrs.getAt(i)).getName());               node.addNode(child);               traverseDimension(child, (IEssMember) mbrs.getAt(i));           } }Kind regards,Oliver Wolff

    We are seeing a similar exception, after not many calls:
    {http://xml.apache.org/axis/}stackTrace:java.net.BindException: Address already in use: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:391)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:252)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:239)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385)
    at java.net.Socket.connect(Socket.java:543)
    at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
    at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)

  • Problems running Application with Web Service Client

    Im having some problems maybe related to some classpath details?
    I am running a Web Service another computer which works fine. I have also made an application using Sun ONE Studio 1 consisting of a Web Service Client etc. and GUI which uses the Client to get data from the Web Service. This works fine as long as I use Sun ONE Studio to execute the application, but now I have packaged the application to a .jar file and have encountered problems:
    When running the application from the .jar file I get the exception:
    java.lang.NoClassDefFoundError: com/sun/xml/rpc/client/BasicService
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at util.servicelocator.ServiceLocator.getServant(ServiceLocator.java:68)
    at lagerApp.eHandelLager.jRegisterBrukerListeActionPerformed(eHandelLager.java:784)
    at lagerApp.eHandelLager.access$400(eHandelLager.java:20)
    at lagerApp.eHandelLager$5.actionPerformed(eHandelLager.java:277)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
    at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    I have searched the forum and found simular topics which are resolved by adding some lines to the classpath.
    How do I set the classpath? Do i have to use the classpath parameter from command window? How can I know which classpaths to include (libraries)..
    Any help would be nice.. : )

    Thank you for the reply..
    But im still geting the same error. I have tried to include all the libraries in JWSDP pack but still.. I have managed to narrow down the place where the error occures.. It actually happens when I try to get the WebService Client Servant which is located in the package LSC:
    ---> LSC.LWServiceGenClient.LWS_Impl service = new LSC.LWServiceGenClient.LWS_Impl();
    LSC.LWServiceGenClient.LWSServantInterface lagerServiceServant = LSC.LWServiceGenClient.LWSServantInterface_Stub)service.getLWSServantInterfacePort();
    return lagerServiceServant;
    Could something be wrong with the way I package the Jar? I'm using Sun One Studio and have tried including the 5 packages the application consists of; I have tried including just the files; moving the main class to <root>.. Still same problem..
    Or could there be some different fundemental thingy I have forgotten ??
    thanks
    Aqoi

  • Address already in use

    Hi Guys!
    I'm using Oracle9ias 9.0.3. When I execute
    $opmnctl startall, I get the next error in all instances (<instance>.default_island.1):
    java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    I have 3 instances, each one with different port rmi, configured in opmn.xml.
    I used -Drmi.debug=true -Drmi.verbose=true in java-options and I got in the log:
    RMIServer.DEBUG: using OPMN, address is ZERO_ADDRESS, use local address instead
    RMIServer.DEBUG: creating RMIServer ServerSocket for address: antares.txp/127.0.0.1 port: 3114
    RMIServer.DEBUG: Launching RMIServer thread
    RMIServer.DEBUG: creating RMIServer ServerSocket for local address: antares.txp/127.0.0.1 port: 3114
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447)
    at java.net.ServerSocket.<init>
    Any idea??
    Thanks!
    Carlos Guerra

    Try to use netstat -an to see if there is anything listening on this port (you should see "LISTEN" on far right on line). There is no process id or whatever, you just know there is a server socket open - might be a different program, might be a running instance incorrectly shuted down...
    On the left there is a local address, on right there is a remote address (might be a connection from the same host, of course)
    If there is nothing running before starting server, there is probably a port mismatch in your settings (i. e. rmi port for next started instance is the same as jms or http port of prevous one... I don't know about all of the ports settings.
    Sometimes, especially on Windows there is a situation when server socket is not correctly closed and you have to restart Windows itself.
    Myrra

  • Addresse already in use

    Hi Folks,
    I am getting following exception when redeploying my server socket code.
    java.net.bindexception.address already in use.
    I know above error is bcos of port.
    but i am trying to close in finally block.
    when i do some other changes and try to redeploy it is throwing above exception.
    when i restart server i dont have this problem.
    how and where to unbind a serversocket port ,b4 i redploy my changed code.
    i thank u guys in advance.

    output.close();
    input.close();
    socket.close();
    dispose();
    after calling these methods u will not get the exception.
    check that the port which your using is not used by any other service

  • Failed to join cluster - Address already in use

    Hi there,
              I'm trying to set up a cluster with WLS 7.0 on Linux (kernel 2.4.20). Apparently, the OS is configured correctly: the kernel is compiled with multicast support and multicast routes have been appropriately defined.
              The admin server starts correctly, and managed servers running on other OSs successfully join the cluster. However, when a I try to run a managed server on this linux, I get the following error:
              <Apr 29, 2003 12:27:52 AM CEST> <Error> <Cluster> <000116> <Failed to join cluster testcluster at address 237.0.0.1 due to : java.net.BindException: Address already in use
              java.net.BindException: Address already in use
              at java.net.PlainDatagramSocketImpl.bind(Native Method)
              at java.net.MulticastSocket.create(MulticastSocket.java:123)
              at java.net.DatagramSocket.<init>(DatagramSocket.java:135)
              at java.net.DatagramSocket.<init>(DatagramSocket.java:107)
              at java.net.MulticastSocket.<init>(MulticastSocket.java:99)
              at weblogic.cluster.FragmentSocket.initializeMulticastSocket(FragmentSocket.java:87)
              at weblogic.cluster.FragmentSocket.start(FragmentSocket.java:110)
              at weblogic.cluster.MulticastManager.startListening(MulticastManager.java:140)
              at weblogic.cluster.ClusterCommunicationService.initialize(ClusterCommunicationService.java:51)
              at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:773)
              at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
              at weblogic.Server.main(Server.java:32)
              >
              I have tried to change the multicast address but the error persists.
              Am I missing something? Any help would be muchly appreciated.
              

    have you checked to see what is running before you start your oracle app server on your ports? you can use netstat for one

  • Problem Address already in use: JVM_Bind with HSQLDB

    hi im using NetBeans5.0 and hsqldb1.8 with jdk1.4. after starting the database server frm code when my application launches and try to acess database it gives me error below. i tried using command "netstat" so that i can findout the alreasy used port and make it free for my application. but port im usiing oening port-8084 and shutdown port 9081, both are free. but still m getting this error.
    [Server@1a9876e]: [Thread[HSQLDB Server @1a9876e,5,main]]: run()/openServerSocket():
    java.net.BindException: Address already in use: JVM_Bind
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
            at java.net.ServerSocket.bind(ServerSocket.java:318)
            at java.net.ServerSocket.<init>(ServerSocket.java:185)
            at java.net.ServerSocket.<init>(ServerSocket.java:97)
            at org.hsqldb.HsqlSocketFactory.createServerSocket(Unknown Source)
            at org.hsqldb.Server.openServerSocket(Unknown Source)
            at org.hsqldb.Server.run(Unknown Source)
            at org.hsqldb.Server.access$000(Unknown Source)
            at org.hsqldb.Server$ServerThread.run(Unknown Source)Cananyone help me in this problem.

    sunlover1984 wrote:
    Sorry, to use such short forms in forums as i dont know much about this. i rarly use java forum. well, i removed the code that i gave u for server starting. but still it is giving me the same error. this time i put it in a java bean file.(Hint "u" is just another short form).
    Did you try the suggestion to put a log statement just before you start the server? Or put a breakpoint at that line and see how often it is reached.
    Because the only reason for this problem is that something is already listening at that port.
    And if there's really nothing listening before you start you application, then only your application itself can listen there already, so the logical conclusion for me would be that you're starting the Server twice.

  • XML Parser Error while creating Web service Client using JAX RPC

    hello evryone,
    Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
    wscompile -gen:client -d build -classpath build config-wsdl.xml
    here im getting Error:
    error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
    Please help me out.
    Many thanks in advance,
    Kacee

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

  • Oracle Database Web Service Client using UTL_DBWS :: ORA-29532 Error

    Hi,
    I have the Oracle Database 10.2.0.1.0 :-
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionI have written a simple Web Services Client using the classes gfrom the UTL_DBWS package. I loaded the JAR file dbwsclient.jar in the SYS Schema and I am trying to use it in the USF Schema.
    However, I have hit this error & I ma unable to proceed :-
    SQL>  select get_stock_price from dual;
    select get_stock_price from dual
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IllegalAccessException: javax.xml.rpc.ServiceException:
    java.security.AccessControlException: the Permission
    (java.lang.RuntimePermission getClassLoader) has not been granted to USF. The
    PL/SQL to grant this is dbms_java.grant_permission( 'USF',
    'SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
    ORA-06512: at "USF.UTL_DBWS", line 193
    ORA-06512: at "USF.UTL_DBWS", line 190
    ORA-06512: at "USF.GET_STOCK_PRICE", line 17Can you please help me with this ?
    Regards,
    Sandeep

    Hi,
    The error message said
    the Permission(java.lang.RuntimePermission getClassLoader) has not been granted to USF.
    I'd follow the suggestion
    The PL/SQL to grant this is dbms_java.grant_permission( 'USF','SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
    In case you have not done so, consult the Callout Users Guide @
    http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    Kuassi http://db360.blogspot.com

  • NoClassdefFound Problem using EJB as web service client

    Hello there, I am trying to use a MDB as a web service client. The architecture,
    briefly is in the form of a java program communicating with a MDB via JMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilder to generate
    the client side classes choosing the Axis framework. When my MDB is trying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient. java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalone java
    program(no weblogic ). I tried putting the Axis.jar file as well as the relevant
    files from this jar file(JBuilder's feature) in the EJB module that is deployed,
    of no avail. Following is the classloader printed from the EJB's onMessage method
    if needed for better understanding
    weblogic.utils.classloaders.GenericClassLoader@afdd3a finder: weblogic.utils.cla
    ssloaders.MultiClassFinder@20d7479 annotation: SecurityEJBModule@
    Any help will be appreciated

    Slava, I did exactly that and it worked! I wish I had seen your reply before.
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    >
    "Santosh" <[email protected]> wrote in message news:405074c7$[email protected]..
    Hello there, I am trying to use a MDB as a web service client. Thearchitecture,
    briefly is in the form of a java program communicating with a MDB viaJMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilderto generate
    the client side classes choosing the Axis framework. When my MDB istrying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient.java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalonejava
    program(no weblogic ). I tried putting the Axis.jar file as well asthe relevant
    files from this jar file(JBuilder's feature) in the EJB module thatis deployed,
    of no avail. Following is the classloader printed from the EJB's onMessagemethod
    if needed for better understandingYou need to package all Axis jars and dependancoes into the EAR and
    refer tham
    in your ejb-jar MANIFEST.MF. If you are running weblogic 8.1, you may
    just put them
    into APP-INF/lib. Than you won't need to modify manifest.
    Hope this helps.
    Regards,
    Slava Imeshev

  • Problem using WSDL from SAP in IBM's RAD for generating web service client

    When importing a WSDL from the ABAP stack on a SAP 6.40 system into IBM's RAD tool for generating a web service client there are errors with the soap fault classes that get generated.  The WSDL declares the types for the faults with WebServiceName.RfcException and these have elements of name, text, and message.  When the tools see this in the WSDL they generate classes that extend the Java exeception class and this causes an error because the "message" name conflicts with the standard java exception message.  Has anyone else ran into this problem?  It seems like a basic problem many java tools for generating web service client proxies would have because the soap faults get turned into java exceptions.  This name conflict of the java exception with the WSDL fault definition means that code always needs to be adjusted and cannot simply use the classes that are generated from the WSDL.  Anyone run across this or a similar problem in the java environment using the SAP WSDL?
    Aaron

    Hi,
    Hello again .
    Have you tried your service using soapui ?
    You can use your WSDL as input .
    In order to eliminate eclipse problem try this service:(I just did)
    http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL
    Regards.
    package main;
    import java.io.FileInputStream;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import org.oorsprong.www.websamples_countryinfo.CountryInfoServiceSoapType;
    import org.oorsprong.www.websamples_countryinfo.CountryInfoServiceSoapTypeProxy;
    import org.oorsprong.www.websamples_countryinfo.TCountryCodeAndName;
    public class Main {
    public static void main(String[] args) {
      try {
       final Properties properties = new Properties();
       properties.load(new FileInputStream("properties.ini"));
       System.getProperties().putAll(properties);
      } catch (final Exception exception) {
       exception.printStackTrace();
      new Main();
    public Main() {
      try {
       final CountryInfoServiceSoapType infoServiceSoapType = new CountryInfoServiceSoapTypeProxy();
       final TCountryCodeAndName[] tCountryCodeAndNames = infoServiceSoapType.listOfCountryNamesByName();
       for (final TCountryCodeAndName tCountryCodeAndName : tCountryCodeAndNames) {
        System.out.println(tCountryCodeAndName.getSName());
      } catch (final RemoteException exception) {
       exception.printStackTrace();

  • Issue with creating Web Service Client using Oracle JDeveloper

    Hi All,
    I am trying to create a Web Service Client using Oracle JDeveloper. I set the Project compiler property to JRE 1.4
    When I run the web service client, it throws me bunch of errors saying:
    'Error(32,2): annotations are not supported in -source 1.4'
    I am wondering why JDeveloper is using annotations even after I set the compiler property to 1.4
    I am following this link to create the webservice client:
    http://www.oracle.com/technetwork/developer-tools/forms/webservices-forms-11g-094111.html
    Any help in this regard would be greatly appreciated.
    Thanks,
    Scott.

    Dear Shay,
    Thanks for your prompt response.
    You are right. JDeveloper 11g uses JDK 6 style annotations for the clients it creates. But you can change the JRE Version used at compile time by following these steps:
    1. In the Applications Navigator, right-click the Project Nanem node and select Project Properties... from the context menu.
    2. Select the Compiler node and check the Source Files and Generated Class Files dropdown lists. You may change these versions depending on the version of the JRE you are using with Forms to ensure that the compiled
    classes from JDeveloper can be read by the JRE used by Form.
    So I selected JDK version 1.4 there.
    Sorry that I did not mention that we are using Oracle Forms 10g. That is the reason I selected JDK 1.4
    Thank you.
    Scott.

  • What web service client library to use?

    I am creating a standalone Java application (NOT a web server), which will be a client to a remote server via SOAP web services. I need this to run in Java 1.4, and I need to keep the app small (hopefully <1 megabyte). Axis is too big - it's around 5-8 megs with all the dependencies.
    Isn't there some simple way to do this with just the classes built into the JDK? If not, then 1) why not? and 2) what third party lib can I use without bloating the size of my application?

    You were right and I was wrong on the size of Axis - it is 2.2 megabytes for version 1.4. I should have checked more carefully before posting. OTOH, it's 15.5 MB for version 2.
    Neither one is suitable for my purposes, however. My code is around 200K and is downloaded in a browser: it seems really lame to increase that by an order of magnitude just so that I can access a web service.
    I'm working on BCScomputer's tip of using JWSDP; 100K for client jars would be OK with me.
    .Net, Cocoa, and AppleScript all have very easy-to-use built-in support for client access to SOAP Web Services. I'm somewhat surprised that it's this much work to create web service clients in Java; for all the hype surrounding Java and Web Services, this should be build into the JRE. It seems really silly to me that I'm downloading and expanding this 60 meg monster (JWSDP) to do the same thing as 3 lines of AppleScript.

Maybe you are looking for

  • Billing document to COPA partially

    I would like to make some billing documents generating FI and COPA document, and some would generate FI document only. Does anyone know 1) Is it possible in SAP by seperate different billing type or etc. 2) how does SAP determinate to generate COPA d

  • Problems with the CD/DVD drive on my presario CQ50-108NR

    Hey there. I picked up the above listed laptop a short time ago, and I have discovered a problem that I can't seem to solve. The CD/DVD drive reads and plays movies well enough, but it will not read CD's; any CD, be it data, music, images, whathaveyo

  • How to transfer file from PC to mobile using Avetana SDK

    Hello, I am programming in the J2SE environment and using Avetana bluetooth SDK which implements JSR-82. I have the Microsoft Bluetooth Stack. I can connect to my mobile using the following code but I don't know how to send a file. This code sends so

  • Photo booth is not working properly,

    when i first started up it the video moves really slow, then it just freezes on a certain fixed image.. or it just opens with a black screen not even showing any type of video

  • How to get yahoo as e mail server in windows 7 on Compaq Presario CQ57

    Just bought this laptop and added firefox as browser. always had yahoo as e mail service on other computers with no problem. I can recieve e mail but cannot send any on this one or a desktop with ubuntu as oper.system. It seems as windows will not al