UIMA Ruta version 3.1.0 - uima

I've upgraded the Uima Ruta version to 3.1.0 in Ruta Workbench.
I tried with normal Ruta project its working fine but while convert into maven project i'm getting below error.
Exception in thread "main" org.apache.uima.analysis_engine.AnalysisEngineProcessException: The JCAS cover class "org.apache.uima.ruta.type.TokenSeed_Type" could not be loaded.
at org.apache.uima.ruta.engine.RutaEngine.seedAnnotations(RutaEngine.java:947)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:906)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:692)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:318)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.apache.uima.ruta.ide.launching.RutaLauncher.processFile(RutaLauncher.java:242)
at org.apache.uima.ruta.ide.launching.RutaLauncher.main(RutaLauncher.java:191)
Caused by: org.apache.uima.cas.CASRuntimeException: The JCAS cover class "org.apache.uima.ruta.type.TokenSeed_Type" could not be loaded.
at org.apache.uima.jcas.impl.JCasImpl.getTypeInit(JCasImpl.java:461)
at org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:425)
at org.apache.uima.jcas.impl.JCasImpl.getCasType(JCasImpl.java:478)
at org.apache.uima.jcas.impl.JCasImpl.getAnnotationIndex(JCasImpl.java:1634)
at org.apache.uima.ruta.seed.TextSeeder.seed(TextSeeder.java:43)
at org.apache.uima.ruta.engine.RutaEngine.seedAnnotations(RutaEngine.java:945)
... 8 more
**Note:**I'm using Eclipse version 2019-09 and java 1.8.
Thanks in advance
ScreenShot FYI:

I assume that there are two different versions of UIMA Ruta involved.
One version is the version of the Ruta Workbench as seen in the screenshot in the question.
When you run a Ruta script/analysis engine in maven context, then the classpath of the maven dependencies is the relevant one. This means that you are somewhat independent of the installed plugins if you develop a UIMA/Ruta based maven project.
In your case, I assume that there is an old ruta version in the maven dependencies. Or there are several and the old one wins.

Related

UIMA Ruta, uimaFIT and DKPro: Which versions work together?

In the GSCL 2013 Ruta tutorial the versions of the components in the pom.xml are:
uimaj-core: 2.4.2
DKPro components: 1.5.0
ruta-core: 2.1.0
Now, I incremented the version numbers incrementally and found that version 1.8.0 of the DKPro components introduces the following exception:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.uima.cas.text.AnnotationIndex.withSnapshotIterators()Lorg/apache/uima/cas/FSIndex;
at org.apache.uima.fit.util.FSCollectionFactory$AnnotationIndexAdapter.iterator(FSCollectionFactory.java:821)
at de.tudarmstadt.ukp.dkpro.core.api.segmentation.SegmenterBase.process(SegmenterBase.java:145)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:378)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:298)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:568)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:410)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:343)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:150)
at de.tudarmstadt.ukp.tutorial.gscl2013.ruta.WhatAliceDoesExample.main(WhatAliceDoesExample.java:38)
In the last days I faced other version problems (see this question) with these components.
Can someone tell me what the most current versions of these components are that work together? Or maybe someone can give me his/her versions that he/she currently works with? I am also interested in the used eclipse version. Thank you very much. I am stuck with this issue for some time now.
Irrespective which version of DKPro Core or Ruta you use, it is a good idea to use a recent UIMA and uimaFIT version.
Note that there was an incompatible change with UIMA v3+ (uimaFIT v3+). E.g. DKPro Core 2.0.0 works with these new versions, but DKPro Core 1.x works only with UIMA v2 and uimaFIT v2. Presently (2019-10-26), there is no Ruta version compatible with UIMA v3.
Check the POM files of DKPro Core and Ruta which versions of UIMA and uimaFIT they use.
DKPro Core 2.0.0 ->
<uima.version>3.1.0</uima.version>
<uimafit.version>3.0.0</uimafit.version>
DKPro Core 1.11.0 (note change in group ID in this version) ->
<uima.version>2.10.3</uima.version>
<uimafit.version>2.4.0</uimafit.version>
DKPro Core 1.10.0 ->
<uima.version>2.10.2</uima.version>
<uimafit.version>2.4.0</uimafit.version>
DKPro Core 1.8.0 ->
<uima.version>2.8.1</uima.version>
<uimafit.version>2.2.0</uimafit.version>
Ruta 2.7.0
<uimaVersion>2.10.3</uimaVersion>
<uimafit-version>2.4.0</uimafit-version>
As for Eclipse: I'd just use the most recent version. If you experience trouble with Ruta in the latest Eclipse versions, best report it on the UIMA users' mailing list.

