IIB 节点无响应退出 MYSQL ODBC 数据源

IIB node exit with no response MYSQL ODBC datasoruce

我试图让 ODBC 与 IIB 10 一起工作,但我的节点在调用 state.select 时没有响应退出。 我认为我的 ODBC 设置有问题。 系统日志未显示任何错误,调试器在 state.select

上崩溃

这是我的代码:

    try {
     outP = new PrintWriter(new BufferedWriter(new FileWriter("/tmp/myfile.txt", true)));
outP.println("Start");
        MbSQLStatement state = createSQLStatement( "MYSQL", 
            "SET OutputRoot.XMLNS.integer[] = PASSTHRU('SELECT * FROM " + "test" + "');" );

         state.select( inAssembly, newAssembly );

    } catch (Exception e) {
    outP.println(e);
    outP.flush();
    outP.close();
}

结果: myfile.txt 只包含文本 "Start" 捕获永远不会 运行

我的 ODBC 设置

$odbcinst -j
unixODBC 2.3.4

DRIVERS............: /home/ds/iib-10.0.0.13/ie02/etc/odbcinst.ini
SYSTEM DATA SOURCES: /home/ds/iib-10.0.0.13/ie02/etc/odbc.ini
FILE DATA SOURCES..: /home/ds/iib-10.0.0.13/ie02/etc/ODBCDataSources
USER DATA SOURCES..: /home/ds/iib-10.0.0.13/server/ODBC/unixodbc/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

[MySQL]
Description=MySQL driver
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
TraceFile = /tmp/sql.log

[MYSQL]
Description=MYSQL DB
Driver=MySQL
Database=test
Server=127.0.0.1
Port=3306

尝试将属性 setThrowExceptionOnDatabaseError 设置为 true。

state.setThrowExceptionOnDatabaseError(true);

If a database error occurs during the execution of this statement, the behavior is determined by the value of the 'throwExceptionOnDatabaseError' attribute. If set to true (the default value), an exception gets thrown which can be caught if run within a try/catch block

(source)