JBoss Community

jBPM 4.4 on sybase

reply from William Crowell in jBPM - View the full discussion

I have the same issue.  I can't move to another driver though.  Here is what I have run into:

 

I am running into a problem with a simple database row insert into Sybase.

I could see others running into the same problem since we use the same  jconn3 driver.

I am using iBatis 2.3.4.726 (the last version of iBatis 2), Sybase Thin  jconn3 version 6.5 drivers, and JUnit 4 on Java 1.6.

The problem is that you can't insert into a table if there are more than  2 text/varchar columns defined in the table.

For instance if you have a table like this:

 

CREATE TABLE section(
id INTEGER IDENTITY PRIMARY KEY,
name text, 
summary text,
description text
)

 

And you try the configuration above, you receive the following error:

com.sybase.jdbc3.jdbc.SybSQLException: A wrong datastream has been sent  to the server. The server was expecting token 32 but got the
token 33. This  is an internal error.

        at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
        at  com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
        at  com.sybase.jdbc3.tds.Tds.new(Unknown Source)
        at  com.sybase.jdbc3.tds.Tds.doCommand(Unknown Source)
        at  com.sybase.jdbc3.tds.Tds.endTransaction(Unknown Source)
        at  com.sybase.jdbc3.jdbc.SybConnection.rollback(Unknown Source)
...
         at com.ibatis.common.jdbc.SimpleDataSource  $SimplePooledConnection.invoke(SimpleDataSource.java:958) ...
         at  com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy­.java:  68)
...
        at  com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcTran­saction.java:  72)
        at  com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionMana­ger.java:  87)
        at  com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapE­xecutorDelegate.java:  734)
        at  com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessio­nImpl.java:  176)
        at  com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientI­mpl.java:  153)
        at  com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(Sql­MapExecutorDelegate.java:  835)
        at  com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorD­elegate.java:  410)       

        at  com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.ja­va:  82)
        at  com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java­:  58)
        at  com.xxxxxxxxxxx.dao.SectionDAO.createSection(SectionDAO.java:75)
        at  com.xxxxxxxxxxx.model.SectionTest.testContext(SectionTest.java:34)
...
         at  org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestM­ethod.java:  160)

 

Now change the table definition to leave out the description field to 
this:

CREATE TABLE section(
id INTEGER IDENTITY PRIMARY KEY,
name text, 
summary text
)

Then the table insert happens.

There is not much on Google for the "The server was expecting token 32  but got the token 33" exception.

 

http://www.talendforge.org/bugs/view.php?id=13087&nbn=2
http://www.google.com/url?sa=D&q=http://comments.gmane.org/gmane.comp.java.ibatisdb.user/39&usg=AFQjCNHMPIMTaPh--M1CKqEQ6NJZGi8h6Q

http://comments.gmane.org/gmane.comp.java.ibatisdb.user/39

 

I see a bug was opened up on it on the old iBatis' Apache Support site:

http://osdir.com/ml/db.ibatis.devel/2006-04/msg00036.html

But the bug was closed prematurely by Larry Meadors with iBatis
because  they moved to Google Groups myBatis.

Reply to this message by going to Community

Start a new discussion in jBPM at Community