Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336119 - NPE running Acceleo standalone
Summary: NPE running Acceleo standalone
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows Vista
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 13:06 EST by Ed Willink CLA
Modified: 2011-02-03 03:26 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-02-02 13:06:12 EST
Acceleo M5's custom URIConverter at

	tempBundle = AcceleoCommonPlugin.getDefault().getContext().getBundle(
						Long.valueOf(segments[i]));

invokes a plugin that is not initialised when running standalone.

Thread [main] (Suspended (exception NullPointerException))	
	BundleURLConverter.resolveBundle() line: 162	
	AbstractAcceleoGenerator$1.normalize(URI) line: 472	
	ResourceSetImpl.getResource(URI, boolean) line: 361	
	ResourceSetImpl.getEObject(URI, boolean) line: 216	
	EcoreUtil.resolve(EObject, ResourceSet) line: 202	
	EcoreUtil.resolve(EObject, EObject) line: 262	
	VariableImpl(BasicEObjectImpl).eResolveProxy(InternalEObject) line: 1483	
	VariableImpl(ETypedElementImpl).getEType() line: 321	
	VariableImpl.getType() line: 392	
	VariableImpl.getType() line: 1	
	MyGenerateXtextVisitors.<init>(EObject, File, List<Object>) line: 23	
	XtextVisitorCodeGenerator.invokeInternal(WorkflowContext, ProgressMonitor, Issues) line: 97	
	XtextVisitorCodeGenerator(AbstractWorkflowComponent).invoke(WorkflowContext, ProgressMonitor, Issues) line: 126	
	Mwe2Bridge.invoke(IWorkflowContext) line: 34	
	XtextVisitorCodeGenerator(AbstractWorkflowComponent).invoke(IWorkflowContext) line: 201	
	Workflow(AbstractCompositeWorkflowComponent).invoke(IWorkflowContext) line: 31	
	Workflow.run(IWorkflowContext) line: 19	
	Mwe2Runner.run(String, Map<String,String>, IWorkflowContext) line: 94	
	Mwe2Runner.run(String, Map<String,String>) line: 73	
	Mwe2Runner.run(URI, Map<String,String>, IWorkflowContext) line: 64	
	Mwe2Runner.run(URI, Map<String,String>) line: 55	
	Mwe2Launcher.run(String[]) line: 74	
	Mwe2Launcher.main(String[]) line: 35
Comment 1 Ed Willink CLA 2011-02-02 13:35:10 EST
Workaround:

a) diagnose problems by searching module for unresolved proxies

b) load the URIResourceMap with resolutions so that Acceleo doesn't get confused.
Comment 2 Laurent Goubet CLA 2011-02-03 03:26:51 EST
The BundleURLConverter is a class we use to resolve inter-plugin dependencies; it should never be used in standalone. This is a known oversight which will be fixed in the next milestone.