| Summary: | Suppres Interfaces option crashed orm.xml generation | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Michał <michal.bartoszewski> |
| Component: | Teneo | Assignee: | Martin Taal <mtaal> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| URL: | http://www.eclipse.org/forums/index.php?t=msg&goto=550961&S=55e956bc29ea2bc6da899fa32f9e4a7c#msg_550961 | ||
| Whiteboard: | |||
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) Teneo EclipseLink is no longer actively maintained, for using EMF with EclipseLink consider the EMF Texo project: http://wiki.eclipse.org/Texo |
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.