Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351812

Summary: ClassCast exception on an almost empty transformation
Product: [Modeling] Epsilon Reporter: Federico Tomassetti <f.tomassetti>
Component: CoreAssignee: Antonio Garcia-Dominguez <agarcdomi>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: agarcdomi, dkolovos
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Files used to attempt to reproduce the bug none

Description Federico Tomassetti CLA 2011-07-12 06:34:47 EDT
I have this transformation:

pre {
  'Running ETL started'.println();
}

post {
  'Running ETL done'.println();
}

I run it refering to one model:
name: javamodel
meta-model is file based: YES
include external-references: YES
model-file: /it.polito.softeng.javamodel/src/it/polito/softeng/javamodel/model_out.xmi
meta-model-file: /it.polito.softeng.javamodel/src/it/polito/softeng/javamodel/JavaModel.ecore
Read on load: NO
Store on disposal: YES

the JavaModel.ecore:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="JavaModel"
    nsURI="http://softeng.polito.it/JavaModel" nsPrefix="javamodel">
  <eClassifiers xsi:type="ecore:EClass" name="CompilationUnit"/>
</ecore:EPackage>

Running this transformation I get:

java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.eclipse.emf.ecore.EObjectRunning ETL started
Running ETL done

My installation (Eclipse Indigo Modeling Win 32):
  Epsilon Core (Incubation)	0.9.0.201011251259	org.eclipse.epsilon.feature.feature.group	Eclipse.org
  Epsilon Concordance (Incubation)	0.9.0.201011251259	org.eclipse.epsilon.concordance.feature.feature.group	Eclipse.org
  EMF - Eclipse Modeling Framework SDK	2.7.0.v20110606-0949	org.eclipse.emf.sdk.feature.group	Eclipse Modeling Project  
  (I checked for updates)
Comment 1 Antonio Garcia-Dominguez CLA 2011-07-21 17:10:30 EDT
Federico, sorry for the late reply: I was busy going to several conferences.

I think this should still fail, as the user has not specified any transformation rules. However, the error message should be improved to explicitly say that no rules were defined.

I'll work on this next week, as I need to work on another project, but it should be pretty simple.
Comment 2 Antonio Garcia-Dominguez CLA 2011-08-31 04:37:48 EDT
Created attachment 202489 [details]
Files used to attempt to reproduce the bug

Federico, I have been unable to reproduce the bug using the latest SVN revision and the information you provided. I have attached the ETL transformation, a sample model (even though it is not read), and your ECore metamodel. I have also included a launch configuration according to your instructions.

Do these files match yours, or am I missing something?
Comment 3 Antonio Garcia-Dominguez CLA 2012-05-22 04:36:51 EDT
Closing this bug due to inactivity from the reporter.
Comment 4 Dimitris Kolovos CLA 2012-07-03 06:45:18 EDT
Closed as invalid.