Re: EOModel Editor: Issue loading the fetchSpec: Unknown class NSNumber

From: Mike Schrag (mschra..dimension.com)
Date: Mon Jul 17 2006 - 16:11:34 EDT

  • Next message: Sébastien Sahuc: "Exception when creating a new WOComponent . This used to work (kind of)"

    On the first issue, I'm not sure I see the bug ... It's saying that
    the ERMail/ERCMailMessage/textCompressed attribute is referring to a
    prototype attribute named 'intBoolean' that can't be found, which
    would imply that the prototype model was either not loaded or the
    proper prototype entity was not resolved. Note that I can't tell you
    the prototype entity name, because there can be several possible
    candidates that prototype attribute get contributed from
    (EOPrototypes, EOJDBCPrototypes, EOJDBCFrontBasePrototypes, etc).
    Are you using the stock ERPrototypes for your prototype model? Which
    project/framework is bringing in the ERPrototypes framework dependency?

    Interproject dependencies is SUPPOSED to work -- it works in my
    environment, at least. If you get some time, there are two things
    that I would put debug info into:

    EclipseEOModelGroupFactory.addModelsFromProject is supposed to
    recurse down through the project dependency tree finding both
    external Framework dependencies and dependended-on projects and then
    look for eomodels inside of them -- essentially mimicking how models
    are autodiscovered in WO. Somewhere inside of WOLips similar code
    exists for making .pbproj/.xcode/etc files, but it was just too
    tricky to try and pull that code out.

    So the first thing I would check is whether it's even looking through
    the projects and frameworks that would contain the prototype models.
    If it IS finding the prototype models, there's some pretty hacky code
    right now that tries to find EOPrototype entities in them inside of
    EOModelGroup.getPrototypeAttributes().

    One of these two is likely the culprit. Let me know if you want an
    instrumented plugin that adds some more debug info if you don't have
    time to add some of that debug manually.

    ms

    On Jul 17, 2006, at 3:44 PM, Sébastien Sahuc wrote:

    > I indeed needed to either close/open the project or clean build. At
    > any rate, it now picked up your change and I thank you.
    >
    > Since my model depends on the ERMail (Wonder stuff), I'm hitting
    > two issues now (one is a display bug). See screenshoot:
    >
    > The first issue (display bug) is that it displays the destination
    > type instead of the destination name.
    >
    > The second issue is more related to inter projects dependencies.
    > How do you resolve the fact that my project A depends on ERMail and
    > ERCodeBusinessLogic models ?
    >
    > Thanks
    >
    > Sebastien
    >
    >
    > <pastedGraphic.png>
    >
    >
    > On Jul 17, 2006, at 11:43 AM, Mike Schrag wrote:
    >
    >> It CLAIMS to be committed ... Open up your EOKeyValueQualifier
    >> source file and that "throws new exception" should be gone (and
    >> replaced with a System.out.println for now:
    >>
    >> else {
    >> System.out.println("EOKeyValueQualifier.loadFromMap:
    >> WARNING: Tell Mike that your fetch spec contains: " + valueMap);
    >> myValue = valueMap;
    >> }
    >>
    >> ms
    >>
    >> On Jul 17, 2006, at 2:35 PM, Sébastien Sahuc wrote:
    >>
    >>> I just updated to latest and greatest, but still get this
    >>> exception. Is it possible you forgot to commit your fix as I
    >>> didn't see anything related reading the svn commit comment.
    >>>
    >>> Seb
    >>>
    >>> On Jul 17, 2006, at 10:19 AM, Mike Schrag wrote:
    >>>
    >>>> OK, for types that I don't "undestand" I just store the value as
    >>>> an object and write it back out later. Try the latest commits
    >>>> and see if you can open now. I don't have a FetchSpec editor in
    >>>> there yet anyway, so I don't actually have to deal with the fact
    >>>> that I don't understand the values.
    >>>>
    >>>> ms
    >>>>
    >>>> On Jul 17, 2006, at 12:11 PM, Sébastien Sahuc wrote:
    >>>>
    >>>>> Mike,
    >>>>>
    >>>>> Whenever I try to open any of my EOModel files, I'm getting the
    >>>>> exception below (Unknown class NSNumber). This has happened
    >>>>> since day one of your new EOModel Editor, and I thought your
    >>>>> last code fixes (as of today) would solve it, but apparently no.
    >>>>>
    >>>>> Contact me privately if you need more information.
    >>>>>
    >>>>> Thanks a lot,
    >>>>>
    >>>>> Seb
    >>>>>
    >>>>> PS: I'm a happy user of a MacBook Pro thanks to Mike's
    >>>>> recommandation.
    >>>>>
    >>>>> org.eclipse.core.runtime.CoreException[0]:
    >>>>> org.objectstyle.wolips.eomodeler.model.EOModelException: Failed
    >>>>> to load fetch specifications from '/Users/sebastien/myProject/
    >>>>> trunk/Project/ITProject/Resources/ITProject.eomodeld/
    >>>>> ITProject.fspec'.
    >>>>> at org.objectstyle.wolips.eomodeler.model.EOEntity.loadFromFile
    >>>>> (EOEntity.java:901)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOModel.loadFromFolder
    >>>>> (EOModel.java:298)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOModelGroup.addModelFromFo
    >>>>> lder(EOModelGroup.java:243)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EclipseEOModelGroupFactory$
    >>>>> ModelVisitor.visit(EclipseEOModelGroupFactory.java:161)
    >>>>> at org.eclipse.core.internal.resources.Resource$2.visit
    >>>>> (Resource.java:105)
    >>>>> at org.eclipse.core.internal.resources.Resource$1.visitElement
    >>>>> (Resource.java:57)
    >>>>> at
    >>>>> org.eclipse.core.internal.watson.ElementTreeIterator.doIteration
    >>>>> (ElementTreeIterator.java:81)
    >>>>> at
    >>>>> org.eclipse.core.internal.watson.ElementTreeIterator.doIteration
    >>>>> (ElementTreeIterator.java:85)
    >>>>> at
    >>>>> org.eclipse.core.internal.watson.ElementTreeIterator.doIteration
    >>>>> (ElementTreeIterator.java:85)
    >>>>> at org.eclipse.core.internal.watson.ElementTreeIterator.iterate
    >>>>> (ElementTreeIterator.java:126)
    >>>>> at org.eclipse.core.internal.resources.Resource.accept
    >>>>> (Resource.java:67)
    >>>>> at org.eclipse.core.internal.resources.Resource.accept
    >>>>> (Resource.java:103)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EclipseEOModelGroupFactory.
    >>>>> addModelsFromProject(EclipseEOModelGroupFactory.java:94)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EclipseEOModelGroupFactory.
    >>>>> createModelGroup(EclipseEOModelGroupFactory.java:136)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EclipseEOModelGroupFactory.
    >>>>> createModel(EclipseEOModelGroupFactory.java:75)
    >>>>> at org.objectstyle.wolips.eomodeler.editors.EOModelEditor.init
    >>>>> (EOModelEditor.java:284)
    >>>>> at org.eclipse.ui.internal.EditorManager.createSite
    >>>>> (EditorManager.java:839)
    >>>>> at org.eclipse.ui.internal.EditorReference.createPartHelper
    >>>>> (EditorReference.java:583)
    >>>>> at org.eclipse.ui.internal.EditorReference.createPart
    >>>>> (EditorReference.java:372)
    >>>>> at org.eclipse.ui.internal.WorkbenchPartReference.getPart
    >>>>> (WorkbenchPartReference.java:566)
    >>>>> at org.eclipse.ui.internal.EditorReference.getEditor
    >>>>> (EditorReference.java:214)
    >>>>> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched
    >>>>> (WorkbenchPage.java:2588)
    >>>>> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor
    >>>>> (WorkbenchPage.java:2521)
    >>>>> at org.eclipse.ui.internal.WorkbenchPage.access$10
    >>>>> (WorkbenchPage.java:2513)
    >>>>> at org.eclipse.ui.internal.WorkbenchPage$9.run
    >>>>> (WorkbenchPage.java:2498)
    >>>>> at org.eclipse.swt.custom.BusyIndicator.showWhile
    >>>>> (BusyIndicator.java:67)
    >>>>> at org.eclipse.ui.internal.WorkbenchPage.openEditor
    >>>>> (WorkbenchPage.java:2493)
    >>>>> at org.eclipse.ui.actions.OpenWithMenu.openEditor
    >>>>> (OpenWithMenu.java:288)
    >>>>> at org.eclipse.ui.actions.OpenWithMenu.access$0
    >>>>> (OpenWithMenu.java:280)
    >>>>> at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent
    >>>>> (OpenWithMenu.java:184)
    >>>>> at org.eclipse.swt.widgets.EventTable.sendEvent
    >>>>> (EventTable.java:66)
    >>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1496)
    >>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    >>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1505)
    >>>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:
    >>>>> 1279)
    >>>>> at org.eclipse.swt.widgets.Display.runDeferredEvents
    >>>>> (Display.java:3312)
    >>>>> at org.eclipse.swt.widgets.Display.readAndDispatch
    >>>>> (Display.java:2941)
    >>>>> at org.eclipse.ui.internal.Workbench.runEventLoop
    >>>>> (Workbench.java:1914)
    >>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
    >>>>> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
    >>>>> (Workbench.java:419)
    >>>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench
    >>>>> (PlatformUI.java:149)
    >>>>> at org.eclipse.ui.internal.ide.IDEApplication.run
    >>>>> (IDEApplication.java:95)
    >>>>> at org.eclipse.core.internal.runtime.PlatformActivator$1.run
    >>>>> (PlatformActivator.java:78)
    >>>>> at
    >>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAp
    >>>>> plication(EclipseAppLauncher.java:92)
    >>>>> at
    >>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
    >>>>> (EclipseAppLauncher.java:68)
    >>>>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run
    >>>>> (EclipseStarter.java:400)
    >>>>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run
    >>>>> (EclipseStarter.java:177)
    >>>>> 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
    >>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
    >>>>> at org.eclipse.core.launcher.Main.run(Main.java:977)
    >>>>> at org.eclipse.core.launcher.Main.main(Main.java:952)
    >>>>> Caused by:
    >>>>> org.objectstyle.wolips.eomodeler.model.EOModelException:
    >>>>> Unknown class NSNumber
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOKeyValueQualifier.loadFro
    >>>>> mMap(EOKeyValueQualifier.java:108)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOQualifierFactory.qualifie
    >>>>> rForMap(EOQualifierFactory.java:56)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOAggregateQualifier.loadFr
    >>>>> omMap(EOAggregateQualifier.java:106)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOQualifierFactory.qualifie
    >>>>> rForMap(EOQualifierFactory.java:56)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOFetchSpecification.loadFr
    >>>>> omMap(EOFetchSpecification.java:301)
    >>>>> at
    >>>>> org.objectstyle.wolips.eomodeler.model.EOEntity.loadFetchSpecsFrom
    >>>>> Map(EOEntity.java:1004)
    >>>>> at org.objectstyle.wolips.eomodeler.model.EOEntity.loadFromFile
    >>>>> (EOEntity.java:897)
    >>>>> ... 54 more
    >>>>>
    >>>>>
    >>>>>
    >>>>
    >>>
    >>> Sebastien Sahuc
    >>> sebastie..ahuc.net
    >>>
    >>>
    >>> Do you Skype?
    >>>
    >>>
    >>>
    >>
    >



    This archive was generated by hypermail 2.0.0 : Mon Jul 17 2006 - 16:11:40 EDT