Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321879 - Suppres Interfaces option crashed orm.xml generation
Summary: Suppres Interfaces option crashed orm.xml generation
Status: CLOSED WONTFIX
Alias: None
Product: EMF
Classification: Modeling
Component: Teneo (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 10:01 EDT by Michał CLA
Modified: 2012-11-26 17:34 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał CLA 2010-08-05 10:01:32 EDT
Build Identifier: 20100218-1602

Suppres Interfaces option when is set on *.genmodel file sources generates fine.
But when i want to generate orm.xml using Teneo i get an error:
java.lang.ClassNotFoundException: 
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at org.eclipse.emf.teneo.jpa.GenerateORM.main(GenerateORM.java:67)
Aug 4, 2010 6:12:17 PM org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
INFO: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.emf.teneo.jpa.convert.ORMGenerator.convertPAnnotatedEClass(ORMGenerator.java:299)
	at org.eclipse.emf.teneo.jpa.convert.ORMGenerator.convertPAnnotatedEPackages(ORMGenerator.java:232)
	at org.eclipse.emf.teneo.jpa.convert.ORMGenerator.generateORM(ORMGenerator.java:193)
	at org.eclipse.emf.teneo.jpa.GenerateORM.createORMapperFile(GenerateORM.java:110)
	at org.eclipse.emf.teneo.jpa.GenerateORM.main(GenerateORM.java:78)


If this option is set to false and I regenerate the sources files orm.xml generates with out any problem.

My Ecore Model:

<?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="shop"
    nsURI="http://shop/1.0" nsPrefix="shop">
  <eClassifiers xsi:type="ecore:EClass" name="Producer">
    <eStructuralFeatures xsi:type="ecore:EReference" name="products" upperBound="-1"
        eType="#//Product" eOpposite="#//Product/producer"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Category">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isLeaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="hasHildren" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="childs" upperBound="-1"
        eType="#//Category"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="products" upperBound="-1"
        eType="#//Product" eOpposite="#//Product/category"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="MailBox">
    <eStructuralFeatures xsi:type="ecore:EReference" name="customer" lowerBound="1"
        eType="#//Customer" eOpposite="#//Customer/mailBox"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="notifications" upperBound="-1"
        eType="#//Notification"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Customer">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="sureName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="gender" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="birthDay" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="address" lowerBound="1"
        upperBound="2" eType="#//Address" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="basket" lowerBound="1"
        eType="#//Basket" eOpposite="#//Basket/customer"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="mailBox" lowerBound="1"
        eType="#//MailBox" eOpposite="#//MailBox/customer"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Basket">
    <eStructuralFeatures xsi:type="ecore:EReference" name="customer" lowerBound="1"
        eType="#//Customer" eOpposite="#//Customer/basket"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="orders" upperBound="-1"
        eType="#//Order"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Order">
    <eStructuralFeatures xsi:type="ecore:EReference" name="products" upperBound="-1"
        eType="#//Product"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Notification">
    <eOperations name="getAllNotifications">
      <eParameters name="from" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//NotificationType"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="content" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ProductQuantity">
    <eStructuralFeatures xsi:type="ecore:EReference" name="product" eType="#//Product"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="quantity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Product">
    <eStructuralFeatures xsi:type="ecore:EReference" name="producer" lowerBound="1"
        eType="#//Producer" eOpposite="#//Producer/products"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="category" lowerBound="1"
        eType="#//Category" eOpposite="#//Category/products"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Address">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isToCorrespondence" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="street" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="homeNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="apartmentNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="country" lowerBound="1"
        eType="#//Country" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Country">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        iD="true">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EEnum" name="NotificationType">
    <eLiterals name="INFO" literal="INFO"/>
    <eLiterals name="TRANSACTION_REJECTED" value="1"/>
    <eLiterals name="TRANSACTION_COMPLETE" value="2"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ProductDao">
    <eOperations name="getRandomProduct" eType="#//Product"/>
  </eClassifiers>
</ecore:EPackage>


Reproducible: Always

Steps to Reproduce:
1.Set "Suppres Interfaces" optoion on genmodel file to true
2.Try to generate ORM XML
3.
Comment 1 Micha&#322; CLA 2010-08-05 10:03:22 EDT
java.lang.ClassNotFoundException: 
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at org.eclipse.emf.teneo.jpa.GenerateORM.main(GenerateORM.java:67)
Aug 4, 2010 6:12:17 PM org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
INFO: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.emf.teneo.jpa.convert.ORMGenerator.convertPAnnotatedEClass(ORMGenerator.java:299)
	at org.eclipse.emf.teneo.jpa.convert.ORMGenerator.convertPAnnotatedEPackages(ORMGenerator.java:232)
	at org.eclipse.emf.teneo.jpa.convert.ORMGenerator.generateORM(ORMGenerator.java:193)
	at org.eclipse.emf.teneo.jpa.GenerateORM.createORMapperFile(GenerateORM.java:110)
	at org.eclipse.emf.teneo.jpa.GenerateORM.main(GenerateORM.java:78)
Comment 2 Martin Taal CLA 2012-11-26 17:34:00 EST
Teneo EclipseLink is no longer actively maintained, for using EMF with EclipseLink consider the EMF Texo project: http://wiki.eclipse.org/Texo