[furcas-discussion] NPE during ParserTextBlocksHandler.notifyModelElementResolvedOutOfContext

Thomas Goldschmidt thomas.goldschmidt at de.abb.com
Thu Feb 17 08:48:08 CET 2011


Hi Axel, 

If I see it right 
ParserTextBlocksHandler.notifyModelElementResolvedOutOfContext should be 
called after the DelayedReference has been resolved. Which also should 
have resulted in adding the element to the specified feature "revenues". 
Are you sure that revenues has set "containment = true"? In the current 
version in the repository this is false. Therefore, no resource will be 
set on that object. 

Cheers, 
Thomas

 
Thomas Goldschmidt 

ABB AG
Forschungszentrum
Wallstadter Straße 59
68526 Ladenburg
Office Phone: +49 6203 716134
Office Fax: +49 6203 716253
e-mail: thomas.goldschmidt at de.abb.com


ABB AG
Sitz/Head Office: Mannheim 
Registergericht/Registry Court: Mannheim
Handelsregisternummer/Commercial Register No.: HRB 4664
Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim 
Schneider, Markus Ochsner, Hans-Georg Krabbe
Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard 
Jucker

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
Weitergabe dieser Mail ist nicht gestattet. 

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden. 


"Uhl, Axel" <axel.uhl at sap.com> 
Sent by: furcas-discussion-bounces at lists.furcas.org 
16.02.2011 16:03 


To
furcas-discussion <furcas-discussion at lists.furcas.org> 
cc

Subject
[furcas-discussion] NPE during 
ParserTextBlocksHandler.notifyModelElementResolvedOutOfContext








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 
[attachment "BibtexWithComplexForeachPropertyInits.tcs" deleted by Thomas 
Goldschmidt/DEABB/ABB] _______________________________________________
Furcas-discussion mailing list
Furcas-discussion at lists.furcas.org
http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110217/eab3bab6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 454 bytes
Desc: not available
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110217/eab3bab6/attachment-0001.gif>


More information about the Furcas-discussion mailing list