Alejandro Guizar [
http://community.jboss.org/people/alex.guizar%40jboss.com] replied to
the discussion
"jBPM 4.4 on sybase"
To view the discussion, visit:
http://community.jboss.org/message/558314#558314
--------------------------------------------------------------
Dino, this is an issue with the JConnect driver. Even though jBPM 4.4 is not tested with
Sybase, jBPM 3.2 is, and I recognized the issue instantly. The problem is described in
the heading comment of this
http://anonsvn.jboss.org/repos/jbpm/jbpm3/branches/jbpm-3.2-soa/modules/c...
source file:
work around a "feature" in the jConnect driver when setting
a text parameter to null.
Specifically, the call:
PreparedStatement st;
st.setNull(index, Types.CLOB);
throws an SQLException with SQL state "JZ0SL" and reason "Unsupported SQL
type".
Unfortunately the workaround is not straightforward. On the one hand you can
switch to
http://jtds.sourceforge.net/ jTDS, unfortunately it
http://community.jboss.org/wiki/jBPM32xonSybaseASE15#JDBC_drivers does not support XA
transactions for Sybase. If that is not a problem for you, go ahead and try that driver.
Otherwise, you can try the jBPM3 solution. Add SybaseTextType.java to your application.
Next, create a Hibernate mapping file with the following content.
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
-//Hibernate/Hibernate Mapping DTD 3.0//EN
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd>
<hibernate-mapping>
<typedef name="text" class="org.jbpm.db.hibernate.SybaseTextType"
/>
</hibernate-mapping>
This will make any field/property mapped to a text column employ the SybaseTextType
instead of the standard org.hibernate.type.TextType, thus avoiding the call that breaks
jConnect. This solution will eventually make it to jBPM4 but in the meantime, please apply
it yourself.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/558314#558314]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]