Menu

#10 ObjectUIDsChanger cannot find mapfile

Branch_1.4
accepted
None
8
2016-06-20
2015-10-19
No

Nice work with the 1.4.5 version!

Now my ObjectUIDsChanger fails with the message below. I assume this indicates that the mapFile property has not been set correctly. In my old properties file there is:

UIDTransformer.mapFile=/etc/DicomConfidential/UID.map

This does not appear to do the trick anymore. Is there an update to this property?

-Erling

Caused by: java.util.NoSuchElementException: null
at java.util.StringTokenizer.nextToken(StringTokenizer.java:349) ~[na:1.7.0_79]
at uk.ac.ed.dcmconf.transformer.object.ObjectUIDsChanger.readMapFile(ObjectUIDsChanger.java:120) ~[dcmconf-transformers.jar:1.4.5]
at uk.ac.ed.dcmconf.transformer.object.ObjectUIDsChanger.init(ObjectUIDsChanger.java:105) ~[dcmconf-transformers.jar:1.4.5]
at uk.ac.ed.dcmconf.transformer.object.ObjectUIDsChanger.<init>(ObjectUIDsChanger.java:79) ~[dcmconf-transformers.jar:1.4.5]</init>

Discussion

  • David Rodriguez

    David Rodriguez - 2015-10-19

    Thanks.

    From the Exception it looks the problem happens when parsing the file
    java.util.StringTokenizer.nextToken
    So it find the file, and it is parsing it. And it find some line that is not in the expected format.
    Is it possible that the UID.map file is corrupted?
    Could you try with a different file (like UID2.map)? if it can't find the file defined it should create it.

    Best

    David

     
  • Erling Andersen

    Erling Andersen - 2015-10-20

    You were quite right! There was a zero-length uid in the UID.map. Apparently the previous version didn't care.

    Thanks!

    -Erling

     
  • Erling Andersen

    Erling Andersen - 2015-10-30

    Unfortunately, this happened again. The original UID on line 4480 out of 5680 lines in UID.map ended up being blank. Just deleting the line fixed the problem here and now.
    However, it is curious that a blank UID could end up in the file. In particular it is not the last entry that is blank. How is it possible that more than 1000 entries are added to the file after the erroneous entry? Is the UID.map file written for each new UID entry, or are the new entries appended to the file?

    -Erling

     
  • David Rodriguez

    David Rodriguez - 2015-11-02

    OK. It seems there is some problem with the new version. I will have a look at it.
    The new entries are appended to the file, and kept in memory at the same time.
    But the mapping file is only read when loading the class, so the error will only
    happen on a new execution.

    David

     
  • David Rodriguez

    David Rodriguez - 2015-11-02
    • assigned_to: David Rodriguez
     
  • David Rodriguez

    David Rodriguez - 2015-11-02

    I haven't been able to reproduce your problem for the moment.
    My UID mapping file contains more than 20k entries.
    Nevertheless, I am going to introduce some extra checks and logging in the
    code.

     
  • Erling Andersen

    Erling Andersen - 2015-11-17

    This problem has now happened 5 times during the past two weeks. Would it be possible to introduce some logging to shed some light on the possible causes?

    -Erling

     
  • David Rodriguez

    David Rodriguez - 2015-11-17

    OK. I will do it later today.

    David

     
  • Erling Andersen

    Erling Andersen - 2016-06-20

    This problem continues to pop up every now and then. From the log file:

    FINEST|1257/0|Service DICOM Confidential Receiver 01|16-06-20 10:49:33|10:49:33.111 [pool-1-thread-1] DEBU
    G u.a.e.d.t.object.ObjectUIDsChanger - Checking if the attribute is a UID to be changed
    FINEST|1257/0|Service DICOM Confidential Receiver 01|16-06-20 10:49:33|10:49:33.111 [pool-1-thread-1] DEBUG u.a.e.d.t.object.ObjectUIDsChanger - UID already in the map, new UID is 2.16.578.1.37.1.1.1.617766931.1903981982.1465201647615.2745.0

    (Notice there is an empty UID in the last message).

    A normal entry would look like:

    FINEST|1257/0|Service DICOM Confidential Receiver 01|16-06-20 10:49:33|10:49:33.111 [pool-1-thread-1] DEBUG u.a.e.d.t.object.ObjectUIDsChanger - Checking if the attribute is a UID to be changed
    FINEST|1257/0|Service DICOM Confidential Receiver 01|16-06-20 10:49:33|10:49:33.111 [pool-1-thread-1] DEBUG u.a.e.d.t.object.ObjectUIDsChanger - UID 1.3.12.2.1107.5.2.30.25487.2016060114551864408406704 already in the map, new UID is 2.16.578.1.37.1.1.1.617766931.1903981982.1465201647615.2731.0

     
  • David Rodriguez

    David Rodriguez - 2016-06-20

    Hi,

    Can you please confirm if this corresponds to version 1.4.5 or 1.4.6?

    Thanks

    David

     
  • David Rodriguez

    David Rodriguez - 2016-06-20
    • Priority: 5 --> 8
     
  • David Rodriguez

    David Rodriguez - 2016-06-20
    • status: open --> accepted
     
  • Erling Andersen

    Erling Andersen - 2016-06-20

    This is version 1.4.5.

     
  • David Rodriguez

    David Rodriguez - 2016-06-20

    Thanks. I asked because I have reimplemented quite a lot of things in dcmconf-transformers in the new version.
    Anyway, I finally managed to reproduce the bug, and hopefully fix it. Thanks for the logs.
    I will upload a new patched version later today.

     

Log in to post a comment.

MongoDB Logo MongoDB