After simply adding a new entity and a relationship to an existing entity I get the following error:
Mar 24 12:54:47 TesteModelos[52428] INFO er.extensions.appserver.ERXApplication - Wonder version: 6.1.2-SNAPSHOT
Mar 24 12:54:47 TesteModelos[52428] INFO er.extensions.appserver.ERXApplication - Welcome to TesteModelos !
Mar 24 12:54:47 TesteModelos[52428] WARN er.extensions.eof.ERXModelGroup - Clearing previous class descriptions
Mar 24 12:54:47 TesteModelos[52428] DEBUG NSLog - Using JDBCPlugIn 'com.webobjects.jdbcadaptor.JDBCPlugIn' for JDBCAdaptor@218940734
Mar 24 12:54:47 TesteModelos[52428] DEBUG NSLog - Using JDBCPlugIn 'MySQLPlugIn' for JDBCAdaptor@1450090084
Mar 24 12:54:47 TesteModelos[52428] ERROR er.extensions.appserver.ERXApplication - TesteModelos failed to start.
ClassCastException: com.webobjects.eoaccess.EORelationship cannot be cast to com.webobjects.eoaccess._EOExpressionArray
at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2935)
at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2967)
at com.webobjects.eoaccess.EOAttribute._setDefinitionWithoutFlushingCaches(EOAttribute.java:2772)
at com.webobjects.eoaccess.EOAttribute.awakeWithPropertyList(EOAttribute.java:1217)
at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:830)
at er.extensions.eof.ERXModelGroup.modifyModelsFromProperties(ERXModelGroup.java:1146)
at er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:258)
at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:148)
... skipped 5 stack elements
at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:155)
at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:328)
at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:169)
at er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1300)
... skipped 13 stack elements
Mar 24 12:54:47 TesteModelos[52428] WARN NSLog - A fatal exception occurred: com.webobjects.eoaccess.EORelationship cannot be cast to com.webobjects.eoaccess._EOExpressionArray
[2014-3-24 12:54:47 BRT] <main>
java.lang.ClassCastException: com.webobjects.eoaccess.EORelationship cannot be cast to com.webobjects.eoaccess._EOExpressionArray
at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2935)
at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2967)
at com.webobjects.eoaccess.EOAttribute._setDefinitionWithoutFlushingCaches(EOAttribute.java:2772)
at com.webobjects.eoaccess.EOAttribute.awakeWithPropertyList(EOAttribute.java:1217)
at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:830)
at er.extensions.eof.ERXModelGroup.modifyModelsFromProperties(ERXModelGroup.java:1146)
at er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:258)
at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:155)
at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:328)
at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:169)
at er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
at com.webobjects.appserver.WOApplication.run(WOApplication.java:1229)
at er.extensions.appserver.ERXApplication.run(ERXApplication.java:1417)
at com.webobjects.appserver.WOApplication.main(WOApplication.java:548)
at er.extensions.appserver.ERXApplication.main(ERXApplication.java:861)
at TesteModelos.app.Application.main(Application.java:15)
Since the new entity is a very simple one (a list of options for another entity) I chose to implement it as a ERXGenericRecord. If I remove the relationship the application will start.