3 Replies Latest reply on Sep 10, 2001 9:08 AM by Bani Greyling

    jboss 2.4 and SQL Server

    Kjell Nilsen Newbie


      I'm curenly trying out jboss 2.4.0 ( upgrading from 2.2.1 as we want to try the jboss scheduler) but have problems to get a cmp entity bean to work ( the first one testet).

      We use SQL Server 2001, and the bean works when deployed in jboss 2.2.1.

      We have update the 3 of the entries in standardjaws.xml
      for SQL Server as follows:



      Any ideas anyone ?

      Tia, Kjell N.

      Error message:
      [OrderBeanEB] Activated bean OrderBeanEB with id = 1
      [JAWS] Unable to read from ResultSet: java.lang.reflect.InvocationTargetException
      [JAWS] java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
      [JAWS] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
      [JAWS] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
      [JAWS] at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3171)
      [JAWS] at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5317)
      [JAWS] at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:548)
      [JAWS] at sun.jdbc.odbc.JdbcOdbcResultSet.getObject(JdbcOdbcResultSet.java:1622)
      [JAWS] at org.jboss.pool.jdbc.ResultSetInPool.getObject(ResultSetInPool.java:554)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject(JDBCCommand.java:405)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject(JDBCCommand.java:504)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOneEntity(JDBCLoadEntityCommand.java:219)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult(JDBCLoadEntityCommand.java:176)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleResult(JDBCQueryCommand.java:59)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:160)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:147)
      [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:156)
      [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:365)
      [JAWS] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:263)
      [JAWS] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:256)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:307)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
      [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
      [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
      [JAWS] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:349)
      [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:393)
      [JAWS] at java.lang.reflect.Method.invoke(Native Method)
      [JAWS] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      [JAWS] at sun.rmi.transport.Transport$1.run(Transport.java:142)
      [JAWS] at java.security.AccessController.doPrivileged(Native Method)
      [JAWS] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
      [JAWS] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
      [JAWS] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
      [JAWS] at java.lang.Thread.run(Thread.java:484)

        • 1. Re: jboss 2.4 and SQL Server
          Bani Greyling Newbie

          I don/t have any idea what your problem might be, but try using a certified J2EE driver. I am on SQL2000 and had several problems ( especially with distributed transactions). Since I downloaded a trial version (see http://industry.java.sun.com/products/jdbc/drivers for references to suppliers) I have no driver related problems anymore, except for the fact that it's going to expire soon :(

          • 2. Re: jboss 2.4 and SQL Server
            Kjell Nilsen Newbie

            Which driver are you using? It always good to know about something thats working properly !

            We tried i-net's Opta a while ago but it had a bug when used with jboss. The bug is fixed it the lastest release ( 4.11) so we will do a new test, but have not got around to it yet.

            Also we are selling our product so we want to keep 3-party costs to a minimum - jboss is perfect it that respect.

            Do you use the standard mappings in jaws ? We have changed these ( as a float in SQLServer has 15 digits precisiton and corresponds to a Java double, while the SQLServer 'real' has 7 digits precisiton and corresponds to a Java double) , and this works fine with jboss 2.2.1.

            Thanks for your help,


            • 3. Re: jboss 2.4 and SQL Server
              Bani Greyling Newbie

              JSQLConnect.jar from www.j-netdirect.com. What I like about this driver is that it's a unlimited number of connections evaluation (30 days). The others is unlimited time, but with only one or two connections. After 30 days this driver will only give you one connection per db server. It sells for about US$1500.

              I currently use the standard mapping because I have not tested it thoroughly yet, but your suggestion makes sense.

              Another tip. Try using the defualt mapping, but I doubt that would do it.