[furcas-discussion] NPE during ParserTextBlocksHandler.notifyModelElementResolvedOutOfContext
Uhl, Axel
axel.uhl at sap.com
Wed Feb 16 16:02:47 CET 2011
Hi,
I'm getting the below NPE while parsing the text
"article{ Shrt, \"John Doe\"}" +
"article{ Medium, \"John Doe\"}" +
"article{ LongLongLong, \"Jane Doll\"}" +
"author = \"John Doe\"." +
"author = \"Jane Doll\"."
for the mapping attached. The offending object is a RevenueLedger object for the "Shrt" article. The article reference for the RevenueLedger seems properly set. However, it isn't (yet?) entered into its supposed container object (should be the Author object for "John Doe"). This leads to a problem during identifying its resource set because its resource is determined as null.
Now I'm not sure if at this point in time during reference resolution the RevenueLedger object should already be hooked up with its container. If that can't be guaranteed at this point then the logic in notifyModelElementResolvedOutOfContext probably has to be considered a bug.
Suggestions?
-- Axel
Thread [main] (Suspended (breakpoint at line 118 in Query2OppositeEndFinder))
Query2OppositeEndFinder.navigateOppositePropertyWithBackwardScope(EReference, EObject) line: 118
ParserTextBlocksHandler.getTextBlockForElementAt(EObject, ANTLR3LocationToken) line: 656
ParserTextBlocksHandler.notifyModelElementResolvedOutOfContext(Object, Object, Token, DelayedReference) line: 550
BibtexWithComplexForeachPropertyInitsParser(ObservablePatchedParser).onRuleElementResolvedOutOfContext(Object, Object, ANTLR3LocationToken, DelayedReference) line: 111
BibtexWithComplexForeachPropertyInitsParser(ObservableInjectingParser).setDelayedReferencesAfterParsing() line: 683
ReferenceHandlerImpl.resolveRemainingReferences() line: 272
IncrementalParser.incrementalParse(TextBlock, boolean) line: 299
IncrementalParser.incrementalParse(TextBlock) line: 130
IncrementalParserFacade.parseIncrementally(TextBlock) line: 208
TestPropertyInitReEvaluationWithComplexForeach(AbstractReferenceResolvingTestWithTextBlocks).parseFile(String) line: 128
TestPropertyInitReEvaluationWithComplexForeach(AbstractReferenceResolvingTestWithTextBlocks).setupModelFromTextToParse(String) line: 117
TestPropertyInitReEvaluationWithComplexForeach.setupInitialModel() line: 72
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
FrameworkMethod$1.runReflectiveCall() line: 44
FrameworkMethod$1(ReflectiveCallable).run() line: 15
FrameworkMethod.invokeExplosively(Object, Object...) line: 41
RunBefores.evaluate() line: 27
RunAfters.evaluate() line: 31
BlockJUnit4ClassRunner.runChild(FrameworkMethod, RunNotifier) line: 76
BlockJUnit4ClassRunner.runChild(Object, RunNotifier) line: 50
ParentRunner$3.run() line: 193
ParentRunner$1.schedule(Runnable) line: 52
BlockJUnit4ClassRunner(ParentRunner<T>).runChildren(RunNotifier) line: 191
ParentRunner<T>.access$000(ParentRunner, RunNotifier) line: 42
ParentRunner$2.evaluate() line: 184
RunBefores.evaluate() line: 28
BlockJUnit4ClassRunner(ParentRunner<T>).run(RunNotifier) line: 236
JUnit4TestClassReference(JUnit4TestReference).run(TestExecution) line: 49
TestExecution.run(ITestReference[]) line: 38
RemotePluginTestRunner(RemoteTestRunner).runTests(String[], String, TestExecution) line: 467
RemotePluginTestRunner(RemoteTestRunner).runTests(TestExecution) line: 683
RemotePluginTestRunner(RemoteTestRunner).run() line: 390
RemotePluginTestRunner.main(String[]) line: 62
CoreTestApplication.run(Object) line: 23
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
EclipseAppContainer.callMethodWithException(Object, String, Class[], Object[]) line: 587
EclipseAppHandle.run(Object) line: 198
EclipseAppLauncher.runApplication(Object) line: 110
EclipseAppLauncher.start(Object) line: 79
EclipseStarter.run(Object) line: 369
EclipseStarter.run(String[], Runnable) line: 179
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
Main.invokeFramework(String[], URL[]) line: 619
Main.basicRun(String[]) line: 574
Main.run(String[]) line: 1407
Main.main(String[]) line: 1383
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BibtexWithComplexForeachPropertyInits.tcs
Type: application/octet-stream
Size: 2772 bytes
Desc: BibtexWithComplexForeachPropertyInits.tcs
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110216/5ec660ed/attachment.obj>
More information about the Furcas-discussion
mailing list