简体   繁体   English

Mirth-数据库编写器错误

[英]Mirth- Database writer error

I am trying to create a channel to write to a database from HTTP source. 我正在尝试创建一个通道以从HTTP源写入数据库。

I have made two destinations both to same database. 我已经将两个目标都移到了同一数据库。 One destination writes via JavaScript and the other with SQL. 一个目标通过JavaScript编写,另一个目标通过SQL编写。

The data gets written to database in the first destination(the JavaScript one) but not through the second(SQL). 数据将被写入第一个目标(JavaScript中的一个)中的数据库,而不是通过第二个(SQL)中的数据库。 I am not able to get the tables through "Insert" button also. 我也无法通过“插入”按钮获取表格。 It gives the following error: 它给出以下错误:

在此处输入图片说明

Someone please give me the solution to set up database connection without any flaw. 有人请给我解决方案,以建立没有任何缺陷的数据库连接。 Please note that the database is secured one in AWS instance. 请注意,该数据库在AWS实例中是安全的。

To connect to database via javascript, you will need to select "Yes" under the option to use javascript. 要通过javascript连接到数据库,您需要在使用javascript的选项下选择“是”。 Then your connector will look something like this: 然后,您的连接器将如下所示:

var dbConn;

try {
    dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','ServerURL','Username','Password');

    // You may access this result below with $('column_name')
    return result;
} finally {
    if (dbConn) { 
        dbConn.close();
    }
}

Note that you can click on the "generate" button and this template will be created for you in the javascript window. 请注意,您可以单击“生成”按钮,然后将在javascript窗口中为您创建此模板。

Based on the information you have given, I am not sure that your method/syntax is the cause to your error. 根据您提供的信息,我不确定您的方法/语法是导致错误的原因。 Can you verify that your database driver jar file is located in your installation? 您可以验证数据库驱动程序jar文件位于安装中吗? (Mine is located at "...\\Mirth Connect\\server-lib\\database" (我的位于“ ... \\ Mirth Connect \\ server-lib \\ database”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM