Question about the type system

32 views
Skip to first unread message

Alex Judea

unread,
Nov 22, 2013, 10:42:37 AM11/22/13
to dkpro-w...@googlegroups.com
Hello,

I use your framework extensively. I always created and run my pipelines in the "examples" project you provide and everything worked fine. Today I moved one of them to my own project directory. When I run it I get the following exception:

Exception in thread "main" org.apache.uima.cas.CASRuntimeException: JCas type "de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData" used in Java code,  but was not declared in the XML type descriptor.
at org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:412)
at org.apache.uima.jcas.cas.TOP.<init>(TOP.java:92)
...

While I understand the problem (I think) I do not know how to solve it. I thought it may have something to do with missing dependencies, but looking at the pom.xml in the "examples" project I cannot see anything I am missing in my own pom.xml. 

What I actually wanted to do is to use my own type (in addition to WSDItem, WSDResult, and Sense) in the CAS. Therefore, I created a xml description (with the Eclipse UIMA tool) and JCasGen created the respective files for my new type. I moved the pipeline to my own project's directory so that it can see the type. Maybe there is a better way to introduce new types to your framework and I did something wrong here.

Regards,

Alex

Tristan Miller

unread,
Nov 22, 2013, 12:22:58 PM11/22/13
to dkpro-w...@googlegroups.com
Dear Alex,

On 22/11/13 04:42 PM, Alex Judea wrote:
> I use your framework extensively. I always created and run my pipelines
> in the "examples" project you provide and everything worked fine. Today
> I moved one of them to my own project directory. When I run it I get the
> following exception:
>
> Exception in thread "main" org.apache.uima.cas.CASRuntimeException: JCas
> type "de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData"
> used in Java code, but was not declared in the XML type descriptor.
> at org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:412)
> at org.apache.uima.jcas.cas.TOP.<init>(TOP.java:92)
> ...
>
> While I understand the problem (I think) I do not know how to solve it.
> I thought it may have something to do with missing dependencies, but
> looking at the pom.xml in the "examples" project I cannot see anything I
> am missing in my own pom.xml.

What version of DKPro WSD is your project using? The error you are
getting is commonly triggered by mixing incompatible versions of DKPro
Core, an artifact which DKPro WSD depends on. There is a bug in DKPro
WSD 0.9.1 which triggered this problem when certain modules are used
together, though it has been fixed in the latest snapshot
(0.9.2-SNAPSHOT). So if you are using 0.9.1, then you could try using
0.9.2-SNAPSHOT as an interim solution. The next formal release of DKPro
WSD (version 1.0.0) is expected to be made next week.

If you're already using 0.9.2-SNAPSHOT, then I'll need more information
to help track down your problem. Specifically, what are the parent
group and artifact IDs of your project? Perhaps the examples-gpl
project is inheriting dependencies from
de.tudarmstadt.ukp.dkpro.wsd:de.tudarmstadt.ukp.dkpro.wsd-gpl which
aren't being inherited by your project due to use of a different parent.

Regards,
Tristan

--
Tristan Miller, Research Scientist
Ubiquitous Knowledge Processing Lab (UKP-TUDA)
Department of Computer Science, Technische Universität Darmstadt
Tel: +49 6151 16 6166 | Web: http://www.ukp.tu-darmstadt.de/

signature.asc

Alex Judea

unread,
Nov 25, 2013, 6:32:47 AM11/25/13
to dkpro-w...@googlegroups.com
Dear Tristan,

I have to thank you a lot because your questions/hints resolved my problem :) My project had some wrong dependencies (I used a specific version for every dependency and not the managed version) and a wrong parent, namely de.tudarmstadt.ukp.dkpro.wsd instead of de.tudarmstadt.ukp.dkpro.wsd-gpl. After changing the parent and the version of DKPro WSD to 0.9.2 snapshot, everything works fine.

Thanks again,

Alex
Reply all
Reply to author
Forward
0 new messages