probably should go in the wiki (if it's not already) ... this is a
response to someone else who asked about standalone entity modeler:
"No, but it has to be able to find model dependencies (for instance,
if you have cross-model relationships or use prototypes), so Entity
Modeler has to have some way to know where these other models are (Old
EOModeler used the PB.project file, but EOModeler would just happily
destroy your model in this circumstance if you tried to resave the
BusinessLogic model without your prototype model resolved). If your
model appears inside of an IDEA project, we will parse the IDEA
project metadata to try to find dependencies. If you load from inside
of Eclipse, we just use Eclipse's runtime dependency API's to find
them. If you run standalone but from inside of an Eclipse project, we
will parse Eclipse project files ourselves and try to find your
models. However, if you're running _completely_ standalone with no
workspace metadata, you have to tell Entity Modeler where these
dependencies are located (which unfortunately it doesn't even know
what the models ARE, just that it ends up with unresolved connections,
which are the errors you're seeing in that dialog).
Here is some info from a post a made on the mailing list a while back:
You can also setup a .EntityModeler.modelpath file that is searched
for in the following paths:
fillInSearchFolders(new File(selectedModelFolder,
"EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(selectedModelFolder,
".EntityModeler.modelpath"), searchFolders);
if (selectedModelFolder != null) {
fillInSearchFolders(new File(selectedModelFolder.getParentFile(),
"EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(selectedModelFolder.getParentFile(),
".EntityModeler.modelpath"), searchFolders);
}
fillInSearchFolders(new File(System.getProperty("user.home"),
"EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(System.getProperty("user.home"),
".EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(System.getProperty("user.home") + "/
Library", "EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(System.getProperty("user.home") + "/
Library", ".EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(System.getProperty("user.home") + "/
Library/Preferences", "EntityModeler.modelpath"), searchFolders);
fillInSearchFolders(new File(System.getProperty("user.home") + "/
Library/Preferences", ".EntityModeler.modelpath"), searchFolders);
Each line of the file should specify a path to search within to find
dependent models.
To be able to generate SQL and reverse engineer, you also need to
setup a .EntityModeler.classpath file:
fillInClasspathURLs(new File(modelFolder,
"EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(modelFolder,
".EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(modelFolder.getParent(),
"EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(modelFolder.getParent(),
".EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(System.getProperty("user.home"),
"EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(System.getProperty("user.home"),
".EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(System.getProperty("user.home") + "/
Library", "EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(System.getProperty("user.home") + "/
Library", ".EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(System.getProperty("user.home") + "/
Library/Preferences", "EntityModeler.classpath"), classpathUrls);
fillInClasspathURLs(new File(System.getProperty("user.home") + "/
Library/Preferences", ".EntityModeler.classpath"), classpathUrls);
where each line specifies the location a jar file that is required to
run SQL generation (wo jars, plugin jars + any other jars required to
bootstrap that process in your environment).
So for ERCoreBusinessLogic, you can put a file named
EntityModeler.modelpath in your home directory (or inside the eomodeld
folder) that just contains:
/Users/mschrag/Desktop/Wonder/Frameworks/Core/ERPrototypes/Resources/
erprototypes.eomodeld
You could also make one that just says:
/Users/mschrag/Desktop/Wonder
and let it include EVERYTHING in Wonder (and be slower to start up
because it has to scan), but you'll get some warnings because there
are test models in there as well. Of course, if you have a model with
no external dependencies, you can just open it (just like you could in
old EOModeler).
ms"
On May 25, 2009, at 12:40 PM, Eleni Manou wrote:
Hi All,
I try to alter a model using Entity Modeler as stand alone (not from
within eclipse). While I can add and alter Entities and save the
model, when I try to generate sql I get the message
There was no valid EOF ClassLoader factory defined!
Details
org.objectstyle.wolips.eomodeler.core.model.EOModelException: There
was no valid EOF ClassLoader factory defined.
at org.objectstyle.wolips.eomodeler.core.model.IEOClassLoaderFactory
$Utility.createClassLoader(IEOClassLoaderFactory.java:56)
at
org
.objectstyle
.wolips
.eomodeler
.actions
.GenerateSQLDialog.getEOModelClassLoader(GenerateSQLDialog.java:233)
at
org
.objectstyle
.wolips
.eomodeler
.actions.GenerateSQLDialog.generateSql(GenerateSQLDialog.java:270)
at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog
$1.run(GenerateSQLDialog.java:252)
at java.lang.Thread.run(Thread.java:613)
The model is saved correctly and if I go to eclipse and ask for sql
generation everything works fine.
Can anyone help me on this?
Many thanks in advance
Stavros
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]