Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351733 - Ecore Proxy resolution fails due to index out of bounds in BundleURLConverter
Summary: Ecore Proxy resolution fails due to index out of bounds in BundleURLConverter
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Windows XP
: P3 major
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 12:37 EDT by Matt Biehl CLA
Modified: 2011-07-18 05:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Biehl CLA 2011-07-11 12:37:00 EDT
Build Identifier: 20110301-1815

There is a problem in 
org.eclipse.acceleo.common.internal.utils.workspace.BundleURLConverter, line 194:
access to segments[pathStart] is out of bounds (see the attached screenshot).

This fails silently, due to an empty catch (RuntimeException exception) in EcoreUtil.resolve().

This proxy resolution is performed for the argumentType of the main Template in AcceleoService.doGenerate(), and the line "if (argumentType.isInstance(model))" 

As a result the model transformation cannot be called programmatically. It fails silently.

It is possible to run the transformation as a pure Java Application (without Eclipse).

Screenshot, see Forum: http://www.eclipse.org/forums/index.php/m/695260/#msg_695260

Reproducible: Always

Steps to Reproduce:
1. starting an Acceleo Model Transformation using java code from another plugin
2. the transformation should use a non-standard metamodel 
3.
Comment 1 Laurent Goubet CLA 2011-07-18 05:38:27 EDT
Matt,

This has been detected and fixed ... exactly the day after we built your version :p. The line your highlighted has been changed to "if (pathStart < segments.length && ".cp".equals(segments[pathStart]))" on the 2nd of march.

Please update your version of Acceleo to the official 3.1 release.