Hi Badeep, Thank you for your feedback.Answers for your questions are highlighted within yellow color brackets.
1) Which cTakes version are you installing ?? ( I'm using cTakes 3.1.0 ) If its cTakes 3.2.2 , i would recommend go for cTakes SNAPSHOT 3.2.3 , since a lot of bugs are fixed in it. 2) Also, When you put everything in a JAR (Same issue i had couple of days back), the code should treat file as a resource inside a JAR. Pleas make sure the piece of code that reads AggregatePlaintextUMLSProcessor should read it as a resource and not as a file. (Do you see any "URI is not hierarchical" error anywhere in the error logs? No ) I got some idea to resolve this from your feedback. but don't know whether it'll works. But anyway thanks & appreciate your help. Thanks Roshan On Wed, Sep 21, 2016 at 10:30 PM, Bandeep Singh <bsi...@phemi.com> wrote: > Hi Roshan, > > Couple of things here to notice. > > 1) Which cTakes version are you installing ?? If its cTakes 3.2.2 , i would > recommend go for cTakes SNAPSHOT 3.2.3 , since a lot of bugs are fixed in > it. > 2) Also, When you put everything in a JAR (Same issue i had couple of days > back), the code should treat file as a resource inside a JAR. Pleas make > sure the piece of code that reads AggregatePlaintextUMLSProcessor should > read it as a resource and not as a file. (Do you see any "URI is > not hierarchical" error anywhere in the error logs?) > > The reason why its works in eclipse is because the > AggregatePlaintextUMLSProcessor.xml file exists on the file system and not > inside the JAR. > > Hope that helps! > > Bandeep > > On Wed, Sep 21, 2016 at 12:12 AM, WP Roshan <suno...@gmail.com> wrote: > > > Hi All, > > > > I made a cTakes command line application using "ctakes\ctakes-clinical- > > pipeline\src\main\java\org\apache\ctakes\clinicalpipelineClinicalPipeli > > neWithUmls.java". > > It's perfectly running at the Eclipse environment with run-time > argument*. > > But when I deployed it as a jar with all the dependencies I got following > > exception. > > > > "Exception in thread "main" org.apache.uima.util.InvalidXMLException: An > > import could not be resolved. No .xml file with name > "desc/analysis_engine/ > > AggregatePlaintextUMLSProcessor" was found in the class path or data > > path. (Descriptor: <unknown>) " > > > > Note : I changed pom.xml file inside "ctakes-clinical-pipeline" directory > > so that it's able to build jar with all the dependencies. > > > > mvn clean install was successful. complete "mvn clean install" log > > attached herewith for anyone's reference. > > > > jar ran at the command prompt with argument as follows > > > > run-time arguments* > > args[0] = C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\data\ > > input\MS-pubmed-1.txt > > args[1] = C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\data\ > > output\xmi > > args[2] = C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\data\ > > output\topics\MS-pubmed-1-topics.txt > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ~~~~~~~~~~~~~~~~~~~~~~ > > Microsoft Windows [Version 6.1.7601] > > Copyright (c) 2009 Microsoft Corporation. All rights reserved. > > C:\Users\WPRoshan>cd C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\ > > target > > > > C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\target>java -classpath > > %CTAKES_HOME%\desc;%CTAKES_HOME%\resources;%CTAKES_HOME%\lib\* > > -Dlog4j.configuration=file:\ > > > > %CTAKES_HOME%\config\log4j.xml -Xms512M -Xmx3g -jar > > ctakes-clinical-pipeline-3.2.0-SNAPSHOT-jar-with-dependencies.jar > > C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\data\input\MS- > > > > pubmed-1.txt C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\data\ > output\xmi > > C:\EclipsProjects\ctakes\ctakes-clinical-pipeline\data\ > > output\topics\MS-pubmed-1-topics.txt > > Started org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls at > > Wed Sep 21 12:03:04 IST 2016 > > log4j: reset attribute= "false". > > log4j: Threshold ="null". > > log4j: Retreiving an instance of org.apache.log4j.Logger. > > log4j: Setting [ProgressAppender] additivity to [false]. > > log4j: Level value for ProgressAppender is [INFO]. > > log4j: ProgressAppender level set to INFO > > log4j: Class name: [org.apache.log4j.ConsoleAppender] > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" > > log4j: Setting property [conversionPattern] to [%m]. > > log4j: Adding appender named [noEolAppender] to category > > [ProgressAppender]. > > log4j: Retreiving an instance of org.apache.log4j.Logger. > > log4j: Setting [ProgressDone] additivity to [false]. > > log4j: Level value for ProgressDone is [INFO]. > > log4j: ProgressDone level set to INFO > > log4j: Class name: [org.apache.log4j.ConsoleAppender] > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" > > log4j: Setting property [conversionPattern] to [%m%n]. > > log4j: Adding appender named [eolAppender] to category [ProgressDone]. > > log4j: Level value for root is [INFO]. > > log4j: root level set to INFO > > log4j: Class name: [org.apache.log4j.ConsoleAppender] > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" > > log4j: Setting property [conversionPattern] to [%d{dd MMM yyyy HH:mm:ss} > > %5p %c{1} - %m%n]. > > log4j: Adding appender named [consoleAppender] to category [root]. > > Reading from directory: C:\EclipsProjects\ctakes\ > > ctakes-clinical-pipeline\data\input\MS-pubmed-1.txt > > Outputting to directory: C:\EclipsProjects\ctakes\ > > ctakes-clinical-pipeline\data\output\xmi > > Exception in thread "main" org.apache.uima.util.InvalidXMLException: An > > import could not be resolved. No .xml file with name > "desc/analysis_engine/ > > AggregatePlaintextUMLSProcessor" was found in the > > > > class path or data path. (Descriptor: <unknown>) > > at org.apache.uima.resource.metadata.impl.Import_impl. > > findAbsoluteUrl(Import_impl.java:107) > > at org.uimafit.factory.AnalysisEngineFactory. > > createAnalysisEngineDescription(AnalysisEngineFactory.java:109) > > at org.apache.ctakes.clinicalpipeline. > > ClinicalPipelineWithUmls.main(ClinicalPipelineWithUmls.java:76) > > > > > > Does anybody knows how to tackle this issue ? > > > > Thanks > > W.P.Roshan > > -- > > SunONE > > > -- SunONE