2 Replies Latest reply on Sep 23, 2005 2:21 AM by kaizu

    JMS Persistence with Sybase causing SQLExceptions

    kaizu

      I'm trying to change our JMS persistence from Hypersonic to Sybase (in JBoss 3.2.5), but haven't been able to do that. After fighting enough with Sybase I tried also mySQL and that worked perfectly :-)

      The problem with Sybase is that the message can not be stored to the database. With JConnect driver it gives:

      Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Class org.jboss.mq.SpyObjectMessage not found. Check and make sure that the class has been installed, and an entry exists in Sysxtypes.


      and with JTDS I get:
      Caused by: java.sql.SQLException: Unable to convert between org.jboss.mq.SpyObjectMessage and JAVA_OBJECT.


        • 1. Re: JMS Persistence with Sybase causing SQLExceptions
          kaizu

          (The end of the message dissappeared...)

          I have tried changing the BLOB_TYPE and MESSAGEBLOB -fields type and the mapping in standardjaws.xml (CMP1.1 used), but nothing seems to help.

          I quess somebody has solved the problem and would appreciate some help how to solve the problem.

          If necessary I can provide more information.

          • 2. Re: JMS Persistence with Sybase causing SQLExceptions
            kaizu

            I found in [url=https://sourceforge.net/tracker/?func=detail&atid=381174&aid=631825&group_id=22866[/url] the following:


            2. For some reason, previous versions of JBoss mapped java.lang
            .Object to a JDBC type of JAVA_OBJECT, and then proceeded to
            serialize the object into a binary column.
            Some JDBC drivers would accept this behaviour, but many would
            not.
            JAVA_OBJECT is intended to be mapped to custom types on the
            database, and used in conjunction with the java.sql.SQLData/
            SQLInput/SQLOutput interfaces, which are managed by the JDBC
            driver.
            Therefore JAVA_OBJECT types are now passed straight through
            to the JDBC driver via set/getObject.
            The standard mappings for java.lang.Object that I was able to test
            (as in item 1) have been changed to have a binary JDBC type to
            preserve the previous behaviour.

            NOTE: Anyone who has used JAVA_OBJECT in their jbosscmp-
            jdbc.xml will need to change it to VARBINARY,
            LONGVARBINARY or BLOB to get the previous behaviour.

            IMPORTANT: I have only changed the standard mappings for the
            db platforms that I could test. If your database is not mentioned
            above I would appreciate feedback on which binary jdbc types are
            appropriate.


            And the tested/modified databases were: "It has been tested against Oracle 9i, Postgres 7.2 and MySQL
            3.23.53, (and hsqldb of course)."

            Could this have some connection with the problem I'm having?