Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Ruta Query view in Ruta 3.4.0-RC-1 #151

Closed
reckart opened this issue Jan 10, 2024 · 1 comment
Closed

Unable to use Ruta Query view in Ruta 3.4.0-RC-1 #151

reckart opened this issue Jan 10, 2024 · 1 comment
Assignees
Labels
🦟 Bug Something isn't working
Milestone

Comments

@reckart
Copy link
Member

reckart commented Jan 10, 2024

Describe the bug
When trying to use the Ruta query view in Eclipse, an exception is generated.

To Reproduce
Steps to reproduce the behavior:

  1. Install Ruta 3.4.0 RC 1
  2. Switch to Ruta perspective
  3. Locate the query view in the middle lower part of the screen
  4. Choose an XMI file in the "Query data" input field
  5. Choose a typesystem as well
  6. Press the green "play" button.

Expected behavior
Some kind of result - no error.

Screenshots

java.lang.NoClassDefFoundError: org/apache/uima/ruta/ReindexUpdateMode
	at java.base/java.lang.Class.getDeclaredFields0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3297)
	at java.base/java.lang.Class.getDeclaredFields(Class.java:2371)
	at org.apache.uima.fit.internal.ReflectionUtil.getFields(ReflectionUtil.java:59)
	at org.apache.uima.fit.internal.ReflectionUtil.getFields(ReflectionUtil.java:45)
	at org.apache.uima.fit.component.initialize.ConfigurationParameterInitializer.initialize(ConfigurationParameterInitializer.java:101)
	at org.apache.uima.fit.component.JCasAnnotator_ImplBase.initialize(JCasAnnotator_ImplBase.java:35)
	at org.apache.uima.ruta.engine.RutaEngine.initialize(RutaEngine.java:639)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.lambda$callInitializeMethod$2(AnalysisEngineImplBase.java:658)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.withContexts(AnalysisEngineImplBase.java:698)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.callInitializeMethod(AnalysisEngineImplBase.java:658)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:243)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:167)
	at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:97)
	at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:64)
	at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:284)
	at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:334)
	at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:449)
	at org.apache.uima.ruta.query.ui.QueryActionHandler$QueryHandlerJob.run(QueryActionHandler.java:193)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: org.apache.uima.ruta.ReindexUpdateMode cannot be found by org.apache.uima.ruta.engine_3.4.0
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:487)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 20 more

Please complete the following information:

  • Version: 3.4.0-RC-1
@reckart reckart added the 🦟 Bug Something isn't working label Jan 10, 2024
@reckart reckart added this to the 3.4.0 milestone Jan 10, 2024
@reckart reckart self-assigned this Jan 10, 2024
@reckart
Copy link
Member Author

reckart commented Jan 10, 2024

  • Install plugins into Eclipse IDE for Eclipse Committers
  • Open Host OSGi Console in Console view
  • Check who requires the org.apache.uima.ruta bundle and who provides it: inspect req osgi.wiring.package
    osgi.wiring.package; (&(osgi.wiring.package=org.apache.uima.ruta)(&(version>=3.4.0)(!(version>=4.0.0)))) resolved by:
    osgi.wiring.package; org.apache.uima.ruta 3.4.0 from org.apache.uima.ruta.core.ext_3.4.0 [582]
    
  • Check exported packages of org.apache.uima.ruta.core.ext_3.4.0 [582]: headers 582
    headers 582
    
    Bundle headers:
       ...
       Export-Package = org.apache.uima.ruta;version="3.4.0"
       ...
    
  • Check what is the ID of org.apache.uima.ruta.engine_3.4.0 (ss) and then what its header are: headers 583
    headers 583
    
     Bundle headers:
        ...
        Export-Package = org.apache.uima.ruta;version="3.4.0",...
        ...
    

Looks like we have two bundles exporting the org.apache.uima.ruta package and the "wrong" one is wired so the class we are looking for cannot be found.

reckart added a commit that referenced this issue Jan 10, 2024
- Make sure that ruta-ext Eclipse plugin does not export the  org.apache.uima.ruta package
- Bit of cleaning up
reckart added a commit that referenced this issue Jan 10, 2024
…ry-view-in-Ruta-3.4.0-RC-1

Issue #151: Unable to use Ruta Query view in Ruta 3.4.0-RC-1
@reckart reckart closed this as completed Jan 10, 2024
reckart added a commit that referenced this issue Jan 10, 2024
* main:
  Issue #157: Mark Maven Mojos as thread-safe
  Issue #155: UIMA Core plugins not found when installing Ruta
  Issue #152: Better error messages in query view
  Issue #151: Unable to use Ruta Query view in Ruta 3.4.0-RC-1

% Conflicts:
%	ruta-eclipse-feature/feature.xml
%	ruta-eclipse-update-site/category.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦟 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant