4 Replies Latest reply on Aug 14, 2002 12:42 PM by tbfmicke

    ds

    a13519

      I tried to setup a datasource for my mySql server. Everything looks OK in the Jboss server console, but when I use a test client to lookup my datasource, there is a exception of time out.

      Version: WINDOWS2000SP2 + JBoss 3.0 + MySql + JDBC driver mm.mysql.jdbc-1.2c

      SETUP Datasource:
      I just simply modify exsit samply file mysql-service to match my system situation. I changed connnection URL. Then I copy this file to %JBOSS_DIST%\server\default\deploy. I can clearly see that the console print out :
      --------------------------------------------------------
      17:42:17,640 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=MySqlDS
      does not implement any Service methods
      17:42:17,640 INFO [LocalTxConnectionManager] Creating
      17:42:17,796 INFO [LocalTxConnectionManager] Created
      17:42:18,000 INFO [LocalTxConnectionManager] Starting
      17:42:18,781 INFO [MySqlDS] Bound connection factory for resource adapter 'JBos
      s LocalTransaction JDBC Wrapper' to JNDI name 'java:/MySqlDS'
      17:42:18,781 INFO [LocalTxConnectionManager] Started
      --------------------------------------------------------

      Client looks up:

      I write a very very simply client to run to check if I could find this datasource:
      --------------------------------------------------------
      import javax.naming.InitialContext;

      /**
      * This is a simple client for the "CD" EJB; it lists (to standard output) all
      * the "CD" instances in the system. The "main" method allows this class to be
      * run from the command line.
      */
      public class JTest
      {

      public static void main(String[] args)
      {
      try
      {
      InitialContext jndiContext = new InitialContext();

      Object ref = jndiContext.lookup("java:/MySqlDS");
      System.out.println(ref);
      }
      catch(Exception e)
      {
      System.out.println(e.toString());
      }
      }

      }
      --------------------------------------------------------

      I got a exception in running:
      javax.naming.CommunicationException: Receive timed out [Root exception is java.n
      et.SocketTimeoutException: Receive timed out]

      Although I want to make sure my client has no problem, I tried to lookup queue/DLQ, it's OK, I can find it.

      Where is wrong? Any suggestions are welcome and I am appreciated that.

      Thanks,
      a13519

        • 1. Re: ds
          ecowalker

          > 17:42:17,640 WARN [ServiceController]
          > jboss.jca:service=LocalTxDS,name=MySqlDS
          > does not implement any Service methods
          This warning are not related to the problem anyway.

          The problem is the bounded JDNI name is in the java NameSpace (Which cannot lookup outside VM) instead of Global Namespace(As its name implies). You might take a look on the management conosle
          http://localhost:8082/
          Click on the link "service=JNDIView" and click the "list" button of the "Description of List"

          Pls correct me if I am wrong.

          Rgds,
          ecowalker

          • 2. Re: ds
            sselena911

            Hi,

            I am having the same exact problem. How do you solve it?

            Thank you
            Elana

            • 3. Re: ds
              joelvogt

              Do you have a jndi.properties for your client? If not you will have to configure the initialcontext a bit more so it can pick up the datasource correctly

              • 4. Re: ds
                tbfmicke


                A way to handle this is to make the test client a servlet. That will run inside jboss and can find things
                in the java: namespace.

                Regards