IBM Support

IT40532: Managed File Transfer destination agent stops and generates an ABEND file containing a java.nio.file.InvalidPathException

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • An MQ Managed File Transfer agent running on AIX is acting as
    the destination agent for a managed transfer, where the
    destination filename contains an en-dash ('?') character. While
    processing the managed transfer, the agent unexpectedly shuts
    down and generates an ABEND file containing the following
    information:
    
    -------------------------------------------------------------
    ...
    Thread:     <number> (FileIOWorker-<number>:<number>)
    Class:      com.ibm.wmqfte.thread.FTEThread
    ...
    Method:     uncaughtException
    Probe:      ABEND_001
    Cause:      java.nio.file.InvalidPathException: Malformed input
    or input contains unmappable characters: <filename>
    java.nio.file.InvalidPathException: Malformed input or input
    contains unmappable characters: <filename>
      at sun.nio.fs.UnixPath.encode(UnixPath.java:162)
      at sun.nio.fs.UnixPath.<init>(UnixPath.java:86)
      at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:294)
      at java.io.File.toPath(File.java:2282)
      at
    com.ibm.wmqfte.io.impl.FTEFileImpl.delete(FTEFileImpl.java:689)
      at
    com.ibm.wmqfte.io.impl.FTEFileImpl.renameTo(FTEFileImpl.java:779
    )
      at
    com.ibm.wmqfte.io.impl.FTEFileChannelImpl.complete(FTEFileChanne
    lImpl.java:593)
      at
    com.ibm.wmqfte.io.impl.FTEFileChannelImpl.close(FTEFileChannelIm
    pl.java:528)
      at
    com.ibm.wmqfte.transfer.frame.impl.TransferFrameReceiverImpl$Chu
    nkProcessor.processCloseFileRequest(TransferFrameReceiverImpl.ja
    va:144)
      at
    com.ibm.wmqfte.transfer.frame.impl.TransferFrameIOWorker.doWorkI
    mpl(TransferFrameIOWorker.java:287)
      at
    com.ibm.wmqfte.io.impl.FTEFileIOWorker.doWork(FTEFileIOWorker.ja
    va:118)
      at
    com.ibm.wmqfte.io.impl.FTEFileIORequestQueue.run(FTEFileIOReques
    tQueue.java:244)
      at java.lang.Thread.run(Thread.java:825)
      at com.ibm.wmqfte.thread.FTEThread.run(FTEThread.java:70)
    
    -------------------------------------------------------------
    
    After the agent restarts, it resumes processing of the managed
    transfer, generates another ABEND file containing the same
    information as shown above, and shuts itself down again. This
    pattern of behaviour repeats until the managed transfer is
    cancelled.
    

Local fix

  • Look to set the LANG environment variable to a UTF-8 value. Then
    restart the agent
    
    eg.
    LANG=EN_GB
    export LANG
    fteStopAgent MFTAGENT0
    fteStartAgent MFTAGENT0
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of MQ Managed File Transfer, who have
    destination agents that are processing managed transfer requests
    where the destination filename contains an en-dash character
    ('?').
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When an MQ Managed File Transfer agent is acting as the
    destination agent for either a file-to-file or message-to-file
    transfer, it receives item data from the source agent and then
    write it to the destination file.
    
    Now, if the destination filename included the en-dash character
    ('?'), the destination agent would encounter an
    InvalidPathException containing the message:
    
    Malformed input or input contains unmappable characters:
    <filename>
    
    while issuing some delete commands as part of rename operations
    at the end of the managed transfer. In the exception message,
    the en-dash character in the filename would be replaced with a ?
    character.
    
    Because the agent was not expecting this exception, it shut
    itself down and generated an ABEND file containing information
    similar to the example below:
    
    -------------------------------------------------------------
    ...
    Thread:     63 (FileIOWorker-1:0)
    Class:      com.ibm.wmqfte.thread.FTEThread
    Instance:   4f49b3ff
    Method:     uncaughtException
    Probe:      ABEND_001
    Cause:      java.nio.file.InvalidPathException: Malformed input
    or input contains unmappable characters: /home/data/target/IBMMQ
    ? Test.txt
    java.nio.file.InvalidPathException: Malformed input or input
    contains unmappable characters: /home/data/target/IBMMQ ?
    Test.txt
            at sun.nio.fs.UnixPath.encode(UnixPath.java:162)
            at sun.nio.fs.UnixPath.<init>(UnixPath.java:86)
            at
    sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:294)
            at java.io.File.toPath(File.java:2282)
            at
    com.ibm.wmqfte.io.impl.FTEFileImpl.delete(FTEFileImpl.java:689)
            at
    com.ibm.wmqfte.io.impl.FTEFileImpl.renameTo(FTEFileImpl.java:779
    )
            at
    com.ibm.wmqfte.io.impl.FTEFileChannelImpl.complete(FTEFileChanne
    lImpl.java:593)
            at
    com.ibm.wmqfte.io.impl.FTEFileChannelImpl.close(FTEFileChannelIm
    pl.java:528)
            at
    com.ibm.wmqfte.transfer.frame.impl.TransferFrameReceiverImpl$Chu
    nkProcessor.processCloseFileRequest(TransferFrameReceiverImpl.ja
    va:144)
            at
    com.ibm.wmqfte.transfer.frame.impl.TransferFrameIOWorker.doWorkI
    mpl(TransferFrameIOWorker.java:287)
            at
    com.ibm.wmqfte.io.impl.FTEFileIOWorker.doWork(FTEFileIOWorker.ja
    va:118)
            at
    com.ibm.wmqfte.io.impl.FTEFileIORequestQueue.run(FTEFileIOReques
    tQueue.java:244)
            at java.lang.Thread.run(Thread.java:825)
            at
    com.ibm.wmqfte.thread.FTEThread.run(FTEThread.java:70)
    
    -------------------------------------------------------------
    
    Note that here the destination filename was actually:
    
    /home/data/target/IBMMQ ? Test.txt.
    
    and the en-dash character was replaced with a ? in the message
    associated with the InvalidPathException.
    
    
    When the agent was restarted, it tried to resume the managed
    transfer and encountered the same issue again. This caused it to
    generate another ABEND file before shutting itself down.
    

Problem conclusion

  • To resolve this issue, MQ Managed File Transfer has been updated
    so that destination agents now catch any InvalidPathExceptions
    thrown processing delete commands as part of rename operations,
    and mark the managed transfer as "Failed" with the following
    supplementary information:
    
    <supplement>BFGIO0416E: The file "<filename>" could not be
    deleted because the path string is invalid</supplement>
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.2 LTS   9.2.0.7
    v9.3 LTS   9.3.0.1
    v9.x CD    9.3.1
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT40532

  • Reported component name

    MQ BASE V9.2

  • Reported component ID

    5724H7281

  • Reported release

    920

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-04-06

  • Closed date

    2022-06-24

  • Last modified date

    2022-06-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    MQ BASE V9.2

  • Fixed component ID

    5724H7281

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"920","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
11 July 2022