Skip to content

FileNotFoundException when building Indices #21

@dcronkite

Description

@dcronkite

I built a custom UMLS and then attempted to index the output using bin/create_indexes.bat, but ran into an issue:

Exception in thread "main" java.io.FileNotFoundException: C:\path\to\indices\meshtcrelaxed\postings (The system cannot find the path specified)
        at java.io.RandomAccessFile.open0(Native Method)
        at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:124)
        at irutils.MappedMultiKeyIndexDiskBasedGeneration.writeFinalIndex(MappedMultiKeyIndexDiskBasedGeneration.java:265)
        at gov.nih.nlm.nls.metamap.dfbuilder.BuildIndex.createIndex(BuildIndex.java:120)
        at gov.nih.nlm.nls.metamap.dfbuilder.BuildIndex.main(BuildIndex.java:155)

This seems to be caused by the containing directory (in my case, 'meshtcrelaxed') not existing when instantiating a new RandomAccessFile class here: https://github.com/lhncbc/metamaplite/blob/8aae39319a4a4b40a013180bf6cde09b172c78a8/src/main/java/irutils/MappedMultiKeyIndexDiskBasedGeneration.java#L265

If I manually create the containing directory C:\path\to\indices\meshtcrelaxed and then re-run, I don't encounter this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions