No such method org.apache.uima.cas.impl.TypeSystemImpl.createCallSite

23 views
Skip to first unread message

Alain Désilets

unread,
Jul 12, 2019, 11:40:52 AM7/12/19
to dkpro-core-developers
I am trying to use the bleeding edge version of dkpro-core (2.0.0-SNAPSHOT) in my project.

I have been able to build it, but when I run my project's unit tests, I get a bunch of errors which are generated when a JCas is generated. The errors look like this:

---------
java.lang.NoSuchMethodError: org.apache.uima.cas.impl.TypeSystemImpl.createCallSite(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/invoke/MutableCallSite;
at de.tudarmstadt.ukp.dkpro.core.api.frequency.tfidf.type.Tfidf.<clinit>(Tfidf.java:59)
at de.tudarmstadt.ukp.dkpro.core.api.frequency.tfidf.type.Tfidf_Type.<clinit>(Tfidf_Type.java:43)
at java.lang.Class.forName0(Native Method)
etc...
at org.apache.uima.fit.factory.JCasFactory.createJCas(JCasFactory.java:103)
etc...
---------

or like this

---------
java.lang.NoClassDefFoundError: Could not initialize class de.tudarmstadt.ukp.dkpro.core.api.frequency.tfidf.type.Tfidf_Type
at java.lang.Class.forName0(Native Method)
etc...
at org.apache.uima.fit.factory.JCasFactory.createJCas(JCasFactory.java:103)
etc...
---------

So obviously, createJCas() eventually ends up trying to create an instance of class Tfidf_Type, and this class does not exist. But I have searched through my whole Eclipse workspace (which includes all of dkpro-core and its modules) for an occurence of 'Tfidf_Type' and I can't find one.

The strange thing is that if I created a brand new Maven project which contains, then I am able to invoke createJCas() without problems.

Any idea what is going on here?

Thx.

Richard Eckart de Castilho

unread,
Jul 13, 2019, 3:56:51 PM7/13/19
to dkpro-core-developers
Hi Alain,

> On 12. Jul 2019, at 17:40, Alain Désilets <alainde...@gmail.com> wrote:
>
> I am trying to use the bleeding edge version of dkpro-core (2.0.0-SNAPSHOT) in my project.

This version builds against UIMAv3. If you want to use other DKPro projects like e.g. DKPro Similarity, it is a good idea to stick to the 1.11.x branch for the time being.

> I have been able to build it, but when I run my project's unit tests, I get a bunch of errors which are generated when a JCas is generated. The errors look like this:
>
> ---------
> java.lang.NoSuchMethodError: org.apache.uima.cas.impl.TypeSystemImpl.createCallSite(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/invoke/MutableCallSite;
> at de.tudarmstadt.ukp.dkpro.core.api.frequency.tfidf.type.Tfidf.<clinit>(Tfidf.java:59)
> at de.tudarmstadt.ukp.dkpro.core.api.frequency.tfidf.type.Tfidf_Type.<clinit>(Tfidf_Type.java:43)
> at java.lang.Class.forName0(Native Method)
> etc...
> at org.apache.uima.fit.factory.JCasFactory.createJCas(JCasFactory.java:103)
> etc...
> ---------
>
> or like this
>
> ---------
> java.lang.NoClassDefFoundError: Could not initialize class de.tudarmstadt.ukp.dkpro.core.api.frequency.tfidf.type.Tfidf_Type
> at java.lang.Class.forName0(Native Method)
> etc...
> at org.apache.uima.fit.factory.JCasFactory.createJCas(JCasFactory.java:103)
> etc...
> ---------

Probably you are mixing UIMAv2 and UIMAv3 code.

-- Richard

Reply all
Reply to author
Forward
0 new messages