It appears one key differences now between Dev (code errors ) and Prod(code
runs) envs is that in the CTAKES_HOME variable inside a script for the Java
Class Path, there is a -cp path to:
/opt/xyzapp/nlp/c-takes/nlp/apache-ctakes-src/ctakes-distribution/target/apache-ctakes-4.0.0.1/lib
which is present in Prod and not in Dev...
This subfolder contains a bin directory, which contains : ant, ant.bat,
OpenCmd.bat, runctakesCPE.bat , and matching .sh scripts
Do you know if there is some build step in which the apache 4.0.0.1 binary is
supposed to be pulled down in combo with the source code, and/or what is
accounting for why this is not present in our Dev system but is in Prod?
Thanks,
Ryan
From: Ryan Swenson
Sent: Tuesday, July 30, 2024 1:31 PM
To: dev@ctakes.apache.org
Subject: Error running Apache cTakes Pipeline
Hello,
I currently inherited an existing Apache cTakes Pipeline Application from a
previous developer who is no longer with the parent organization I am
supporting in the Molecular Genetics space. The organization has a built and
runnable code, running on a scheduled basis in production. Separately, in a
Development environment we are wanting to address defects, add new features,
and also address security exceptions and vulnerabilities which we can later QA
and roll into Production.
At the moment in Development we are experiencing an error in trying to run our
Apache cTakes pipeline with the same sources and binaries taken from prod.
Both Dev and Prod are using Maven 3.9.8 for building and JDK 8 for build and
execution.
The specific error (some info redacted for sensitivity , some for brevity) is:
Exception in thread "main"
org.apache.uima.resource.ResourceInitializationException: Initialization of CAS
Processor with name "XYZ Aggregate Engine" failed.
Caused by: org.apache.uima.resource.ResourceInitializationException:
Initalization of annotator class "com.xyz.XyzSetenceRegexAnnotator" failed.
(Descriptor:
file:/opt/xyzapp/scripts/resources/cTakes/desc/XyzSetenceRegexAnnotator.xml)
... 8 more
Caused by: org.springframework.beans.factory.access.BootstrapException: Unable
to initialize group definition. Group resource name [classpath*
org/apache/ctakes/ytex/uima/beanRefContext.xml]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name "ytexApplicationContext" defined in URL [jar:
/opt/xyzapp/nlp/nlp-c-takes/apache-ctakes-4.00.1-src/ctakes-distribution/target/apache-ctakes-4.0.0.1-jar-with-dependencies.jar!/org/apache/ytex/uima/beanRefContext.xml]:
Instantiation of bean failed Unable to locate Spring NamespaceHandler
for XML schema namespace [http://www.springframework.org/schema/aop] offending
resource: class path resource [org/apache/ctakes/ytex/beans-kernel.xml]
...41 more ...
To execute I run:
Java -cp
"/opt/xyzapp/scripts/resources/*:/opt/xyzapp/nlp/nlp-c-takes/apache-ctakes-4.0.0.1-src/ctakes-distribution/target/*
-Dorg.apache-ctakes.ytex.conceptGraphDir='pwd' org.xyz.pipeline.RunCPE
/opt/xyzapp/scripts/resources/cTakes/CPEDescriptor.xml
I experience this error, if I take the
apache-ctakes-4.0.0.1-jar-with-dependencies.jar from Prod where the pipeline is
successfully running and place it in the target dir, and I also experience it
if I build in the development environment, and use the
apache-ctakes-4.0.0.1-jar-with-dependencies.jar produced in this target
directory.
I am also evaluating if the Production shell scripts used for setting
environment variables, paths, and the Java class path is the same ( which I
suspect is not).
If anyone can provide me with more clues or advice on this, I would greatly
appreciate it. The cTakes portion of this application and pipeline is 1 of 4x
separate applications, and if we are able to run/build cTakes we will be able
to proceed with maintaining the application portfolio.
Thanks,
Ryan