Hi,
I found a similar problem to mine in the archives
(http://lists.mysql.com/maxdb/12633), but the solution
at the time was to update the drivers, but that was
with SapDB 7.4 and I have the same problem with MaxDB
7.5 so there has to be another problem. So here's my
description:
Before I start: I have several entities without Long
Byte and they all work fine. And the whole app works
well with MS SQL2000 and Oracle9i. So basically it
should work.
I have an entity bean (CMP) that has an
java.lang.Integer field and a field that extends
java.lang.Object (and implements
java.io.Serializable). This entity is mapped (at
deployment time) to an Integer field and a Long Byte
field like the JBoss 3.2.3 mapping config for SapDB
suggests
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>LONG BYTE</sql-type>
</mapping>
This works perfectly, no deployment errors. The table
is created and the columns have the appropriate types
(Integer and Datatype Long with Code BYTE).
When I create a new entity (insert a row in the table)
I get the following stack trace
causedBy:
com.sap.dbtech.jdbc.translators.ConversionExceptionSapDB:
Cannot put ASCII data into this LONG column.
at
com.sap.dbtech.jdbc.translators.StreamTranslator.transStringForInput(StreamTranslator.java:385)
at
com.sap.dbtech.jdbc.translators.DBTechTranslator.transObjectForInput(DBTechTranslator.java:1124)
at
com.sap.dbtech.jdbc.CallableStatementSapDB.setObject(CallableStatementSapDB.java:1910)
at
com.sap.dbtech.jdbc.CallableStatementSapDB.setObject(CallableStatementSapDB.java:1937)
at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:623)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:1278)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:354)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:336)
...
So something seems to go wrong in the jbdc driver.
That is the same message that appeared in the old
thread in the mailing list archives. The problem seems
to be that the Object is serialized and the stream is
transfered to the jdbc driver and the driver thinks
that this is ASCII data. Is there a solution?
Thanx and Ciao
Volker
Mit sch�nen Gr��en von Yahoo! Mail - http://mail.yahoo.de
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]