6 Replies Latest reply on Oct 8, 2003 9:06 AM by anu

    NameNotFoundException: MySqlDS not bound

    anu

      I've recently added a MySQL datasoure, but am having trouble accessing it from a local JNDI client.
      Server seems to be ok, as it shows up in the run scripts.

      Can anyone help?

        • 1. Re: NameNotFoundException: MySqlDS not bound
          frito

          Answered many time, please, read the forum before posting.
          You can't access a jboss datasource outside the jboss vm. It wouldn't make much sense, either (IMHO). You should write some beans doing the work. This is why application servers were invented (thin clients, n-tier, ...).

          Greetings,
          Frito

          • 2. Re: NameNotFoundException: MySqlDS not bound
            anu

            I know that!! It's purely for testing purposes.
            So you are saying that I can't use a "local" JNDI client to access the DataSource; even though the "local" client resides within the same VM?

            • 3. Re: NameNotFoundException: MySqlDS not bound
              frito

              How do you accomplish this?
              There is no problem if your "client" is an mbean or ejb or something else deployed in jboss.

              But ok, once again: if the datasource is correctly deployed (server.log), use the jndi view in your jmx-console (http://localhost:8080/jmx-console). You can see everything registered with jndi there (witch its scope). The datasource resides withing the java: scope.
              If you are missing something, check your deployment.

              Greetings,
              Frito

              • 4. Re: NameNotFoundException: MySqlDS not bound
                anu

                Hi again,

                I've checked the jmx-console and it all seems ok. I'm using the correct name scope e.g. java:/MySqlDS
                But surely a client residing on the same machine, i.e. using the same VM, should be able to access the DataSource.

                • 5. Re: NameNotFoundException: MySqlDS not bound
                  frito

                  Nope.
                  You can start many virtual machines on one machine, in fact every java call starts one vm.
                  You can access the java: namespace from within the jboss vm (e.g. everything inside jboss or deployed into jboss), but not from outside, even if it is running on the same physical machine.

                  Greetings,
                  Frito

                  • 6. Re: NameNotFoundException: MySqlDS not bound
                    anu

                    Brilliant, thanks for that. I'll write a quick web service or bean to check it out.