Re: Cross Model SQL Generation Exception - Resolved

From: Bernard Bradley (berney..ac.com)
Date: Sat Feb 23 2008 - 03:12:21 EST

  • Next message: Mike Schrag: "Re: Cross Model SQL Generation Exception - Resolved"

    Thanks Chuck,

    That was it.

    Berney

    On Feb 22, 2008, at 6:16 PM, Chuck Hill wrote:

    > 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.columnTypeStringForAttribut
    >> e(JDBCExpression.java:293)
    >> at
    >> com.webobjects.jdbcadaptor.PostgresqlExpression.columnTypeStringForAt
    >> tribute(PostgresqlExpression.java:293)
    >> at
    >> com.webobjects.eoaccess.EOSQLExpression.addCreateClauseForAttribute
    >> (EOSQLExpression.java:2498)
    >> at
    >> com.webobjects.eoaccess.EOSynchronizationFactory.createTableStatement
    >> sForEntityGroup(EOSynchronizationFactory.java:318)
    >> at
    >> com.webobjects.eoaccess.EOSynchronizationFactory.createTableStatement
    >> sForEntityGroups(EOSynchronizationFactory.java:487)
    >> at
    >> com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationStatem
    >> entsForEntities(EOSynchronizationFactory.java:951)
    >> at
    >> com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationScript
    >> ForEntities(EOSynchronizationFactory.java:747)
    >> at
    >> org.objectstyle.wolips.eomodeler.sql.EOFSQLGenerator.getSchemaCreatio
    >> nScript(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.generateSq
    >> l(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 : Sat Feb 23 2008 - 03:14:51 EST