Ant build Failure with Nullpointer in TextGen

Hi,

We are running our tests as same as mbeddr does. 

But we are getting some toggling Exceptions in our server and it makes the build failure also. 

In the Generate section of test, the NPE is thrown from JavaNameUtil package

13:37:49  [generate] java.lang.NullPointerException
13:37:49  [generate] 	at jetbrains.mps.util.JavaNameUtil.nestedClassName(JavaNameUtil.java:97)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.ClassifierUnitContext.addDependency(ClassifierUnitContext.java:50)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.ClassifierUnitContext.getClassifierRefText(ClassifierUnitContext.java:41)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.BaseLanguageTextGen.getClassName(BaseLanguageTextGen.java:263)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.BaseLanguageTextGen.appendClassName(BaseLanguageTextGen.java:276)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.BaseLanguageTextGen.blClassifierRef(BaseLanguageTextGen.java:207)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.AnnotationInstance_TextGen.generateText(AnnotationInstance_TextGen.java:26)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenTransitionContext.generateText(TextGenTransitionContext.java:61)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenSupport.doAppendNode(TextGenSupport.java:156)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenSupport.appendNode(TextGenSupport.java:152)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.BaseLanguageTextGen.annotations(BaseLanguageTextGen.java:74)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.InstanceMethodDeclaration_TextGen.generateText(InstanceMethodDeclaration_TextGen.java:25)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenTransitionContext.generateText(TextGenTransitionContext.java:61)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenSupport.doAppendNode(TextGenSupport.java:156)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenSupport.appendNode(TextGenSupport.java:152)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.BaseClassConceptTextGen.members(BaseClassConceptTextGen.java:37)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.BaseClassConceptTextGen.membersWithBrackets(BaseClassConceptTextGen.java:19)
13:37:49  [generate] 	at jetbrains.mps.baseLanguage.textGen.ClassConcept_TextGen.generateText(ClassConcept_TextGen.java:61)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenTransitionContext.generateText(TextGenTransitionContext.java:61)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenSupport.doAppendNode(TextGenSupport.java:156)
13:37:49  [generate] 	at jetbrains.mps.text.impl.TextGenSupport.appendNode(TextGenSupport.java:152)
13:37:49  [generate] 	at jetbrains.mps.text.impl.RegularTextUnit.generate(RegularTextUnit.java:156)
13:37:49  [generate] 	at jetbrains.mps.text.TextGeneratorEngine$2.run(TextGeneratorEngine.java:112)
13:37:49  [generate] 	at jetbrains.mps.smodel.DefaultModelAccess.runReadAction(DefaultModelAccess.java:47)
13:37:49  [generate] 	at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:53)
13:37:49  [generate] 	at jetbrains.mps.smodel.ModelReadRunnable.run(ModelReadRunnable.java:46)
13:37:49  [generate] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
13:37:49  [generate] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
13:37:49  [generate] 	at java.lang.Thread.run(Thread.java:748)
13:37:49  [generate] 
13:37:50  [generate] ****************************************************************************************************
13:37:50  [generate] 	at jetbrains.mps.tool.builder.MpsWorker.failBuild(MpsWorker.java:222)
13:37:50  [generate] 	at jetbrains.mps.tool.builder.make.BaseGeneratorWorker.showStatistic(BaseGeneratorWorker.java:79)
13:37:50  [generate] 	at jetbrains.mps.tool.builder.make.GeneratorWorker.work(GeneratorWorker.java:86)
13:37:50  [generate] 	at jetbrains.mps.tool.builder.MpsWorker.workFromMain(MpsWorker.java:160)
13:37:50  [generate] 	at jetbrains.mps.tool.builder.make.GeneratorWorker.main(GeneratorWorker.java:99)
13:37:50  [generate] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:37:50  [generate] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
13:37:50  [generate] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:37:50  [generate] 	at java.lang.reflect.Method.invoke(Method.java:498)
13:37:50  [generate] 	at jetbrains.mps.tool.builder.AntBootstrap.main(AntBootstrap.java:29)
13:37:50  [generate] 


Do we want to configure something to escape from this Exception Failure?

Appreciate your help in this issue.

Thanks,
Narendran
1 comment
Comment actions Permalink

It's better to report issues like this one to youtrack tracker instead of this forum.

From the stacktrace, I can tell there's broken reference in some annotation on an instance method of some class. Take a look at the last transient model (the one that serves as an input for text generation), likely you'll see broken reference there.

0

Please sign in to leave a comment.