4 Replies Latest reply on May 31, 2007 9:25 PM by jaikiran

    data source problem in 4.0.3SP1

    dclemmer

      I've set up a datasource via a -ds.xml file. When the application starts, that source shows up as being bound correctly to java:FeedConn (I specified FeedConn in the xml file). When the application attempts to connect to that, however, if I search for java:FeedConn (or java:/FeedConn), it fails to find the datasource. What's very odd, however, is that if I search for just FeedConn, I get a javax.naming.CommunicationException (Receive timed out). Does it connect to a different default location when not using the java namespace (presumably one that jboss doesn't provide by default)? And does anyone have any reason why the name doesn't get found when using that namespace? (FWIW, the initial context is created without arguments).

      Thanks,

      Dave

        • 1. Re: data source problem in 4.0.3SP1
          dclemmer

          just wanted to mention that I also tried by setting <use-java-context> to false, and that made no difference. Also, per a suggestion in another thread, I tried binding to java:/FeedConn (in the -ds.xml), and searching for "java:comp/env/jdbc/FeedConn", but that failed to even bind the resource.

          • 2. Re: data source problem in 4.0.3SP1
            jaikiran

            Could you post the exception stacktrace that you are seeing

            • 3. Re: data source problem in 4.0.3SP1
              dclemmer

              I stripped out the stuff that relates strictly to our code; these are the cause of our application exception.

              Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
               at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
               at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1431)
               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
               at javax.naming.InitialContext.lookup(InitialContext.java:351)
               at com.saic.workflow.feed.JndiJdbcConnectionFactory.createConnection(JndiJdbcConnectionFactory.java:69)
               ... 20 more
              Caused by: java.net.SocketTimeoutException: Receive timed out
               at java.net.PlainDatagramSocketImpl.receive0(Native Method)
               at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
               at java.net.DatagramSocket.receive(DatagramSocket.java:712)
               at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)
               ... 25 more
              


              Thanks.

              • 4. Re: data source problem in 4.0.3SP1
                jaikiran

                 

                Receive timed out [Root exception is java.net.Socket
                TimeoutException: Receive timed out]


                In your code, while doing the lookup, are you passing any properties to the InitialContext constructor. I would be interested especially the Context.PROVIDER_URL property. By default, this property has a value jnp://localhost:1099 unless you explicitly specify some other value.