java.lang.ArrayIndexOutOfBoundsException trying to open dslr files in eclipse

150 views
Skip to first unread message

Vito De Tullio

unread,
Feb 6, 2020, 4:14:05 AM2/6/20
to Drools Usage
Hi
I'm using Eclipse (Version: 2019-12 (4.14.0) / Build id: 20191212-1212) and JBoss Drools (7.32.0.Final).
I've created a Drools Project, and a new Rule Resource following the wizard and checking the tick "Use a DSL".
A file .dslr is created.
If I try to open it, unfortunately, all I have is an error "Failed to create the part's controls" with the following stacktrace:

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at org.eclipse.swt.custom.StyledTextRenderer.getLineSize(StyledTextRenderer.java:309)
    at org.eclipse.swt.custom.StyledTextRenderer.reset(StyledTextRenderer.java:1330)
    at org.eclipse.swt.custom.StyledText.resetCache(StyledText.java:8093)
    at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:10301)
    at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:10472)
    at org.eclipse.jface.text.TextViewer.applyTextPresentation(TextViewer.java:4718)
    at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4768)
    at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(PresentationReconciler.java:562)
    at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:551)
    at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:547)
    at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(PresentationReconciler.java:121)
    at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2769)
    at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2810)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:663)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:368)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:613)
    at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:4015)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3485)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:64)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:454)
    at org.drools.eclipse.editors.AbstractRuleEditor.createPartControl(AbstractRuleEditor.java:79)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:227)
    at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:333)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:203)
    at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:315)
    at org.drools.eclipse.dsl.editor.DSLRuleEditor2.addPages(DSLRuleEditor2.java:64)
    at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:143)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:333)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:154)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:361)
    at jdk.internal.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:1002)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:967)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:331)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
    at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:1002)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:768)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:739)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:733)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:717)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:107)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:146)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4629)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:219)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:661)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:625)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:790)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:404)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1239)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3207)
    at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3112)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3110)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3080)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3071)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:570)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:525)
    at org.drools.eclipse.wizard.rule.NewRulePackagePage.finish(NewRulePackagePage.java:161)
    at org.drools.eclipse.wizard.rule.NewRulePackageWizard.performFinish(NewRulePackageWizard.java:50)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:832)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:472)
    at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
    at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
    at org.eclipse.jface.window.Window.open(Window.java:799)
    at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:260)
    at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:280)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
    at jdk.internal.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:318)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:252)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
    at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
    at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)


Can you help me about it?

Thanks

Joe Irudayaraj

unread,
Feb 6, 2020, 8:05:29 AM2/6/20
to Drools Usage
I doubt the drools plugin support the 2019 eclipse version, The last stable version is oxygen



--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/f87cd07e-46f4-449d-8fcc-60d5815a35a7%40googlegroups.com.

Vito De Tullio

unread,
Feb 6, 2020, 10:00:32 AM2/6/20
to Drools Usage
I found https://issues.redhat.com/browse/DROOLS-2793 ... this bug is from 2018...
should I ignore the eclipse plugin as is left bitrot? Is there some better approach to create / edit rules?
To unsubscribe from this group and stop receiving emails from it, send an email to drools...@googlegroups.com.

Joe Irudayaraj

unread,
Feb 6, 2020, 10:42:50 AM2/6/20
to Drools Usage
Regarding dslr files,The best bet would be Eclipse Oxygen,Not sure business central supports content assist.



To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/596923ed-576e-4ff0-b28d-c6ea0c2d2399%40googlegroups.com.

Emmanuel Ayodele

unread,
Sep 13, 2022, 2:51:24 PM9/13/22
to Drools Usage
There is a possibility that the selected editor is not correctly associated with the file type. 
To fix this go to Preferences>>General>>Editors>>File Association
for the *.dslr file type use Rule Editor. If it's not already on the list click on add and select from the list then set it to default. 

Reply all
Reply to author
Forward
0 new messages