Uploaded image for project: 'cTAKES'
  1. cTAKES
  2. CTAKES-43

Spaces in directory names STILL cause problems for UIMA

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0-incubating
    • 3.0-incubating
    • None
    • None

    Description

      The following command works just fine for me:
      ~/bin/apache-uima-as-2.3.1/bin/runAE.sh -l en ~/bin/apache-uima-as-2.3.1/examples/descriptors/analysis_engine/NamesAndPersonTitles_TAE.xml ../test_data/ozborn/ ./

      The following fails due to spaces:
      ~/bin/apache-uima-as-2.3.1/bin/runAE.sh -l en "../ctakes_pipeline_root/clinical documents pipeline/desc/analysis_engine/AggregatePlaintextProcessor.xml" ../test_data/ozborn/ ./
      This is with bash 3.2.39 on Suse linux, but it also fails on my Ubuntu box as well. It doesn't work any better with single quotes.

      Also it should be pointed out that runAE.sh (the UIMA script which isn't handle spaces well) contains the $@ as shown below but still fails:

      "$UIMA_HOME/bin/runUimaClass.sh" org.apache.uima.tools.RunAE $@
      "~/bin/apache-uima-as-2.3.1/bin/runAE.sh"

      The way I have worked around this is to create a symbolic link using underscores to replace the spaces. However when I run this:
      ~/bin/apache-uima-as-2.3.1/bin/runAE.sh -l en ../ctakes_pipeline_root/clinical_documents_pipeline/desc/analysis_engine/AggregatePlaintextProcessor.xml ../test_data/ozborn/ ./

      I know get this error message:

      org.apache.uima.resource.ResourceInitializationException: Initialization of CAS Processor with name "UserAE" failed.
      at org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:83)
      at org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine(UIMAFramework_impl.java:420)
      at org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAFramework.java:821)
      at org.apache.uima.tools.RunAE.<init>(RunAE.java:216)
      at org.apache.uima.tools.RunAE.main(RunAE.java:419)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:98)
      Caused by: org.apache.uima.resource.ResourceConfigurationException: Initialization of CAS Processor with name "UserAE" failed.
      at org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1104)
      at org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(CPEFactory.java:550)
      at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java:253)
      at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.java:127)
      at org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:75)
      ... 9 more
      Caused by: org.apache.uima.resource.ResourceInitializationException: Annotator class "edu.mayo.bmi.uima.core.ae.OverlapAnnotator" was not found. (Descriptor: file:/home/AD/josborne/nlp/ctakes_pipeline_root/clinical_documents_pipeline/desc/analysis_engine/MaxLookupWindows.xml)
      at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:206)
      at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:155)
      at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
      at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
      at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:267)
      at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:361)
      at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
      at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
      at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
      at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
      at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
      at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
      at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:267)
      at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:361)
      at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
      at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
      at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
      at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
      at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
      at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
      at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:267)
      at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:312)
      at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:392)
      at org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1088)
      ... 13 more
      Caused by: java.lang.ClassNotFoundException: edu.mayo.bmi.uima.core.ae.OverlapAnnotator
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:164)
      at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:203)
      ... 36 more

      If I pass runAE.sh a different parameter set like this:
      ~/bin/apache-uima-as-2.3.1/bin/runAE.sh -l en ~/bin/apache-uima-as-2.3.1/examples/descriptors/analysis_engine/NamesAndPersonTitles_TAE.xml ../test_data/ozborn/ ./

      Then everything works fine, and it pulls titles out of my trial document.

      Any help would be greatly appreciated,

      -John

      --------------------------------------------------------------------------------

      Attachments

        Activity

          People

            chenpei Pei Chen
            chenpei Pei Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: