ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WP Roshan <suno...@gmail.com>
Subject Apache cTakes-3.2.3 - Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject ..... Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
Date Thu, 06 Oct 2016 11:33:24 GMT
Hi All,

I have slightly modified cTakes-3.2.3 "AggregatePlaintextUMLSProcessor.xml"
,in following location,

cTakes-3.2.3\ctakes-clinical-pipeline\desc\analysis_engine\AggregatePlaintextUMLSProcessor.xml

Original AggregatePlaintextUMLSProcessor.xml file had following directives
but commented. I just comment-off bellow directives because I need to get
concept annotated in CAS Visual Debugger (CVD) and as well as producing xmi
file running after ClinicalPipelineWithUmls.java file as standalone way.

Please note that without any modification to
AggregatePlaintextUMLSProcessor.xml file, CAS Visual Debugger (CVD) and
ClinicalPipelineWithUmls.java perfectly ran ( independently ) but did not
annotated any concept and concept types.

comment-off around line number 75
-------------------------------------------------------------------------------
<delegateAnalysisEngine key="AssertionAnnotator">
      <import
location="../../../ctakes-assertion/desc/AssertionMiniPipelineAnalysisEngine.xml"/>
</delegateAnalysisEngine>


comment-off around line number 161
-----------------------------------------------------------
<node>AssertionAnnotator</node>


comment-off around line number 217
-----------------------------------------------------------
<type
allAnnotatorFeatures="true">edu.mayo.bmi.uima.lookup.type.LookupWindowAnnotation</type>

But I got following issues when I ran CAS Visual Debugger (CVD) and
ClinicalPipelineWithUmls.java independently.

ClinicalPipelineWithUmls.java - Error occurred with modified
AggregatePlaintextUMLSProcessor.xml
#####################################################################################
Started org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls at Thu
Oct 06 16:09:33 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:
args[0]=../../../ctakes-clinical-pipeline/data/input/MS-Case-Study-1.txt
Outputting to directory:
args[1]=../../../ctakes-clinical-pipeline/data/output/xmi
06 Oct 2016 16:09:35  INFO LvgCmdApiResourceImpl - Loading NLM Norm and Lvg
with config file =
C:\eclipse-neon-work-space-1\cTakes-3.2.3\ctakes-lvg-res\target\classes\org\apache\ctakes\lvg\data\config\lvg.properties
06 Oct 2016 16:09:35  INFO LvgCmdApiResourceImpl -   config file absolute
path =
C:\eclipse-neon-work-space-1\cTakes-3.2.3\ctakes-lvg-res\target\classes\org\apache\ctakes\lvg\data\config\lvg.properties
06 Oct 2016 16:09:35  INFO LvgCmdApiResourceImpl - cwd =
C:\eclipse-neon-work-space-1\cTakes-3.2.3\ctakes-clinical-pipeline
06 Oct 2016 16:09:35  INFO LvgCmdApiResourceImpl - cd
C:\eclipse-neon-work-space-1\cTakes-3.2.3\ctakes-lvg-res\target\classes\org\apache\ctakes\lvg\
06 Oct 2016 16:09:36  INFO LvgCmdApiResourceImpl - cd
C:\eclipse-neon-work-space-1\cTakes-3.2.3\ctakes-clinical-pipeline
06 Oct 2016 16:09:36  INFO ClearNLPDependencyParserAE - using Morphy
analysis? true
Loading configuration.
Loading feature templates.
Loading lexica.
Loading model:
........................................................................................
06 Oct 2016 16:09:48  INFO Chunker - Chunker model file:
org/apache/ctakes/chunker/models/chunker-model.zip
06 Oct 2016 16:09:49  INFO ContextDependentTokenizerAnnotator - Finite
state machines loaded.
06 Oct 2016 16:09:49  INFO ConstituencyParser - Initializing parser...
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using left , right scope
sizes: 7 , 7
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using scope order: LEFT,RIGHT
06 Oct 2016 16:09:54  INFO ContextAnnotator - SCOPE ORDER: [1, 3]
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using context analyzer:
org.apache.ctakes.necontexts.negation.NegationContextAnalyzer
06 Oct 2016 16:09:54  INFO NegationContextAnalyzer - initBoundaryData()
called for ContextInitializer
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using context consumer:
org.apache.ctakes.necontexts.negation.NegationContextHitConsumer
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using lookup window type:
org.apache.ctakes.typesystem.type.textspan.Sentence
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using focus type:
org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation
06 Oct 2016 16:09:54  INFO ContextAnnotator - Using context type:
org.apache.ctakes.typesystem.type.syntax.BaseToken
06 Oct 2016 16:09:54  INFO AssertionAnalysisEngine - scope model file:
/C:/eclipse-neon-work-space-1/cTakes-3.2.3/ctakes-assertion-res/target/classes/org/apache/ctakes/assertion/models/scope.model
06 Oct 2016 16:09:54  INFO AssertionAnalysisEngine - cue model file:
/C:/eclipse-neon-work-space-1/cTakes-3.2.3/ctakes-assertion-res/target/classes/org/apache/ctakes/assertion/models/cue.model
scope model:
/C:/eclipse-neon-work-space-1/cTakes-3.2.3/ctakes-assertion-res/target/classes/org/apache/ctakes/assertion/models/scope.model
Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.mitre.medfacts.i2b2.annotation.ScopeParser.<init>(ScopeParser.java:22)
at
org.apache.ctakes.assertion.medfacts.AssertionAnalysisEngine.initialize(AssertionAnalysisEngine.java:121)
at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:250)
at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:156)
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:269)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:387)
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:269)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:387)
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:269)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:387)
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:269)
at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:314)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:425)
at org.apache.uima.fit.pipeline.JCasIterable.iterator(JCasIterable.java:76)
at
org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls.main(ClinicalPipelineWithUmls.java:76)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 47 more


