4 Replies Latest reply on Feb 27, 2002 11:02 AM by aelsholz

    [jboss 3.0]Connection to MSSQL-Database

    aelsholz

      Hi,

      i have problems to create a connection to my MSSQL-Database:

      this file i put in deploy:

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- $Id: mssql-service.xml,v 1.2 2002/01/14 00:16:51 d_jencks Exp $ -->

      <!-- =====================================================================-->
      <!-- mssql-service.xml -->
      <!-- JBoss v3.0alpha (november 23, 2001) ATINAV thin driver Configuration -->
      <!-- tested against MS SQL 2000 -->
      <!-- =====================================================================-->
      <!-- -->
      <!-- please put jdbc driver (in this case TaveConn25C.jar) under -->
      <!-- jboss_home/lib/ext -->
      <!-- please put this file (mssqlds-service.xml) under jboss_home/deploy -->
      <!-- The atinav driver is from -->
      <!-- http://www.atinav.com/products/aveconnect/aveconnect.htm -->
      <!-- This configuration is contributed by Alex Pavlov apavlov@ma.us.mks.com -->
      <!-- =====================================================================-->







      ConnectionURL=jdbc:AvenirDriver://coffein.ps.lan:1433/TEST;uid=sa;pwd=
      DriverClass=net.avenir.jdbc2.Driver

      MSSQL2000DS
      java:/TransactionManager
      <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva
      JDBC LocalTransaction ResourceAdapter
      <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
      #
      #Wed Aug 15 16:17:29 EDT 2001
      BlockingTimeoutMillis=50000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=10
      MinSize=0
      MaxIdleTimeoutPercent=1.0


      org.jboss.resource.security.ManyToOnePrincipalMapping

      userName=sa
      password=



      but i get this Error:

      [11:25:46,108,ContainerFactory] Deploying CDBean
      [11:25:48,231,DefaultDS] Unable to create ManagedConnection:
      javax.resource.ResourceException: Unable to create DB connection for url: jdbc:hsqldb:hsql://localhost:1476, user: sa, exception: java.sql.SQLException: ot found: SA

      whats wrong???

      alex

        • 1. Re: [jboss 3.0]Connection to MSSQL-Database
          greathavoc

          I think the url for the database is still configured incorrectly. At the bottom of your log, the url is configured for the hypersonic db not MSSQL.

          Unable to create DB connection for url: jdbc:hsqldb:hsql://localhost:1476, user: sa, exception: java.sql.SQLException: ot found: SA


          The jdbc:hsqldb:hsql........... is for the hypersonic db.

          Jimmy

          • 2. Re: [jboss 3.0]Connection to MSSQL-Database
            aelsholz

            When i delete the mssqlds-service.xml the jar will deployed. But I want commit to the MSSQL-Server...

            What I must change???

            thanks alex

            • 3. Re: [jboss 3.0]Connection to MSSQL-Database
              davidjencks

              Easy way -- remove everything about hypersonic and call your ds DefaultDS

              More controlled way -- make sure your resource-refs are pointing to your datasource. Probably you need to look in jboss.xml in your ejb-jar

              • 4. Re: [jboss 3.0]Connection to MSSQL-Database
                aelsholz

                Hi,

                thats my jboss.xml:

                <?xml version="1.0" encoding="Cp1252"?>


                false
                <container-configurations />
                <resource-managers />
                <enterprise-beans>

                <ejb-name>CDCollectionBean</ejb-name>
                <jndi-name>cd/CDCollection</jndi-name>
                <configuration-name></configuration-name>


                <ejb-name>CDBean</ejb-name>
                <jndi-name>cd/CD</jndi-name>
                <configuration-name></configuration-name>

                </enterprise-beans>


                where are the resource-refs???

                alex