I cannot generate SQL for an EO Model in a framework project. It seems
like the problem may be (?) that the EO's .java file is being
parsed/loaded before the EO model file. The full stacktrace is below,
but the root of the problem is the initialization of the following
static variable on the EO SourceDnd:
public static final SourceDnd DARTMOUTH_DND =
SourceDnd.sourceDndById(Integer.valueOf(1));
The method SourceDnd.sourceDndById is nothing fancy; it does a simple
fetch via EOUtilities:
return (SourceDnd) EOUtilities.objectMatchingKeyAndValue(ec,
SourceDnd.ENTITY_NAME, SourceDnd.ID_KEY, id);
Mac OS 10.4.10; WO 5.3; Eclipse 3.3.1 (M20070921-1145), WOLips 3.3.4335.
I'm stumped.
zak.
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:307)
at
com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:291)
at
com.webobjects.eoaccess.EOModel._setEntityForEntityNameClassName(EOModel.java:1242)
at
com.webobjects.eoaccess.EOModel._addFakeEntityWithPropertyList(EOModel.java:1280)
at
com.webobjects.eoaccess.EOModel._initWithTableOfContentsPropertyListPathURL(EOModel.java:1092)
at com.webobjects.eoaccess.EOModel.<init>(EOModel.java:802)
at
com.webobjects.eoaccess.EOModelGroup.addModelWithPathURL(EOModelGroup.java:498)
at
org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGenerator.<init>(EOFSQLGenerator.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory.sqlGenerator(EOFSQLGeneratorFactory.java:33)
at
org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generateSql(Unknown
Source)
at
org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.IllegalArgumentException: An object store for the
entity "SourceDnd" could not be found. Verify that the entity is defined
in an EOModel, and that the model is installed properly. To see what
models are loaded, you can try printing the return value of
EOModelGroup.defaultGroup() in your application.
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:536)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4114)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4500)
at
com.webobjects.eoaccess.EOUtilities.objectsMatchingValues(EOUtilities.java:193)
at
com.webobjects.eoaccess.EOUtilities.objectsMatchingKeyAndValue(EOUtilities.java:168)
at
com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue(EOUtilities.java:290)
at edu.dartmouth.dltg.pns.eos.SourceDnd.sourceDndById(SourceDnd.java:45)
at edu.dartmouth.dltg.pns.eos.SourceDnd.<clinit>(SourceDnd.java:20)
... 18 more
This archive was generated by hypermail 2.0.0 : Tue Nov 13 2007 - 11:41:39 EST