Running IncQuery transformation inside an Eclipse WorkspaceJob [message #1059614] |
Mon, 20 May 2013 20:08 |
Joost van Pinxten Messages: 51 Registered: November 2012 |
Member |
|
|
I'm trying to use the IncQuery engine inside a WorkspaceJob, but I'm having difficulties instantiating the rules on the engine:
118890 [Worker-0] WARN org.eclipse.incquery.runtime.673132056 - The incremental pattern matcher encountered an error during executing a callback on insertion of match "experiment"=simpleTraceExperiment of pattern nl.esi.dset.dseir.transformation.experiment. Error message: null argument:Realm cannot be null. (Developer note: AssertionFailedException in org.eclipse.incquery.runtime.api.MatchUpdateAdapter@4acb029 called from CallbackNode)
org.eclipse.core.runtime.AssertionFailedException: null argument:Realm cannot be null
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.databinding.observable.ChangeManager.<init>(ChangeManager.java:37)
at org.eclipse.core.databinding.observable.AbstractObservable.<init>(AbstractObservable.java:29)
at org.eclipse.core.databinding.observable.value.AbstractObservableValue.<init>(AbstractObservableValue.java:42)
at org.eclipse.core.internal.databinding.property.value.SimplePropertyObservableValue.<init>(SimplePropertyObservableValue.java:50)
at org.eclipse.core.databinding.property.value.SimpleValueProperty.observe(SimpleValueProperty.java:70)
at org.eclipse.core.databinding.property.value.ValueProperty.observe(ValueProperty.java:107)
at org.eclipse.emf.databinding.internal.EMFValuePropertyDecorator.observe(EMFValuePropertyDecorator.java:109)
at org.eclipse.incquery.runtime.evm.specific.DefaultAttributeMonitor.observeAllAttributes(DefaultAttributeMonitor.java:94)
at org.eclipse.incquery.runtime.evm.specific.DefaultAttributeMonitor.registerFor(DefaultAttributeMonitor.java:70)
at org.eclipse.incquery.runtime.evm.api.RuleInstance$DefaultMatchAppearProcessor.activationMissing(RuleInstance.java:140)
at org.eclipse.incquery.runtime.evm.api.RuleInstance$DefaultMatchEventProcessor.processMatchEvent(RuleInstance.java:102)
at org.eclipse.incquery.runtime.evm.api.RuleInstance$DefaultMatchAppearProcessor.process(RuleInstance.java:147)
at org.eclipse.incquery.runtime.api.MatchUpdateAdapter.notifyAppearance(MatchUpdateAdapter.java:91)
at org.eclipse.incquery.runtime.internal.boundary.CallbackNode.update(CallbackNode.java:43)
at org.eclipse.incquery.runtime.rete.network.ReteContainer.messageConsumptionSingleThreaded(ReteContainer.java:457)
at org.eclipse.incquery.runtime.rete.network.Network.waitForReteTermination(Network.java:312)
at org.eclipse.incquery.runtime.rete.network.ReteContainer.flushUpdates(ReteContainer.java:335)
at org.eclipse.incquery.runtime.rete.network.ReteContainer.connectAndSynchronize(ReteContainer.java:173)
at org.eclipse.incquery.runtime.rete.matcher.RetePatternMatcher.connect(RetePatternMatcher.java:134)
at org.eclipse.incquery.runtime.rete.matcher.RetePatternMatcher.connect(RetePatternMatcher.java:155)
at org.eclipse.incquery.runtime.api.impl.BaseMatcher.addCallbackOnMatchUpdate(BaseMatcher.java:313)
at org.eclipse.incquery.runtime.evm.specific.rule.SimpleMatcherRuleInstance.prepareInstance(SimpleMatcherRuleInstance.java:45)
at org.eclipse.incquery.runtime.evm.specific.rule.SimpleMatcherRuleSpecification.instantiateRule(SimpleMatcherRuleSpecification.java:73)
at org.eclipse.incquery.runtime.evm.api.RuleBase.internalInstantiateRule(RuleBase.java:86)
at org.eclipse.incquery.runtime.evm.api.RuleBase.instantiateRule(RuleBase.java:78)
at org.eclipse.incquery.runtime.evm.api.RuleEngine.internalAddRule(RuleEngine.java:201)
at org.eclipse.incquery.runtime.evm.api.RuleEngine.addRule(RuleEngine.java:179)
...
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Which seems to be related to a dependency on the existence of a 'Realm' (whatever that is) for supporting the databinding features. However, I don't use any databinding or derived feature, just plain registered patterns. I'm simply creating a new executionEngine and try to add some rules to them.
I believe that 'headless' execution inside an RCP environment should be possible since April 4 (wiki), although I don't think that this is completely relevant for this situation.
I know that the ObservableCollectionHelper and ConstraintAdapter are refactored to use the EVM, but these are also called from the Handler (and thus the GUI thread), not from a WorkspaceJob or different thread. Is it at this moment possible to run the IQ engine outside the main thread? Same problem occurs when I try to initialize, use and run the engine inside a: new Thread(new Runnable(){});
Can you point me in the right direction? Thanks!
[Updated on: Mon, 20 May 2013 20:16] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03555 seconds