1 Reply Latest reply on May 22, 2008 8:37 AM by jaikiran

    I am getting error message when calling the Data Source

    bhupeshj

      Posted: Wed May 21, 2008 17:44 PM Post subject: Error while getting data source connection

      --------------------------------------------------------------------------------

      I am getting error message when calling the Data Source

      Config file:

      <local-tx-datasource>
      <jndi-name>SQLServerDS</jndi-name>
      <connection-url>dbc:jtds:sqlserver://192.168.3.202:1433</connection-url>
      <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
      <user-name>qwe</user-name>
      1278
      </local-tx-datasource>


      Client code :


      InitialContext ctx = new InitialContext();
      DataSource ds = (DataSource)ctx.lookup("java:/SQLServerDS");


      JNDI:
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      And I am getting following error Message.

      avax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1465)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1594)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)

      Plz help me with the solution