CAS Visual Debugger (CVD) - Error occured with modified
AggregatePlaintextUMLSProcessor.xml
###################################################################################################
10/6/16 3:58:28 PM - 16:
org.apache.uima.tools.cvd.MainFrame.handleException(528): SEVERE:
scala/ScalaObject
java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.mitre.medfacts.i2b2.annotation.ScopeParser.<init>(ScopeParser.java:22)
at
org.apache.ctakes.assertion.medfacts.AssertionAnalysisEngine.initialize(AssertionAnalysisEngine.java:121)
at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:250)
at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:156)
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:269)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:387)
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:269)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:387)
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:269)
at
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:354)
at org.apache.uima.tools.cvd.MainFrame.setupAE(MainFrame.java:1484)
at org.apache.uima.tools.cvd.MainFrame.loadAEDescriptor(MainFrame.java:476)
at
org.apache.uima.tools.cvd.control.AnnotatorOpenEventHandler.actionPerformed(AnnotatorOpenEventHandler.java:52)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 77 more


I added following Scala dependency to
cTakes-3.2.3\ctakes-clinical-pipeline\pom.xml
cTakes-3.2.3\ctakes-assertion\pom.xml and as well as cTakes-3.2.3\pom.xml
file and ran "mvn clean install -U -DskipTests" command and build was
success.

<!--
https://mvnrepository.com/artifact/org.scala-tools.sbinary/sbinary_2.9.0 -->
<dependency>
  <groupId>org.scala-tools.sbinary</groupId>
  <artifactId>sbinary_2.9.0</artifactId>
   <version>0.4.0</version>
</dependency>

But either issues not solved but because of modified
AggregatePlaintextUMLSProcessor.xml file. My key requirement is concept
annotated in CAS visual debugger & and generated in xmi file when ran
after ClinicalPipelineWithUmls.java file.

Anyone noted and do have solution for this?

W.P.Roshan
--
SunONE

Mime
View raw message