2 Replies Latest reply on Feb 4, 2008 1:14 AM by Yong Heo

    IP binding problem

    Yong Heo Newbie

      Hi, I have a problem with binding data source.
      Can anyone help me?

      I have a web application which runs on JBoss with postgresql database server.
      It works fine when I run the JBoss with localhost.
      Then, I started jboss application server with IP binding option.
      run.sh -b
      And when it try to connect to database, it gave me below errors.

      Unable to locate data source; Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]

      I don't see above problem when I start JBoss without IP binding option.
      Does anyone know why? And how to solve the problem?
      Thanks in advance.

        • 1. Re: IP binding problem
          jaikiran pai Master

          Post the entire exception stacktrace. When does this exception occur? Does it happen when you are doing a lookup of the datasource and trying to obtain a connection from it? If yes, then have you specified the PROVIDER_URL as to the InitialContext (since the services are longer binded to localhost):

          Properties props = new Properties();
          props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
          Context ctx = new InitialContext(props);

          • 2. Re: IP binding problem
            Yong Heo Newbie

            Wow, jaikiran

            Thanks alot. Yeah, you are right. I have to modify the Context part.
            Quick reply solves the problem in short time.
            Thank you very much.