Error using JBoss with SQL Server


EJB programming & troubleshooting: Error using JBoss with SQL Server

  1. Error using JBoss with SQL Server (7 messages)

    I was wondering if someone can help me with setting up Jboss with SQL Server 7.0.

    I get the the following error starting JBoss with Tomcat:

    [Service Control] Registered with server
    java.lang.NoClassDefFoundError: org/opentools/minerva/jdbc/xa/XAPoolDataSource
            at org.jboss.jdbc.XADataSourceLoader.getSource(

    I have installed the JBoss-2.2.1_Tomcat-3.2.1 binary on a Windows 2000 server, and am using the Sun jdbc-odbc bridge. I have followed the instructions exactly from the JBoss web page "Using MS SQL Server with JBoss".

    Everything goes fine until I "Declare a DB Connection pool", that is add the following to jboss.conf:
    <MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,rt.jar" CODEBASE="../../lib/ext/">
       <ARG TYPE="java.lang.String" VALUE="SQLServerPool">
       <ARG TYPE="java.lang.String" VALUE="org.jboss.minerva.xa.XADataSourceImpl">

    and "Configure the DB Connection pool", that is add the following to jboss.jcml:
    <mbean name=";DefaultDomain:service=XADataSource,name=SQLServerPool">
       <attribute name="URL">jdbc:odbc:jboss_odbc</attribute>
       <attribute name="JDBCUser">dbusername</attribute>
       <attribute name="Password">dbpassword</attribute>

    I get the error above after these steps

    I have located the XAPoolDataSource class in the lib/ext/minerva-1_0b3.jar file and added the file to the CLASSPATH, but I still get the error. Any help would be appreciated. Thanks!


    Threaded Messages (7)

  2. Error using JBoss with SQL Server[ Go to top ]

    Have you defined the following in your MBean?

    <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
  3. Error using JBoss with SQL Server[ Go to top ]

    Actually, I have never had to configure a connection pool in jboss.conf, only ever add the MBean declration to jboss.jcml
  4. Did you register your JDBC Provider in the jboss.jcml for the jdbc-odbc driver..

    <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
     <attribute name="Drivers">sun.jdbc.odbc.JdbcOdbcDriver</attribute>

    And btw, it is recommended not to use Type 2 drivers.
  5. Error using JBoss with SQL Server[ Go to top ]

    testing mail
  6. Thanks for responding. Yes, I have the code in both of your replies in the jcml file:

    <!-- JDBC -->
    <attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,sun.jdbc.odbc.JdbcOdbcDriver</attribute>
      </mbean> <!-- JDBC -->


    <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=SQLServerPool">
    <attribute name="DataSourceClass"> org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
       <attribute name="PoolName">SQLServerPool</attribute>
       <attribute name="URL">jdbc:odbc:jboss_odbc</attribute>
       <attribute name="JDBCUser">(user)</attribute>
       <attribute name="Password">(psswd)</attribute>

    I had added this code before and JBoss started fine. The instructions then say to go ahead and declare and configure the DB connection pool. When I add the code for these steps, that's when it errors. Are these steps needed? I know that this is not the best driver - do you know of better free ones? Thanks - Simon
  7. Error using JBoss with SQL Server[ Go to top ]

    Try upgrading to the final release 2.4. All the pooling classes have been moved into JBOSS_HOME/lib/ext/jbosspool.jar. THe XAPoolDataSource.class was also moved into org.jboss.pool.jdbc.xa

  8. Error using JBoss with SQL Server[ Go to top ]

    Thanks - I'll try the upgrade