Re: Cross Model SQL Generation Exception

From: Chuck Hill (chil..lobal-village.net)
Date: Fri Feb 22 2008 - 20:16:50 EST

  • Next message: Bernard Bradley: "Re: Cross Model SQL Generation Exception - Resolved"

    I'd guess that you have bad a jdbc2info in one of the modes. Open up
    the index.emodel from each model in a text editor, and remove that
    key and (very long) value from each. Save. Rejoice.

    Chuck

    On Feb 22, 2008, at 5:07 PM, Bernard Bradley wrote:

    > I have four models ported from EOModeller. Three of the models
    > have some form of cross model reference. The fourth model is
    > referenced by another model, but does not reference anything
    > external to it. They all use the same set of prototypes.
    >
    > I have ported all to Entity Modeler and the frameworks/app to
    > Eclipse. The everything builds and app was running fine. I then
    > made modifications to the three models that have the cross-
    > references, adding some attributes and entities. I worked around
    > the cross model issues discussed here: http://wiki.objectstyle.org/
    > confluence/display/WOL/mail/524445 and I'm using model group files
    > to make sure everything is referenced when I open Entity Modeler.
    >
    > When I try to generate the SQL from Entity Modeler, I get the
    > following exception. If I uncheck the "Create Tables" the
    > generation will work, but what I'm really trying to do is create
    > the SQL needed to update my database :(
    >
    > The fourth model can generate SQL just fine, so I am assuming my
    > prototypes are fine.
    >
    > java.lang.ClassCastException: java.lang.Integer
    > at
    > com.webobjects.jdbcadaptor.JDBCExpression.columnTypeStringForAttribute
    > (JDBCExpression.java:293)
    > at
    > com.webobjects.jdbcadaptor.PostgresqlExpression.columnTypeStringForAtt
    > ribute(PostgresqlExpression.java:293)
    > at
    > com.webobjects.eoaccess.EOSQLExpression.addCreateClauseForAttribute
    > (EOSQLExpression.java:2498)
    > at
    > com.webobjects.eoaccess.EOSynchronizationFactory.createTableStatements
    > ForEntityGroup(EOSynchronizationFactory.java:318)
    > at
    > com.webobjects.eoaccess.EOSynchronizationFactory.createTableStatements
    > ForEntityGroups(EOSynchronizationFactory.java:487)
    > at
    > com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationStateme
    > ntsForEntities(EOSynchronizationFactory.java:951)
    > at
    > com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationScriptF
    > orEntities(EOSynchronizationFactory.java:747)
    > at
    > org.objectstyle.wolips.eomodeler.sql.EOFSQLGenerator.getSchemaCreation
    > Script(EOFSQLGenerator.java:389)
    > 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:585)
    > 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)
    >
    > Any help / ideas will be greatly appreciated.
    >
    > Berney

    -- 
    

    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 : Fri Feb 22 2008 - 20:17:50 EST