• 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: Using composition instead of inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using composition instead of inheritance


  • Subject: Re: Using composition instead of inheritance
  • From: Mike Schrag <email@hidden>
  • Date: Sat, 02 Jun 2012 19:29:02 -0400

Not sure ... you might want to change the class name on your framework entity, and copy the attributes and relationships from the app entity into the framework entity (rather than delete entities). you'll have to debug what is busted .. just printing out all your entites, relationships, and their destination entities ... something will be null. you'll have to look into EODatabase to see what exactly is NPEing.

On Jun 2, 2012, at 7:01 PM, Paul Hoadley <email@hidden> wrote:

On 02/06/2012, at 11:11 PM, Mike Schrag wrote:

You'll have to dig into what that NPE is exactly. Hard to diagnose without that.

Here's the full stack trace.

java.lang.NullPointerException
at com.webobjects.eoaccess.EODatabase.addModelIfCompatible(EODatabase.java:575)
at com.webobjects.eoaccess.EODatabaseContext.registeredDatabaseContextForModel(EODatabaseContext.java:1003)
at com.webobjects.eoaccess.EODatabaseContext.registeredDatabaseContextForModel(EODatabaseContext.java:1033)
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.invoke(NSSelector.java:358)
at com.webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java:110)
at com.webobjects.eoaccess.EODatabaseChannel.setEntity(EODatabaseChannel.java:131)
at com.webobjects.eoaccess.EODatabaseChannel.setCurrentEntity(EODatabaseChannel.java:160)
at com.webobjects.eoaccess.EODatabaseChannel._setCurrentEntityAndRelationshipWithFetchSpecification(EODatabaseChannel.java:740)
at com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:808)
at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:234)
at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055)
at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1215)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4444)
at net.logicsquad.webobjects.auth.model.auth._Person.fetchPersons(_Person.java:442)
at net.logicsquad.webobjects.auth.model.auth._Person.fetchAllPersons(_Person.java:436)
at net.logicsquad.webobjects.auth.model.auth._Person.fetchAllPersons(_Person.java:432)
at net.logicsquad.survstar.DirectAction.canUseBootstrapCredentials(DirectAction.java:109)
at net.logicsquad.survstar.DirectAction.loginAction(DirectAction.java:150)
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.appserver.WODirectAction.performActionNamed(WODirectAction.java:144)
at er.extensions.appserver.ERXDirectAction.performActionNamed(ERXDirectAction.java:401)
at er.directtoweb.ERD2WDirectAction.performActionNamed(ERD2WDirectAction.java:463)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:259)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:161)
at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:126)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2029)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1994)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:680)

At DirectAction.loginAction(), there's a call to Person.fetchAllPersons().  Person is in the same framework model as Organisation, and it has a to-one relationship to Organisation.  This is after I've removed the Organisation entity from the framework model and changed the name of the application entity to "Organisation".  Have I broken the framework model?


-- 
Paul Hoadley
http://logicsquad.net/




 _______________________________________________
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

  • Follow-Ups:
    • Re: Using composition instead of inheritance
      • From: Paul Hoadley <email@hidden>
References: 
 >Re: Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)
 >Re: Using composition instead of inheritance (From: Mike Schrag <email@hidden>)
 >Re: Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)
 >Re: Using composition instead of inheritance (From: Mike Schrag <email@hidden>)
 >Re: Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)
 >Re: Using composition instead of inheritance (From: Mike Schrag <email@hidden>)
 >Re: Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: Using composition instead of inheritance
  • Next by Date: Re: Using composition instead of inheritance
  • Previous by thread: Re: Using composition instead of inheritance
  • Next by thread: Re: Using composition instead of inheritance
  • Index(es):
    • Date
    • Thread