工作事件:sql server 中有个 A 表, Mysql中有个 B 表,两张表结构差不多,现在要先从B表中查出主键最大值 b_id,使用b_id 的值,查询出Sql server数据库中A表的主键比b_id大的所有记录,插入到mysql 数据库的B表中。
我建了个Bpel流程,流程由ScheDuding定制时间触发,通过一个web service 作数据中转传输工作,现在数据已经从sql server 中查出来了,在web service中可以看到,但在把数据插入到mysql库中的过程,执行insert语句的时候,报了个错!
Executing SQL....insert into article (id_in_source,shenghe,source_id,approver,rv_comment,category_id,picurl,attachment,tjnews,content,article_id,title,hits,navigation,upate_time,doc_id,create_time) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Populating Prepared Statement
Driver Does not support getting the Parameter Metadata
Driver Does not support getting the Parameter Metadata
Driver Does not support getting the Parameter Metadata
无法将值 转换为 jdbc 类型 4
Failed to write message:.
java.lang.Exception: Failed to denormalize message.
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:637)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.execute(OutboundMessageProcessor.java:276)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.run(OutboundMessageProcessor.java:171)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jbi.messaging.MessagingException: Error occured while executing SQL.insert into article (id_in_source,shenghe,source_id,approver,rv_comment,category_id,picurl,attachment,tjnews,content,article_id,title,hits,navigation,upate_time,doc_id,create_time) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) Reason: Unable to convert normalized message content to prepared statement, Error occured during populating PreparedStatement.Reason: Failed to convert value to jdbc type 4
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.executeOutboundSQL(OutboundMessageProcessor.java:1436)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:621)
... 5 more
Caused by: javax.jbi.messaging.MessagingException: Unable to convert normalized message content to prepared statement, Error occured during populating PreparedStatement.Reason: Failed to convert value to jdbc type 4
at org.glassfish.openesb.databasebc.JDBCDenormalizer.denormalizeOutbound(JDBCDenormalizer.java:124)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.executeOutboundSQL(OutboundMessageProcessor.java:1422)
... 6 more
Caused by: java.lang.Exception: Failed to convert value to jdbc type 4
at org.glassfish.openesb.databasebc.JDBCUtil.convert(JDBCUtil.java:178)
at org.glassfish.openesb.databasebc.JDBCDenormalizer.populatePreparedStatement(JDBCDenormalizer.java:418)
at org.glassfish.openesb.databasebc.JDBCDenormalizer.denormalizeOutbound(JDBCDenormalizer.java:115)
... 7 more
Finished processing outbound messages.
从报错的信息来看好像是jar报的问题,但不知道是那个包出了问题!
我mysql用的是 mysql-connector-java-5.1.7-bin.jar
Sql server 用的是 msbase.jar mssqlserver.jar msutil.jar
那位大侠能否指点下!小弟不慎感激!