You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by "Johnsd11 (via GitHub)" <gi...@apache.org> on 2025/03/17 20:37:39 UTC
[I] [Question]: Error running Apache cTakes Pipeline [ctakes]
Johnsd11 opened a new issue, #33:
URL: https://github.com/apache/ctakes/issues/33
### What’s your question?
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.
### Context
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.
### What category does this question fall under?
Usage
### Contact Details
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@ctakes.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question]: Error running Apache cTakes Pipeline [ctakes]
Posted by "Johnsd11 (via GitHub)" <gi...@apache.org>.
Johnsd11 commented on issue #33:
URL: https://github.com/apache/ctakes/issues/33#issuecomment-2730853946
As far as I know, none of the [xyz] code that you are referencing comes from ctakes. You probably need to find out where that code came from - hopefully your organization has a good relationship with the previous developer or there is a user in your organization who is familiar with that code and its purpose. It is possible that there are comments in the scripts and/or code under the xyz directory that can point you in the correct direction. A web search for `ctakes "xyzapp"` came up empty, but that is as far as I went.
It is possible that somebody else monitoring this mailing list knows something about xyzapp. You could try writing or reposting with "What is XYZAPP" and see if it catches an eye.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@ctakes.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question]: Error running Apache cTakes Pipeline [ctakes]
Posted by "Johnsd11 (via GitHub)" <gi...@apache.org>.
Johnsd11 commented on issue #33:
URL: https://github.com/apache/ctakes/issues/33#issuecomment-2730843067
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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@ctakes.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question]: Error running Apache cTakes Pipeline [ctakes]
Posted by "Johnsd11 (via GitHub)" <gi...@apache.org>.
Johnsd11 commented on issue #33:
URL: https://github.com/apache/ctakes/issues/33#issuecomment-2730858063
t sounds like you just need to unpack the distributable version of ctakes. After you run "maven package" you should have the large zip files in the ctakes-dist/target/ directory. You want one without "-src" in its name.
Unzip that file into a new directory outside of the source directory. The files that come out of the zip are the ctakes installation - all of the libraries, scripts, and data that you need. Unless you are developing you can now ignore the source code directories. You can also download the zip file directly, without building through maven.
Here are the instructions for installing the ctakes binary. https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+4.0+User+Install+Guide
If you are able, I advise that you update to ctakes 5.1.0 after you have confirmed that 4.0.0.1 works in your dev. https://github.com/apache/ctakes/releases/tag/ctakes-5.1.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@ctakes.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question]: Error running Apache cTakes Pipeline [ctakes]
Posted by "Johnsd11 (via GitHub)" <gi...@apache.org>.
Johnsd11 commented on issue #33:
URL: https://github.com/apache/ctakes/issues/33#issuecomment-2730856549
I was able to run the pipeline yesterday afternoon. Here is how, and still a little baffled:
1) There is a noticeable difference in the built code environments in Dev and Prod: In Prod, under the exploded apache cTakes 4.0.01 src directory, is the module ctakes-distribution with a target/ctakes-4.0.0.1/lib directory with all of the maven library jar files, and above this path directly under the target directory, are the cTakes core Jar, tar.gz, zips that were generated. In Dev, there is no /target/ctakes-4.0.0.1 sub-directory, instead only the core jar, tar gz, zips that were generated.
2) I was able to run the cTakes pipeline only after I updated the class path to include /opt/apache-ctakes-4.0.0.1-src/ctakes-distribution/target/ctakes-4.0.0.1/lib/*, in addition to a location where we store all of the desc, dictionaries, hibernate connection properties, etc, and only after I copied the /target/ctakes-4.0.0.1-core-with-dependencies.jar into the /opt/apache-ctakes-4.0.0.1-src/ctakes-distribution/target/ctakes-4.0.01/lib/ path, now, the code runs perfectly fine. If I do not copy the core jar to this location, it cannot load the primary class which begins running the CPE processing to read the CPE descriptor file.
Now I need to likely create a new empty directory, expand source here, copy in our module + updated pom, and build to verify what got populated into the target sub-directory under ctakes-distribution. If I only produce the jars, then there is some missing build step, or otherwise missing details that I will need to figure out, to ensure we can build new code, and then run this code.
Yes - this xyzApp is a proprietary code module we wrote, and it is dependent on the other underlying out of the box cTake modules.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@ctakes.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question]: Error running Apache cTakes Pipeline [ctakes]
Posted by "Johnsd11 (via GitHub)" <gi...@apache.org>.
Johnsd11 closed issue #33: [Question]: Error running Apache cTakes Pipeline
URL: https://github.com/apache/ctakes/issues/33
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@ctakes.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org