While upgrading to jdk7 to jdk11 with wildfly16 drools are not working

Hi I am having following configuration:
java version-jdk11
server-wildfly16
jars-drools 6.0 and ecj 4.6.1
in server location: C:\wildfly-16.0.0.Final\modules\org\eclipse\jdt\main
I am having jar: jasper-jdt-6.0.29
having an ear.
but after deploying my application opens though when i check rules so drls not working.
below error i am getting..
/servlet/com.fourcs.clm.iwarranty.eclaims.dataview.servlets.ClaimSearchServlet
Path Info:null
Query String:null
Stack Trace:
java.lang.NoSuchFieldError: compilation_beginningToCompile
at deployment.CLMEAR.ear//org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428)
at deployment.CLMEAR.ear//org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417)
at deployment.CLMEAR.ear//org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:405)
at deployment.CLMEAR.ear//org.drools.compiler.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at deployment.CLMEAR.ear//org.drools.compiler.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:405)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:110)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageBuilder.compileAll(PackageBuilder.java:1334)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageBuilder.compileRules(PackageBuilder.java:1058)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:972)
I tried upgrading jar version ecj 4.3.1 to 4.6.1 but that also not worked.
How to resolve this error. Any idea?
If you look on the drools usage forums, you can find that Drools does not work with JDK11.
Drools 6 works with JDK7, but that version is from 2013. Latest Drools versions (7.X) work on WildFly 10 to 14 with JDK8.

Selecting exact Groovy version in Eclipse Juno

In Eclipse Juno when I try to run Groovy source (that has a main method inside of it) I get:
Caught: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.3.4 and you are trying to load version 2.3.3
Google, surprisingly, turned up nothing. When I go to Project >> Properties >> Groovy Compiler I see that my Groovy compiler is at 2.3, but it doesn't give me the option to select 2.3.3 or 2.3.4.
Any ideas what the fix is?
There is no fix for that. Each groovy-eclipse compiler is a version tweaked to work with eclipse JDT and whatnot. You can try to use other groovy-eclipse versions, which might feature the groovy version you need

Drools Java 7 support in Eclipse

I created a Drools project in Eclipse (Indigo) configured to use JRE 1.7. But I get an error pointing to my .drl file:
com/sample/DroolsTest$Message : Unsupported major.minor version 51.0
The com.sample.DroolsTest.Message class is imported by the .drl file. The Drools runtime was 5.2.1 (also tried with 5.3.0.Final).
Any help would be appreciated. Thanks.
This exception doesn't seem to have to do anything with Drools in particular, but is a generic Java error. It occurs if you try to execute a Java class with a JRE that is older than the JDK that was used to compile it. For example, if you compiled the class with a JDK7 and then tried to execute it with a JDK6, you would get this error.
Just to detail above answer and comment. I had both JRE6 and JRE7 installed, with JRE7 being the default. I had to do two things to remove the error from the drools sample project.
Set the JRE for the project to 1.6
Project properties->Java Build Path->Libraries. Remove JRE System Library 1.7 and Add Library->JRE System Library->Alternate JRE->JRE6
Set the compiler compliance level for the project at 1.6.
Project properties->Java Compiler->check Enable Project specific settings and set Compiler compliance level at 1.6.

Using AspectJ/AJDT in RAD 7.5.5

I'm using RAD 7.5.5. I installed AJDT plugin from the download site:
http://archive.eclipse.org/tools/ajdt/34/update/
I converted one of the existing Java projects to an AspectJ project, added an aspect to print log statements on method start and end of a methodA(), rebuilt the project and deployed.
I'm getting the below exception when methodA() is called:
Exception thrown : java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeMethodSig(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
I googled and found this could be caused because of an older version of aspectjrt.jar. But RAD extends Eclipse 3.4 and hence I added the version of AJDT plugin that is compatible with Eclipse 3.4 (/RAD 7.5.5). Any pointers to what could be the problem?
Make sure that aspectjrt.jar is on your classpath. Also, make sure that it is the aspectjrt.jar that comes with AJDT.