• 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
I dont get it, still nullpointer exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I dont get it, still nullpointer exception


  • Subject: I dont get it, still nullpointer exception
  • From: WebObjects <email@hidden>
  • Date: Wed, 15 Oct 2008 23:11:16 -0500

Hello, I fixed (or thought I did) the EOmodel, then I did this in my method.
Employee localEmployee = (Employee)EOUtilities.localInstanceOfObject(myEC, emp);
System.out.println(selectedItems());



NSArray<Turn> localSelectedItems = EOUtilities.localInstancesOfObjects(myEC, selectedItems());
EmployeeXTurn empxTurn = (EmployeeXTurn) ERXEOControlUtilities.createAndInsertObject(myEC,"EmployeeXTurn");
for (Turn actualTurn:localSelectedItems){
actualTurn.addToEmployeeXTurn(empxTurn);
}
System.out.println(localSelectedItems);


empxTurn.addObjectToBothSidesOfRelationshipWithKey(localEmployee, EmployeeXTurn.EMPLOYEE_KEY);
inside the for I have tried the addObjectToBothSidesOfRelationshipWithKey() method and the addObjectsToBothSidesOfRelationshipWithKey() method and im still getting this error 

java.lang.NullPointerException
at com.webobjects.eoaccess.EODatabaseContext._objectFaultWithSnapshotRelationshipEditingContext(EODatabaseContext.java:2356)
at com.webobjects.eoaccess.EODatabaseContext._fireDeferredFaultWithSourceObject(EODatabaseContext.java:2401)
at com.webobjects.eoaccess.EOAccessDeferredFaultHandler.createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:49)
at com.webobjects.eocontrol.EOCustomObject.willReadRelationship(EOCustomObject.java:1279)
at er.extensions.eof.ERXGenericRecord.willReadRelationship(ERXGenericRecord.java:348)
at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:614)
at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
at com.webobjects.eoaccess.EODatabaseContext.databaseOperationForObject(EODatabaseContext.java:4814)
at com.webobjects.eoaccess.EODatabaseContext.valuesForKeys(EODatabaseContext.java:6535)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.valuesForKeys(EOObjectStoreCoordinator.java:326)
at com.webobjects.eoaccess.EOQualifierSQLGeneration$_KeyValueQualifierSupport.schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:439)
at er.extensions.ERXExtensions$KeyValueQualifierSQLGenerationSupport.schemaBasedQualifierWithRootEntity(ERXExtensions.java:304)
at com.webobjects.eoaccess.EOQualifierSQLGeneration$Support._schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:179)
at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:227)
at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055)
at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
if I just do this :
empxTurn.addObjectToBothSidesOfRelationshipWithKey(localEmployee, EmployeeXTurn.EMPLOYEE_KEY);

or this : localEmployee.addObjectToBothSidesOfRelationshipWithKey(empxTurn, Employee.EMPLOYEE_X_TURNS_KEY);
all its fine, I can add the employee to the EmployeeXTurn, btu the problem comes when adding the turn to the EmployeeXTurn.
I think you guys are getting tired of this problems Im having, also I am, can get it why Im having them.

any clues?

Gus








 _______________________________________________
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

  • Prev by Date: Re: Eclipse 3.4.1
  • Next by Date: Re: I dont get it, still nullpointer exception
  • Previous by thread: Re: modify the db from EOModel without risking the data
  • Next by thread: Re: I dont get it, still nullpointer exception
  • Index(es):
    • Date
    • Thread