Re: Entity modeler's SQL generation doesn't work with NSJarBundle Frameworks

From: Chuck Hill (chil..lobal-village.net)
Date: Thu Mar 26 2009 - 12:57:08 EDT

  • Next message: Mr. G Brown: "Re: Entity modeler's SQL generation doesn't work with NSJarBundle Frameworks"

    On Mar 26, 2009, at 9:47 AM, Greg Brown wrote:

    > Summary: It seems like something is having a hard time reading the
    > NSJarBundle ERPrototype when it goes to generate SQL.
    >
    > 1. Open an eomodel with EntityModeler from a FBL ("directory" type
    > frameworks) /Wonder/ERPrototypes project, pick a table and generate
    > SQL. Cool! it works!
    >
    > 2. Now take that model and put it in a maven project, and click to
    > generate SQL and it says:
    >
    > java.lang.IllegalArgumentException: Unable to read either 'jar:file:/
    > Volumes/OS9User/gbrown/.m2/repository/wonder/core/ERPrototypes/5.0.0-
    > SNAPSHOT/ERPrototypes-5.0.0-SNAPSHOT.jar!/Resources/
    > erprototypes.eomodeld//index.eomodeld' or 'jar:file:/Volumes/OS9User/
    > gbrown/.m2/repository/wonder/core/ERPrototypes/5.0.0-SNAPSHOT/
    > ERPrototypes-5.0.0-SNAPSHOT.jar!/Resources/erprototypes.eomodeld//
    > eomodel.plist

    Note the double / before the file name on that URL. Perhaps the
    problem?

    > at com.webobjects.eoaccess.EOModel.<init>(EOModel.java:800)
    > at
    > com
    > .webobjects
    > .eoaccess.EOModelGroup.addModelWithPathURL(EOModelGroup.java:498)
    > at
    > org
    > .objectstyle
    > .wolips
    > .eomodeler.core.sql.EOFSQLGenerator.<init>(EOFSQLGenerator.java:121)
    > 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:
    > 36)
    > at
    > org
    > .objectstyle
    > .wolips
    > .eomodeler
    > .actions.GenerateSQLDialog.generateSql(GenerateSQLDialog.java:297)
    > at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run
    >
    > 3. Now, if you add the directory framework ERPrototypes to the
    > classpath, before the NSJarBundle ERPrototype, of course, and keep
    > everything else the same-- it works again!
    >
    > Could this be a bug?

    Or just latent hostility towards jar frameworks or Maven. :-P

    Chuck

    >
    > It seems like something is having a hard time reading the
    > NSJarBundle ERPrototype when it goes to generate SQL, or something
    > is in a different than expected place.
    >
    >
    >
    > Greg Brown
    > gsbrow..mich.edu
    >
    >
    >

    -- 
    Chuck Hill             Senior Consultant / VP Development
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Thu Mar 26 2009 - 12:58:08 EDT