Re: Exception generating SQL

From: Mike Schrag (mschra..dimension.com)
Date: Wed Sep 27 2006 - 10:47:05 EDT

  • Next message: RedBugz Software: "Re: Plugin requirement prevents update"

    Right, so by default EM finds models just like NSBundle does (i.e. we
    hunt through all your dependent projects looking for models) so that
    we can resolve dependencies. If you don't want it to load certain
    models, you can create a new EOModelGroup (there's a wizard for it).
    And explicitly add the dependent models to that list. This will let
    you have more control over exactly which models EM loads for
    editing. You then Open With=>Entity Modeler the .eomodelgroup file.

    Having a bunch of validation warnings and errors should not cause
    that NoClassDefFound. Can you grep inside your ShopShopFeeds model
    for GenericComparator and CSArrayUtilities to see if it appears
    anywhere in there? It would appear that there is a EOEntity inside
    of that model whose className is set to GenericComparator maybe? Or
    you can send that one to me and I can see if it reveals anything more
    when I run it with more debugging enabled.

    ms

    On Sep 27, 2006, at 10:19 AM, Brendan Duddridge wrote:

    > Hi Mike,
    >
    > Even though I selected my PureFTPD eomodel to generate the SQL for,
    > this is what I see in the console:
    >
    > Loading model: ShopShopFeeds
    > java.lang.reflect.InvocationTargetException
    > 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.sql.SQLUtils.createEOFSQLGenerator
    > (SQLUtils.java:31)
    > at
    > org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generateSql
    > (GenerateSQLDialog.java:266)
    > at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run
    > (GenerateSQLDialog.java:248)
    > at java.lang.Thread.run(Thread.java:613)
    > Caused by: java.lang.NoClassDefFoundError: com/clickspace/
    > csutilities/CSArrayUtilities$GenericComparator
    > at java.lang.Class.forName0(Native Method)
    > at java.lang.Class.forName(Class.java:164)
    > at com.webobjects.foundation._NSUtilities._classWithPartialName
    > (_NSUtilities.java:307)
    > at com.webobjects.foundation._NSUtilities.classWithName
    > (_NSUtilities.java:291)
    > at com.webobjects.eoaccess.EOModel._setEntityForEntityNameClassName
    > (EOModel.java:1242)
    > at com.webobjects.eoaccess.EOModel._addFakeEntityWithPropertyList
    > (EOModel.java:1280)
    > at
    > com.webobjects.eoaccess.EOModel._initWithTableOfContentsPropertyListPa
    > thURL(EOModel.java:1092)
    > at com.webobjects.eoaccess.EOModel.<init>(EOModel.java:802)
    > at com.webobjects.eoaccess.EOModelGroup.addModelWithPathURL
    > (EOModelGroup.java:498)
    > at org.objectstyle.wolips.eomodeler.sql.EOFSQLGenerator.<init>
    > (EOFSQLGenerator.java:121)
    > ... 8 more
    >
    > So there must be something wrong with my ShopShopFeeds model.
    > Well... there are a bunch of validation errors in that model that I
    > haven't corrected yet. Things like
    > "EOModelEditor.handleModelErrors: creating ShopShopFeeds/
    > Entity:XSSFedAttributeCategory/Relationship:attribute is optional
    > but ShopShopFeeds/Entity:XSSFedAttributeCategory/
    > Attribute:attributeId does not allow nulls.".
    >
    > Perhaps that's getting it all confused.
    >
    >
    > Thanks,
    >
    >
    > ____________________________________________________________________
    > Brendan Duddridge | CTO | 403-277-5591 x24 | brenda..lickspace.com
    >
    > ClickSpace Interactive Inc.
    > Suite L100, 239 - 10th Ave. SE
    > Calgary, AB T2G 0V9
    >
    > http://www.clickspace.com
    >
    > On Sep 27, 2006, at 5:29 AM, Mike Schrag wrote:
    >
    >> Just to make things fun, I don't get that exception when I load
    >> your model.
    >>
    >> Can you open up your Console app and look for the lines like:
    >> Loading model: MyEOModel
    >> Loading model: PureFTPD
    >>
    >> and see the last model that is being loaded before the exception
    >> occurs?
    >>
    >> ms
    >>
    >> On Sep 26, 2006, at 5:42 PM, Brendan Duddridge wrote:
    >>
    >>> Hi Mike,
    >>>
    >>> No, there's no references to CSArrayUtilities, CSUtilities, or
    >>> GenericComparator in my model.
    >>>
    >>> Thanks,
    >>>
    >>> ____________________________________________________________________
    >>> Brendan Duddridge | CTO | 403-277-5591 x24 | brenda..lickspace.com
    >>>
    >>> ClickSpace Interactive Inc.
    >>> Suite L100, 239 - 10th Ave. SE
    >>> Calgary, AB T2G 0V9
    >>>
    >>> http://www.clickspace.com
    >>>
    >>> On Sep 26, 2006, at 8:47 AM, Mike Schrag wrote:
    >>>
    >>>> any idea what is referencing CSArrayUtilities or
    >>>> GenericComparator in your model? can you grep inside your
    >>>> eomodel folder for both of fhose and see if there's a reference?
    >>>>
    >>>> On Sep 25, 2006, at 6:26 PM, Brendan Duddridge wrote:
    >>>>
    >>>>> Hi,
    >>>>>
    >>>>> When I try to generate SQL in one of my models, I get the
    >>>>> following exception:
    >>>>>
    >>>>> java.lang.NoClassDefFoundError: com/clickspace/csutilities/
    >>>>> CSArrayUtilities$GenericComparator
    >>>>> at java.lang.Class.forName0(Native Method)
    >>>>> at java.lang.Class.forName(Class.java:164)
    >>>>> at com.webobjects.foundation._NSUtilities._classWithPartialName
    >>>>> (_NSUtilities.java:307)
    >>>>> at com.webobjects.foundation._NSUtilities.classWithName
    >>>>> (_NSUtilities.java:291)
    >>>>> at
    >>>>> com.webobjects.eoaccess.EOModel._setEntityForEntityNameClassName
    >>>>> (EOModel.java:1242)
    >>>>> at
    >>>>> com.webobjects.eoaccess.EOModel._addFakeEntityWithPropertyList
    >>>>> (EOModel.java:1280)
    >>>>> at
    >>>>> com.webobjects.eoaccess.EOModel._initWithTableOfContentsPropertyLi
    >>>>> stPathURL(EOModel.java:1092)
    >>>>> at com.webobjects.eoaccess.EOModel.<init>(EOModel.java:802)
    >>>>> at com.webobjects.eoaccess.EOModelGroup.addModelWithPathURL
    >>>>> (EOModelGroup.java:498)
    >>>>> at org.objectstyle.wolips.eomodeler.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.sql.SQLUtils.createEOFSQLGenerato
    >>>>> r(SQLUtils.java:31)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generat
    >>>>> eSql(GenerateSQLDialog.java:266)
    >>>>> at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog
    >>>>> $1.run(GenerateSQLDialog.java:248)
    >>>>> at java.lang.Thread.run(Thread.java:613)
    >>>>>
    >>>>> I have my CSUtilities project in my workspace along with the
    >>>>> project that has the model and entity that I'm trying to
    >>>>> generate SQL for.
    >>>>
    >>>
    >>
    >



    This archive was generated by hypermail 2.0.0 : Wed Sep 27 2006 - 10:47:16 EDT