5 Replies Latest reply on Jul 18, 2002 9:33 PM by rschiavi

    DB2 config problem

    subsstuff

      Hi all,

      Yes I scoured the forums, but couldnt fin info I could use. :)
      I am using 3.0 RC1.

      DB2 version is 7.1UDB, with JDBC 1.x classes.

      I dont understand where to condif the JNDI and datasource entries? I keep on getting references to jboss.jcml whioch is not in my JBoss distribution.

      I need to set up the following:
      jdbc DataSource name such as "jdbc/DB2/mydatabase"
      and url such as "jdbc:db2://myhost:6789/MYTABLE"
      also, need to specify the username and password for this so I can log into DB2.

      Please help me. I have tried editing all the config files and still cant get this right.


      Kind regards,
      Kenny

        • 1. Re: DB2 config problem
          subsstuff

          Sorry, just one more q:


          I would have to somehow specify that the driver I want to use is
          "COM.ibm.db2.jdbc.net.DB2Driver"

          Where is this done?

          I have created directory called "ext" in the JBOSS_HOME/lib directory...

          Thanks again!
          Kenny

          • 2. Re: DB2 config problem
            subsstuff

            Sorry its a late night! I creted that directory and copied the db2java.zip library in.

            K

            • 3. Re: DB2 config problem
              dmulej

              Hi!

              a. you need DB2 config file (it comes with jboss-3RC2).
              I named it db2ds-service.xml and put it in $JBOSS_HOME$/server/default/deploy.
              b. Put db2java.zip in $JBOSS_HOME$/lib

              hope it will help!

              Regards Darko

              • 4. Re: DB2 config problem
                subsstuff

                Thanks!
                That seems to do the trick.

                Now I can deploy no problem - just need to write a tet client. Are there any code samples for this?

                Kenny

                • 5. Re: DB2 config problem
                  rschiavi


                  is your db2java.zip in say c:/jboss/lib ??

                  man, i'm putting mine in JBOSS_HOME/lib but when i try to create a connection off my datasource (found fine with jndi), i get classnot found . . . .

                  if i put db2.java.zip in jboss/server/default/lib i get all kinda wierd startup errors with some jndi.DB2Context thing trying to load.

                  rich