Mirth Project | Eduardo Armendariz | 5 months ago
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    The following exception was reported to me: {code} ERROR 2016-08-31 01:31:15,218 [cd82f685-af3a-4dd1-ba95-eafd20dc0137_Worker-1] com.mirth.connect.connectors.file.FileReceiver: Unable to dispatch message to channel cd82f685-af3a-4dd1-ba95-eafd20dc0137: java.lang.NullPointerException {code} It is not enough to really tell where this is coming from. I found that removing a file after the original poll is done but before the bytes are read will lead to a similar exception. {code} ERROR 2016-09-13 16:27:26,745 [File Reader Polling Thread on Windows FTP (7260bdc5-b402-4bc5-9413-3fc7aa51822d) < 7260bdc5-b402-4bc5-9413-3fc7aa51822d_Worker-1] com.mirth.connect.connectors.file.FileReceiver: Unable to dispatch message to channel 7260bdc5-b402-4bc5-9413-3fc7aa51822d: java.lang.NullPointerException at com.mirth.connect.connectors.file.FileReceiver.getBytesFromFile( at com.mirth.connect.connectors.file.FileReceiver.processFile( at com.mirth.connect.connectors.file.FileReceiver.processFiles( at com.mirth.connect.connectors.file.FileReceiver.poll( at at at org.quartz.simpl.SimpleThreadPool$ {code} This is happening because the inputstream returned from con.readFile is null, I'm not sure if this is only for ftp mode. FTPClient._openDataConnection_ sends a preliminary command and checks the status. In this case the FTP server returns a 550 code: {code} (000120)9/13/2016 16:27:56 PM - eduardo (> RETR eduardo - Copy (4) - Copy.txt (000120)9/13/2016 16:27:56 PM - eduardo (> 550 File not found {code} Because of this FTPClient returns a null socket and then eventually a null inputstream is returned. {code} if (!FTPReply.isPositivePreliminary(sendCommand(command, arg))) { return null; } {code} I suspect that there are other ways that this could happen, maybe intermittent network issues. We should probably just check if the inputstream returned is null and let the user know that the file could not be read for an unknown reason(since the underlying libraries don't break execution under certain circumstances).

    Mirth Project | 5 months ago | Eduardo Armendariz

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.mirth.connect.connectors.file.FileReceiver.getBytesFromFile()
    2. com.mirth.connect
      1. com.mirth.connect.connectors.file.FileReceiver.getBytesFromFile(
      2. com.mirth.connect.connectors.file.FileReceiver.processFile(
      3. com.mirth.connect.connectors.file.FileReceiver.processFiles(
      4. com.mirth.connect.connectors.file.FileReceiver.poll(
      5 frames
    3. quartz
      2. org.quartz.simpl.SimpleThreadPool$
      2 frames