简体   繁体   中英

Mirth Connect: Javascript Reader - Error listing files in dir (shared folder)

I have a trouble when accessing domain's shared folder by Javascript Reader. it was still running fine until one day it got an error(as below) at catch block. I restarted the Mirth Service and it works again. It repeated that many times.

Does anyone know the cause and how to fix it? Thank you!

My code and the error are as below

Code:

try {
    var username = sharedAuth.username;

    // If domain exist, login by domain
    if (!isEmpty(sharedAuth.domain)) {
        username = sharedAuth.domain+'@'+sharedAuth.username;
    }
    // Domain user format: DOMAIN@user
    var options = new com.mirth.connect.connectors.file.FileSystemConnectionOptions(false, username, sharedAuth.password, null);
    //logger.debug('=============222====='+username);
    
    var fileConn = new com.mirth.connect.connectors.file.filesystems.SmbFileConnection(sharedHost, options, 5000);
    //logger.debug('=============333====='+fileConn);
    var arrayFileList = [];
    
    if (fileConn != null) {
        var fileList = fileConn.listFiles(sharedPath, '^(ORM|PHY|MDM|ADT|ORU-RPT)_\\w{2}_\\d{14,100}.xml$', true, false);
        
        ...
    }
    
} catch (e) {
    logger.error('[Source] Error: '+e.message);
    logger.error(e);
} finally {
    fileConn.destroy();
}

Error:

ERROR 2020-09-24 10:25:31,030 [JavaScript Reader JavaScript Task on ProcessHISOutputXML_SMB_v3_WOR (71600861-ed6f-4004-a8b3-cc7d059f6f5c) < pool-1-thread-1] ProcessHISOutputXML_SMB_v3_WOR-js-connector: [Source] Error: com.mirth.connect.connectors.file.FileConnectorException: Error listing files in dir [his_ris] for pattern [^(ORM|PHY|MDM|ADT|ORU-RPT)_\w{2}_\d{14,100}.xml$]
ERROR 2020-09-24 10:25:31,031 [JavaScript Reader JavaScript Task on ProcessHISOutputXML_SMB_v3_WOR (71600861-ed6f-4004-a8b3-cc7d059f6f5c) < pool-1-thread-1] ProcessHISOutputXML_SMB_v3_WOR-js-connector: JavaException: com.mirth.connect.connectors.file.FileConnectorException: Error listing files in dir [his_ris] for pattern [^(ORM|PHY|MDM|ADT|ORU-RPT)_\w{2}_\d{14,100}.xml$]

What release of Mirth are you on? There was a bug in 3.9.0 that caused memory leaks in the SMB reader library, see https://github.com/nextgenhealthcare/connect/issues/4387 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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