Hi George, 

Have you tried setting the MySQL Connector/J jdbcCompliantTruncation option
to false, as in the following example?

DatabaseBackend name="xenc_db"
url="jdbc:mysql://192.168.128.130/gi24?defaultFetchSize=1000&ampjdbcComplian
tTruncation=false&zeroDateTimeBehavior=convertToNull&tinyInt1isBit=f
alse">

This would cause truncation errors to be ignored, which is traditional
behavior for MySQL native client drivers.

Thanks, Robert

P.s., Is there also a class path issue here?   MysqlDataTruncation should be
in the Connector/J driver, so if you get a ClassNotFoundException it seems
something is not correctly configured.

On 1/3/08 5:31 AM, "George Elefter" <[EMAIL PROTECTED]> wrote:

> Hi Robert,
> 
> Thank you for your update.
> 
> Here is my requested scenario
> 
> The database scheme
> --------------------------------
> 
> +-----------+-------------+------+-----+---------------------+----------------
> + 
> | Field     | Type        | Null | Key | Default             | Extra
> |
> 
+-----------+-------------+------+-----+---------------------+---------------->
+
> | cid       | int(11)     | NO   | PRI | NULL                | auto_increment
> | 
> | cname     | varchar(20) | NO   |     | NULL                |
> |
> | cemail    | varchar(50) | NO   |     | NULL                |
> |
> | csubject  | varchar(30) | NO   |     | NULL                |
> | 
> | cmessage  | text        | NO   |     | NULL                |
> |
> | lastlogin | datetime    | YES  |     | 0000-00-00 00:00:00 |
> |
> | age       | tinyint(4)  | YES  |     | 1                   |
> | 
> | age2      | tinyint(4)  | YES  |     | 1                   |
> |
> 
+-----------+-------------+------+-----+---------------------+---------------->
+
> 
> Here is my write sql query
> ------------------------------------
> 
> insert into contact(cname,cemail,csubject,cmessage)
> values('abcdeabcdeabcdeabcdee','lggg','jjjj','hhh')
> 
> Please note the field "cname" is defined the width of 20. However 21 chars
> have been passed from the application leads to the below error. I am using
> sequoia version 2.10.9 and appia as group communication.
> 
> Here i am using only one controller.
> 
> Thanks in Advance for your any help.
> 
> Regards
> 
> George Elefter
> 
> Backend iviews - BackendWorkerThread for backend 'backend2' with RAIDb level:1
> failed (Data truncation: Data too long for column 'cname' at row 1)
> Backend iviews - BackendWorkerThread for backend 'backend1' with RAIDb level:1
> failed (Data truncation: Data too long for column 'cname' at row 1)
> 
> 16:42:25,516 WARN  controller.RequestManager.iviews SQLException while
> executing distributed write request write request 5 failed:
> Backend iviews - BackendWorkerThread for backend 'backend2' with RAIDb level:1
> failed (Data truncation: Data too long for column 'cname' at row 1)
> Backend iviews - BackendWorkerThread for backend 'backend1' with RAIDb level:1
> failed (Data truncation: Data too long for column 'cname' at row 1)
> 
> java.sql.SQLException: write request 5 failed:
> Backend iviews - BackendWorkerThread for backend 'backend2' with RAIDb level:1
> failed (Data truncation: Data too long for column 'cname' at row 1)
> Backend iviews - BackendWorkerThread for backend 'backend1' with RAIDb level:1
> failed (Data truncation: Data too long for column 'cname' at row 1)
> 
>         at 
> org.continuent.sequoia.common.exceptions.SQLExceptionFactory.getSQLException(S
> QLExceptionFactory.java:88)
>         at 
> org.continuent.sequoia.controller.loadbalancer.raidb1.RAIDb1.checkTaskCompleti
> on(RAIDb1.java :939)
>         at 
> org.continuent.sequoia.controller.loadbalancer.raidb1.RAIDb1.execWriteRequest(
> RAIDb1.java:343)
>         at 
> org.continuent.sequoia.controller.loadbalancer.raidb1.RAIDb1.statementExecuteU
> pdate(RAIDb1.java :249)
>         at 
> org.continuent.sequoia.controller.requestmanager.RequestManager.loadBalanceSta
> tementExecuteUpdate(RequestManager.java:925)
>         at 
> org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedStatemen
> tExecuteUpdate.executeScheduledRequest
> (DistributedStatementExecuteUpdate.java:87)
>         at 
> org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedRequest.
> handleMessageMultiThreaded(DistributedRequest.java:157)
>         at 
> org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase.h
> andleMessageMultiThreaded (DistributedVirtualDatabase.java:364)
>         at 
> org.continuent.hedera.adapters.MulticastRequestAdapterThread.run(MulticastRequ
> estAdapterThread.java:102)
> 16:42:25,529 ERROR continuent.hedera.adapters PullPushAdapter: Error while
> reading from channel
> org.continuent.appia.core.message.MessageException: Trying to read an unknown
> object from message.
>         at 
> org.continuent.appia.core.message.Message.popObject(Message.java:1254)
>         at org.continuent.hedera.channel.AppiaReliableGroupChannel.receive
> (AppiaReliableGroupChannel.java:292)
>         at 
> org.continuent.hedera.adapters.PullPushAdapter.run(PullPushAdapter.java:166)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassNotFoundException :
> com.mysql.jdbc.MysqlDataTruncation
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass (URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java :251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at java.io.ObjectInputStream.resolveClass (ObjectInputStream.java:574)
>         at 
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
>         at 
> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
>         at java.io.ObjectInputStream.readOrdinaryObject
> (ObjectInputStream.java:1693)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
>         at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
>         at java.io.ObjectInputStream.readSerialData
> (ObjectInputStream.java:1836)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
>         at java.io.ObjectInputStream.defaultReadFields
> (ObjectInputStream.java:1912)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
>         at java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299)
>         at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
>         at java.io.ObjectInputStream.readOrdinaryObject
> (ObjectInputStream.java:1713)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
>         at org.continuent.appia.core.message.Message.popObject
> (Message.java:1250)
>         ... 3 more

-- 
Robert Hodges, CTO, Continuent, Inc.
Email:  [EMAIL PROTECTED]
Mobile:  +1-510-501-3728  Skype:  hodgesrm

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to