• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error after adding entity and relationship to model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error after adding entity and relationship to model


  • Subject: Re: Error after adding entity and relationship to model
  • From: David Avendasora <email@hidden>
  • Date: Tue, 25 Mar 2014 08:34:59 -0400

Angelo, Chuck, et al.,

There is a bug in Eclipse 4.3 where you cannot select entities, attributes or relationships in the right-hand pane because it does NOT update the Properties tab, so it is very easy to think you are editing one thing but in-fact be editing something else. You MUST select everything in the Outline tab.

Also, in both 3.7 and 4.3 EntityModeler does *not* watch for changes to any of the .eomodeld packages that it has open. This causes EM to be out-of-sync with the file system under *at least* the following conditions:

1) Manually editing any of the .eomodeld files with a text editor
2) Having more than one EntityModeler perspective or tab open at once - which WOLips does by default when you cmd-shift-v open an Entity or Model, even if they are already open (maybe this can be fixed by setting the preference to “reuse” an editor, I haven’t checked)
3) Pulling/merging/etc changes from a source code repository
4) Full moons (not in the celestial sense)

Over time EntityModeler has become what EOModeler / WOBuilder used to be: Awesome tools that are amazingly helpful, but have bugs that require a lot of routine work-arounds that new/occasional users will not know about or remember.

I’ve looked into trying to fix some of these bugs in EntityModeler, but Eclipse plugin development is … well … not-so-WOish.

I’ll try to get to documenting some of these things in the WOLips issues: https://github.com/wocommunity/wolips/issues

Dave


On Mar 24, 2014, at 3:43 PM, Ângelo Andrade Cirino <email@hidden> wrote:

Unfortunately it happens. Next time I will capture the message and send to the list.

I am doing a lot of experimentation trying to deepen my knowledge of Wonder and EO, so I am changing my model a lot and facing several problems. The plugin Entity Modeler seems to behave a little better after I turned off my preference "Open Entity Modeler in New Window".

Regards,

Angelo


2014-03-24 16:38 GMT-03:00 Chuck Hill <email@hidden>:
Then I don’t understand how it is getting out of sync…


On 2014-03-24, 12:35 PM, "Ângelo Andrade Cirino" wrote:

It is the Eclipse plugin.


2014-03-24 16:28 GMT-03:00 Chuck Hill <email@hidden>:


On 2014-03-24, 12:08 PM, "Ângelo Andrade Cirino" wrote:

Hi David,

It is a unidirectional relationship.

Entity Modeler and Eclipse aren't talking adequately to each other. My model will very often become out of sync. I guess the model file got corrupted sometime and I didn't notice it until the model was loaded.

Are you using the external EntityModeler.app instead of the Eclipse plugin?



Angelo


2014-03-24 14:29 GMT-03:00 David Avendasora <email@hidden>:
Having a bad value in the “definition” attribute of the relationship’s entry of the Entity.plist is what probably caused the error. When you recreated it that cleared out the value.

Now, on the subject of a "one-to-one” relationship… Is it a true, bi-directional "one-to-one" where the FK in each table is also the PK? If so, that is not going to work.

Dave


On Mar 24, 2014, at 12:38 PM, Ângelo Andrade Cirino <email@hidden> wrote:

Hi Chuck,

Never mind, I deleted the entity and recreated it with a new name and was able to circumvent the error.

I did not model the relationship as flattened neither did anything other then the usual for a one to one relationship.

Angelo


2014-03-24 13:30 GMT-03:00 Chuck Hill <email@hidden>:
From the stack trace, it looks like you modelled this as a flattened relationship and did it wrong.  Can you post the plist section for this?


Chuck


On 2014-03-24, 9:03 AM, "Ângelo Andrade Cirino" wrote:

Hi,

After simply adding a new entity and a relationship to an existing entity I get the following error:

