"Type not found in type system" using UIMA CAS JSON via remote API

6 views
Skip to first unread message

Samuel Glowka

unread,
Oct 20, 2025, 5:57:22 AMOct 20
to inception-users
Hi,

I'm currently stuck with the following problem:

I used the remote API to create a new project and imported a document. Now I want to add pre-annotations in the UIMA CAS JSON format looking like this (created with dkpro in Python):

{
"%TYPES": {
        "webanno.custom.Annotationsrichtlinie_v0_100_1": {
            "%NAME": "webanno.custom.Annotationsrichtlinie_v0_100_1",
            "%SUPER_TYPE": "uima.tcas.Annotation",
            "%DESCRIPTION": "Custom annotation for 'Text'",
            "value": {
                "%NAME": "value",
                "%RANGE": "uima.cas.String"
            }
        }
  },
"%FEATURE_STRUCTURES": [
        {
            "%ID": 1,
            "%TYPE": "uima.cas.Sofa",
            "sofaNum": 1,
            "sofaID": "_InitialView",
            "mimeType": "text/plain",
            "sofaString": "Achacius Berolczhaimer [...]"
        },
        {
            "%ID": 2,
            "%TYPE": "webanno.custom.Annotationsrichtlinie_v0_100_1",
            "value": "Person",
            "begin": 0,
            "end": 22,
            "@sofa": 1
        },
        ...
  ],
"%VIEWS": {
        "_InitialView": {
            "%SOFA": 1,
            "%MEMBERS": [
                2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
            ]
        }
    }
}

But I always get the following 500 error: 
Internal server error: Type not found in type system: webanno.custom.Annotationsrichtlinie_v0_100_1\n

at the position of the first annotation span ("%ID: 2").

I can see that after the upload of the source document (which already included the "%TYPES" section no according layer (and its feature) is created. Is that the problem? If so, how can I create the layer via the remote API?

Kind regards,
Samuel

Richard Eckart de Castilho

unread,
Oct 20, 2025, 12:40:20 PMOct 20
to incepti...@googlegroups.com
Hello Samuel,

> On 20. Oct 2025, at 11:57, Samuel Glowka <samuel...@gmail.com> wrote:
>
> I can see that after the upload of the source document (which already included the "%TYPES" section no according layer (and its feature) is created. Is that the problem? If so, how can I create the layer via the remote API?

The only way to yet up layers via the remote API is currently to

1) set up a project with your layers in the web UI
2) export that project
3) import is as a new project via the remote API

And yes, the layers need to be set up before importing CAS files that use them.
The CAS files are only able to capture UIMA type information, but INCEpTION layers
have additional settings beyond UIMA type information. So exporting a
template project is currently the best way.

Cheers,

-- Richard

Samuel Glowka

unread,
Oct 24, 2025, 7:02:11 AMOct 24
to inception-users
Many thanks! I'll try that!

Best regards,
Samuel
Reply all
Reply to author
Forward
0 new messages