Framework with EOModel and custom classes

From: Guido Neitzer (guido.neitze..harmaline.de)
Date: Wed Aug 11 2004 - 04:13:58 EDT

  • Next message: Guido Neitzer: "Re: Framework with EOModel and custom classes"

    Hi.

    I know I'm doing something terribly wrong but I have no idea what - tired,
    blocked and stupid this morning ... :-(

    I want to do the following:

    - use a framework with an EOModel and all related classes
    - build an application that uses the framework

    So I have done the following:

    1. Created a WebObjects Framework in Eclipse.

    2. Imported an existing EOModel.

    3. Created a lots of classes with eogenerator.

    4. Created a new class called "TestDataCreator.java" in the framework

    5. Wrote some code in TestDataCreator.java that should access the model in
    the framework.

    Next, made an application:

    1. Changed the main component, added a WOHyperlink to an action that
    creates an instance of my TestDataCreator.

    2. Run the application, clicked the link:

    > java.lang.IllegalArgumentException: An object store for the entity
    > "EMUser" 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.

    Okay. I understand that the TestDataCreator class in my framework doesn't
    find the model which is in the same framework. Great. And now?

    The model, the TestDataCreator class, the custom classes from the model,
    the main component ... everything works fine when I create an application,
    include the model and all the java files there (even in packages). But it
    doesn't work from the framework.

    I'm sure I've forgot something ... but what?

    cug



    This archive was generated by hypermail 2.0.0 : Wed Aug 11 2004 - 04:14:00 EDT