Mar 24 12:54:47 TesteModelos[52428] INFO  er.extensions.appserver.ERXApplication  - Wonder version: 6.1.2-SNAPSHOT
Mar 24 12:54:47 TesteModelos[52428] INFO  er.extensions.appserver.ERXApplication  - Welcome to TesteModelos !
Mar 24 12:54:47 TesteModelos[52428] WARN  er.extensions.eof.ERXModelGroup  - Clearing previous class descriptions
Mar 24 12:54:47 TesteModelos[52428] DEBUG NSLog  - Using JDBCPlugIn 'com.webobjects.jdbcadaptor.JDBCPlugIn' for JDBCAdaptor@218940734
Mar 24 12:54:47 TesteModelos[52428] DEBUG NSLog  - Using JDBCPlugIn 'MySQLPlugIn' for JDBCAdaptor@1450090084
Mar 24 12:54:47 TesteModelos[52428] ERROR er.extensions.appserver.ERXApplication  - TesteModelos failed to start.
ClassCastException: com.webobjects.eoaccess.EORelationship cannot be cast to com.webobjects.eoaccess._EOExpressionArray
  at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2935)
  at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2967)
  at com.webobjects.eoaccess.EOAttribute._setDefinitionWithoutFlushingCaches(EOAttribute.java:2772)
  at com.webobjects.eoaccess.EOAttribute.awakeWithPropertyList(EOAttribute.java:1217)
  at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:830)
  at er.extensions.eof.ERXModelGroup.modifyModelsFromProperties(ERXModelGroup.java:1146)
  at er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:258)
  at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:148)
     ... skipped 5 stack elements
  at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
  at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:155)
  at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:328)
  at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:169)
  at er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1300)
  ... skipped 13 stack elements
Mar 24 12:54:47 TesteModelos[52428] WARN  NSLog  - A fatal exception occurred: com.webobjects.eoaccess.EORelationship cannot be cast to com.webobjects.eoaccess._EOExpressionArray
[2014-3-24 12:54:47 BRT] <main> java.lang.ClassCastException: com.webobjects.eoaccess.EORelationship cannot be cast to com.webobjects.eoaccess._EOExpressionArray
at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2935)
at com.webobjects.eoaccess.EOAttribute._normalizeDefinitionPath(EOAttribute.java:2967)
at com.webobjects.eoaccess.EOAttribute._setDefinitionWithoutFlushingCaches(EOAttribute.java:2772)
at com.webobjects.eoaccess.EOAttribute.awakeWithPropertyList(EOAttribute.java:1217)
at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:830)
at er.extensions.eof.ERXModelGroup.modifyModelsFromProperties(ERXModelGroup.java:1146)
at er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:258)
at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:148)
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:597)
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:155)
at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:328)
at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:169)
at er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1300)
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:597)
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
at com.webobjects.appserver.WOApplication.run(WOApplication.java:1229)
at er.extensions.appserver.ERXApplication.run(ERXApplication.java:1417)
at com.webobjects.appserver.WOApplication.main(WOApplication.java:548)
at er.extensions.appserver.ERXApplication.main(ERXApplication.java:861)
at TesteModelos.app.Application.main(Application.java:15)

Since the new entity is a very simple one (a list of options for another entity) I chose to implement it as a ERXGenericRecord. If I remove the relationship the application will start.

Any hint?

Angelo



--
Ângelo Andrade Cirino
email@hidden
31-3494-8642
31-9303-0695
MSN email@hidden
Skype aacirino
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.








--
Ângelo Andrade Cirino
email@hidden
31-3494-8642
31-9303-0695
MSN email@hidden
Skype aacirino



--
Ângelo Andrade Cirino
email@hidden
31-3494-8642
31-9303-0695
MSN email@hidden
Skype aacirino



--
Ângelo Andrade Cirino
email@hidden
31-3494-8642
31-9303-0695
MSN email@hidden
Skype aacirino


—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Error after adding entity and relationship to model (From: Ângelo Andrade Cirino <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Chuck Hill <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Ângelo Andrade Cirino <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: David Avendasora <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Ângelo Andrade Cirino <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Chuck Hill <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Ângelo Andrade Cirino <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Chuck Hill <email@hidden>)
 >Re: Error after adding entity and relationship to model (From: Ângelo Andrade Cirino <email@hidden>)

  • Prev by Date: Re: RawRow cross DB compatibility
  • Next by Date: RE: Saving NSDictionary to DB
  • Previous by thread: Re: Error after adding entity and relationship to model
  • Next by thread: Popup in a query page for a property selection
  • Index(es):
    • Date
    • Thread