XHTML Errors (Potentially Related to Requirement Viewpoint or Null Pointers)

I get an error when I try and run a HTML Documentation Generation task (will post below) that I believe is either related to an object from the Requirements viewpoint add-on or a general null-pointer. Validating the model does not return any “null pointer” errors, and there is no reported error when validating just the Requirements folder.

I am curious if anyone else has seen the below error, and in general can provide me tips to better locate within my model null-pointing/invalid elements that could cause the below failure.

Current Environment: Capella 1.4.0; Java 1.8.0_51; Add-ons: Requirements, XHTML, Filtering (not referenced), System to Subsytem, PVMT, Teams For Capella.

error:

Blockquote
eclipse.buildId=unknown
java.version=1.8.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86_64

org.eclipse.egf.pattern
Error
Sun Nov 22 20:40:20 PST 2020

org.eclipse.egf.core.producer.InvocationException
at org.eclipse.egf.pattern.ftask.tasks.AbstractStrategyTask.doExecute(AbstractStrategyTask.java:83)
at org.eclipse.egf.task.internal.nature.TaskNatureJava.invoke(TaskNatureJava.java:64)
at org.eclipse.egf.producer.ftask.internal.invocation.TaskProductionInvocation.invoke(TaskProductionInvocation.java:55)
at org.eclipse.egf.producer.ftask.internal.manager.TaskManager.invoke(TaskManager.java:106)
at org.eclipse.egf.producer.fprod.internal.manager.ProductionPlanInvocationManager.invoke(ProductionPlanInvocationManager.java:113)
at org.eclipse.egf.producer.fprod.internal.manager.ProductionPlanManager.invoke(ProductionPlanManager.java:133)
at org.eclipse.egf.producer.internal.manager.FactoryComponentManager.invoke(FactoryComponentManager.java:135)
at org.eclipse.egf.producer.fprod.internal.manager.ProductionPlanInvocationManager.invoke(ProductionPlanInvocationManager.java:113)
at org.eclipse.egf.producer.fprod.internal.manager.ProductionPlanManager.invoke(ProductionPlanManager.java:133)
at org.eclipse.egf.producer.internal.manager.FactoryComponentManager.invoke(FactoryComponentManager.java:135)
at org.eclipse.egf.producer.fprod.internal.manager.ProductionPlanInvocationManager.invoke(ProductionPlanInvocationManager.java:113)
at org.eclipse.egf.producer.fprod.internal.manager.ProductionPlanManager.invoke(ProductionPlanManager.java:133)
at org.eclipse.egf.producer.internal.manager.FactoryComponentManager.invoke(FactoryComponentManager.java:135)
at org.polarsys.kitalpha.doc.gen.business.core.ui.helper.InvokeActivityHelper$2.run(InvokeActivityHelper.java:157)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.egf.model.pattern.PatternException: java.lang.NullPointerException
at org.eclipse.egf.pattern.common.java.AbstractJavaEngine.doExecute(AbstractJavaEngine.java:132)
at org.eclipse.egf.pattern.common.java.AbstractJavaEngine.executeWithInjection(AbstractJavaEngine.java:66)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.executeWithInjection(AbstractDomainVisitor.java:154)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.doProcess(AbstractDomainVisitor.java:136)
at org.polarsys.kitalpha.doc.gen.business.core.scope.SubClassEmfModelVisitorWithScoping.doProcess(SubClassEmfModelVisitorWithScoping.java:32)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:125)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.AbstractDomainVisitor.visit(AbstractDomainVisitor.java:126)
at org.eclipse.egf.pattern.strategy.domaindriven.DomainDrivenStrategy.execute(DomainDrivenStrategy.java:57)
at org.eclipse.egf.pattern.ftask.tasks.AbstractStrategyTask.doExecute(AbstractStrategyTask.java:78)
… 14 more
Caused by: java.lang.NullPointerException
at org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(ComposedAdapterFactory.java:334)
at org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(ComposedAdapterFactory.java:271)
at org.polarsys.kitalpha.doc.gen.business.core.util.LabelProviderHelper.getIItemLabelProvider(LabelProviderHelper.java:71)
at org.polarsys.kitalpha.doc.gen.business.core.util.LabelProviderHelper.getImage(LabelProviderHelper.java:75)
at org.polarsys.kitalpha.doc.gen.business.core.util.LabelProviderHelper.getImageFileName(LabelProviderHelper.java:85)
at org.polarsys.kitalpha.vp.requirements.docgen.utils.RequirementsServices.getImageLinkFromElement(RequirementsServices.java:276)
at org.polarsys.kitalpha.vp.requirements.docgen.helper.RequirementHelper.generateRequirementsOutgoingAllocation(RequirementHelper.java:220)
at org.polarsys.kitalpha.vp.requirements.docgen.helper.RequirementHelper.generateRequirementRelations(RequirementHelper.java:184)
at org.polarsys.kitalpha.vp.requirements.docgen.helper.RequirementHelper.generateRequirementsAllocationSection(RequirementHelper.java:163)
at org.polarsys.kitalpha.vp.requirements.docgen.content.RequirementDocgen.method_content(RequirementDocgen.java:118)
at org.polarsys.kitalpha.doc.gen.business.core.doccontent.ElementDocContent.orchestration(ElementDocContent.java:96)
at org.polarsys.kitalpha.vp.requirements.docgen.common.AbstractRequirementDocgen.orchestration(AbstractRequirementDocgen.java:70)
at org.polarsys.kitalpha.vp.requirements.docgen.content.RequirementDocgen.orchestration(RequirementDocgen.java:68)
at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.egf.pattern.common.java.AbstractJavaEngine.doExecute(AbstractJavaEngine.java:130)
… 28 more

Hi,

Your error seems linked with the Requirement viewpoint and its integration with de XHTML Docgen. The error may be in either of these addons. Can you please provide the exact versions of the addons you are using ?

Regards,
Arnaud

Hi Arnaud -

XHTML Docgen = https://download.eclipse.org/capella/addons/xhtmldocgen/updates/release/1.4.0 (via update site)

Requirements = 0.11.0.201911131733 (via drop-in)

Hi Brandon,

You are in the case of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=559015
It is not yet fixed.

If you want to pinpoint the elements causing this

  • Show the requirements VP elements in the Project explorer View (Filters and Customization > Uncheck Requirements VP Relations element
  • In your model, you can then find requirements relations that do not point to an element

image

If you have too much elements, try to use the interpreter view and an aql expression to find the elements that may cause this. Something like:

aql:self.eAllContents()->filter(Requirements::InternalRelation)->select(r | r.target == null or r.source == null).eContainer()

Regards,
Arnaud

Wow thank you Arnaund! I didn’t realize it was that bug - thank you :slight_smile:

If anyone else comes across this, I modified the aql expression aboe to AbstractRelation to check all relations types per the bug listed:

aql:self.eAllContents()->filter(Requirements::AbstractRelation)->select(r | r.target == null or r.source == null).eContainer()
Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.