7 Replies Latest reply on Sep 10, 2002 5:45 PM by David Jencks

    SybaseDS not bound

    Eric Ridgway Newbie

      I was able to deploy a simple entity and session bean using JBoss 3.0 and the hypersonic database. I want to now deploy them against a Sybase database. I am using jconnect 5.5 and I have put the jconn2.jar in the JBOSS_HOME\lib directory and I have put the sybase-service.xml file in the JBOSS_HOME\server\default\deploy directory. At the top for the jbosscmp-jdbc.xml file I placed the following code:


      java:/SybaseDS
      <datasource-mapping>Sybase</datasource-mapping>
      <create-table>false</create-table>
      <remove-table>false</remove-table>


      When I start the server I get the following error

      14:29:45,264 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single:J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=sleeper.jar
      14:29:45,274 ERROR [EjbModule] Initialization failed
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/SybaseDS; - nested throwable: (javax.naming.NameNotFoundException: SybaseDS not bound)

      I went to the management console and the jboss.jca section contained the following.
      service=LocalTxCM,name=SybaseDS
      service=LocalTxDS,name=SybaseDS
      service=LocalTxPool,name=SybaseDS

      I did a listing of the JNDIView and the SybaseDS was not listed in the java namespace.

      Please let me know what I am missing

      Thanks


        • 1. Re: SybaseDS not bound
          Dustin Barlow Newbie

          Make sure that the JNDI name under the SybaseDS in the ManagedConnectionFactory section is set properly.

          Should look something like this:

          <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->


          SybaseDS



          <config-property name="ConnectionURL" type="java.lang.String">jdbc:sybase:Tds:your.sybase.server:2025/yourdatabasename</config-property>
          <config-property name="DriverClass" type="java.lang.String">com.sybase.jdbc2.jdbc.SybDriver</config-property>
          <!--set these only if you want only default logins, not through JAAS-->
          <config-property name="UserName" type="java.lang.String">username</config-property>
          <config-property name="Password" type="java.lang.String">password</config-property>



          <!--Below here are advanced properties -->
          <!--hack-->
          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper

          • 2. Re: SybaseDS not bound
            Eric Ridgway Newbie

            Yes, my sybase-service.xml file looks exactly like that.

            • 3. Re: SybaseDS not bound
              David Jencks Master

              study the part of server.log where your datasource mbeans are getting deployed. For me, there has always been a hint so I can find what is wrong.

              • 4. Re: SybaseDS not bound
                Alex Bereshny Newbie

                I using 3.0 and having the same problem what other files will have to be change other then the ones already mentioned. Due I have to change the standardjaws.xml file to match the JBOSSCMP-JDBC.xml file

                java:/DefaultDS
                <datasource-mapping>Sybase</datasource-mapping>
                <create-table>true</create-table>
                <remove-table>false</remove-table>

                It seems that I'm still pointing to the default Hypersonic database thanks for any info.

                • 5. Re: SybaseDS not bound
                  David Jencks Master

                  ridgway -- put the driver in server/[config]/lib, not lib.

                  Then make sure the datasource is really being set up, all 3 mbeans are started, and the ds is bound in jndi before you deploy your app.

                  AlexB -- standardjaws is for cmp1.1 beans using the cmp1.1 dtd in ejb-jar.xml. standardjbosscmp-jdbc.xml is for using with the cmp2 dtd. (may change soon to always use standardjbosscmp-jdbc.xml, but look on the cmp forum for stuff like this)

                  • 6. Re: SybaseDS not bound
                    Stefan Craatz Newbie

                    I am having similar problems. After deploying a sybase-service.xml file I found that the MBeans are all deployed in the management console, but the sybase DS MBean was not started! After starting it manually, the JNDI name was registered and I could retrieve it. Did you check, if your beans are all started?

                    How do I configure the service to auto-start?

                    It seems that JBoss cannot find the com.sybase.jdbc2.jdbc.SybDriver class, inspite the jconn2.jar file is in the [config]/lib directory :-(

                    • 7. Re: SybaseDS not bound
                      David Jencks Master

                      The mbeans should have started automatically. Look carefully in server.log to see if there is an explanation from when jboss tried to start them.