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

    JBoss & MSSQL database server connection problem

    dillinger

      Hi.

      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

          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

            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.

            Regards,
            Adrian

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

              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

                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

                ************************************************************************************************
                <jbosscmp-jdbc>

                <!--
                java:/DefaultDS
                -->
                java:/MSSQLDS
                <!--
                <datasource-mapping>Hypersonic SQL</datasource-mapping>
                -->
                <datasource-mapping>MS SQLSERVER2000</datasource-mapping>

                ************************************************************************************************

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

                ************************************************************************************************


                <local-tx-datasource>
                <jndi-name>MSSQLDS</jndi-name>
                <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=GHEM3;SelectMethod=Cursor</connection-url>
                <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
                <user-name>sa</user-name>
                strange
                <!-- 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>
                -->
                </local-tx-datasource>



                ************************************************************************************************

                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/
                default/deploy/management/web-console.war
                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
                jboss.web:service=WebServer

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

                Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
                jboss.mq.destination:service=Topic,name=securedTopic
                jboss.mq.destination:service=Topic,name=testDurableTopic
                jboss.mq.destination:service=Queue,name=testQueue
                jboss.mq.destination:service=Queue,name=A
                jboss.mq.destination:service=Queue,name=B
                jboss.mq.destination:service=Queue,name=C
                jboss.mq.destination:service=Queue,name=D
                jboss.mq.destination:service=Queue,name=ex
                jboss.mq:service=SecurityManager
                jboss.mq.destination:service=Queue,name=DLQ
                , 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
                jboss.mq:service=SecurityManager


                ************************************************************************************************

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

                  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
                    jburugupalli

                    i use this and it works fine

                    <local-tx-datasource>
                    <jndi-name>AIWORKDB</jndi-name>
                    <connection-url>jdbc:inetdae://localhost/AIDB</connection-url>
                    <!-- <connection-property name="DATABASENAME">AIDB</connection-property>
                    <connection-property name="SelectMethod">cursor</connection-property>-->
                    <driver-class>com.inet.tds.TdsDriver</driver-class>
                    <user-name>AIWORKUSER</user-name>
                    heiko

                    <min-pool-size>0</min-pool-size>
                    <max-pool-size>50</max-pool-size>
                    <blocking-timeout-millis>5000</blocking-timeout-millis>
                    <idle-timeout-minutes>15</idle-timeout-minutes>

                    </local-tx-datasource>

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

                      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.