apache / apache/uima-uimaj

Creating a CAS with a classloader that has no access to org.apache.uima.jcas.cas breaks JCas

Open
#365 0 comments 0 reactions 1 assignee Claimed by @reckart View on GitHub
🦟 Bug
Dominant language
Java
Stars
71
Forks
39
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Creating a CAS with a classloader that has no access to `org.apache.uima.jcas.cas` breaks JCas.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a CAS using a resource manager that has an extension classloader set which has no access to `org.apache.uima.jcas.cas`
2. Try creating an annotation in that CAS using `CAS.createAnnotation`.
3. Exception that TOP cannot be found

**Expected behavior**
Should work. Actually, I think that well-known UIMA JCas classes should always be loaded through the UIMA frameworks's own classloader (e.g. the classloader for the CAS class) and not through the extension classloader.

**Please complete the following information:**
- Version: 3.5.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.