7 Replies Latest reply on Feb 27, 2004 5:59 AM by dannyyates

    JBoss & MSSQL database server connection problem

    dillinger Newbie


      I'm a noob in jboss. I have a MSSQL server, and try to connect my JBoss server to it. I have tried to configure the dukes bank eksampel against my database. However all my attempts have failed. I'm not sure if I have understanded how to setup the *.xml files.

      I have taken the mssql.xml, and configured it to my mssql server. I'm not sure if I need to configure any others xml files. I have downloaded the latest JDBC driver, and copied the JAR files into the jboss-3.2.3\server\default\lib All 3 of them.

      My path is pointing at them in that libery too.

      If any cound inform me step by step, how to setup my connection, or give me a link to a toturial, i'll be pleased. Consider I don't know anything, when U guid me. This way I should manage to find where I go wrong.

      Thanks in advance.

        • 1. Re: JBoss & MSSQL database server connection problem
          dillinger Newbie

          The sql server is a MSSQL2K and the JBOSS is a 3.2.3 version.

          I have done the following steps:
          (preview: I have installed the JDBC driver)

          1. JBOSS_HOME was set
          2. JAVA_HOME was set
          3. Copied the msbase, mssqlserver, msutil into the jboss-3.2.3\server\default\lib
          4. Copied mssql-ds.xml file into the deploy folder, after edeting it
          5.Editing the standardjbosscmp-jdbc.xml
          6.started the run bach file.

          What did I missed???

          I post my files:

          • 2. Re: JBoss & MSSQL database server connection problem
            Adrian Brock Master

            Sounds like you did it correctly, but without posting your changes or the error
            you get, it is hard to tell what your problem is.


            • 3. Re: JBoss & MSSQL database server connection problem
              dillinger Newbie

              Well I'll post it today... soon... I have just one quistion. Does Jboss expect me to make a dataacces bean to connect my database? And then have my mssql-db.xml file to call that bean? I thought that the driver made the connection, with the parameters, i wrote in the mssql-ds.xml file. I'll post all the files I have editet....

              I'm really struggeling in the deep end of the water here right now, so any help is appriciated

              • 4. Re: JBoss & MSSQL database server connection problem
                dillinger Newbie

                In the standardjbosscmp-jdbc.xml file I have changed the folowing: The out commented lines are the original source with the hypersonic database. As u can see i have changed the attributes to MSSQLDS and MS SQLSERVER2000


                <datasource-mapping>Hypersonic SQL</datasource-mapping>
                <datasource-mapping>MS SQLSERVER2000</datasource-mapping>


                Then finally I have my mssql-ds.xml file:


                <!-- sql to call when connection is created
                <new-connection-sql>some arbitrary sql</new-connection-sql>
                <!-- sql to call on an existing pooled connection when it is obtained from pool
                <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>


                I have not done ANY other changes. The bug i get is view as followed:
                I have no idea, what the MBeanException is. I know that a bean has a mitch match, but i don't know witch one.

                What does I miss????

                Where is the method:'checkIncompleteDeployments()'??


                13:34:55,221 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                13:34:55,221 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
                ration 'checkIncompleteDeployments()'
                Cause: Incomplete Deployment listing:
                Packages waiting for a deployer:

                Incompletely deployed packages:

                MBeans waiting for classes:

                MBeans waiting for other MBeans:
                [ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
                state: CONFIGURED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=DestinationManager
                state: CONFIGURED
                I Depend On: jboss.mq:service=MessageCache

                Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
                , ObjectName: jboss.mq:service=PersistenceManager
                state: CONFIGURED
                I Depend On: jboss.jca:service=LocalTxCM,name=DefaultDS

                Depends On Me: jboss.mq:service=DestinationManager
                , ObjectName: jboss.mq.destination:service=Topic,name=testTopic
                state: CONFIGURED
                I Depend On: jboss.mq:service=DestinationManager


                • 5. Re: JBoss & MSSQL database server connection problem
                  dillinger Newbie

                  Well just forget it. Seems like the information about this essue is very poor!! Have seen a whole lot of question about JBOSS and database connections without any answers.
                  I'll write my own database handler, and deploy that instead

                  • 6. 3823243
                    Janardhan Burugupalli Newbie

                    i use this and it works fine

                    <!-- <connection-property name="DATABASENAME">AIDB</connection-property>
                    <connection-property name="SelectMethod">cursor</connection-property>-->



                    • 7. Re: JBoss & MSSQL database server connection problem
                      dannyyates Newbie

                      No need to get moody. You problem isn't necessarily every body else's problem. If you really need help, you could always pay for support.

                      Anyway... if you look at the exception, you'll see that one of the things being waited for is "jboss.jca:service=LocalTxCM,name=DefaultDS". You'll also notice that you commented out DefaultDS earlier on.

                      I know nothing about this architecture, but 2 minutes application of common sense and rudimentary pattern matching has led me to what I think is likely to be close to the right answer.

                      Easy, eh? Certainly easier than getting upset and wasting time waiting for other people to do your work for you.