Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351812 - ClassCast exception on an almost empty transformation
Summary: ClassCast exception on an almost empty transformation
Status: CLOSED INVALID
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Antonio Garcia-Dominguez CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 06:34 EDT by Federico Tomassetti CLA
Modified: 2012-07-03 06:45 EDT (History)
2 users (show)

See Also:


Attachments
Files used to attempt to reproduce the bug (1.58 KB, application/zip)
2011-08-31 04:37 EDT, Antonio Garcia-Dominguez CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.