• 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
Many-to-many Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Many-to-many Help


  • Subject: Many-to-many Help
  • From: James Cicenia <email@hidden>
  • Date: Fri, 26 Mar 2004 20:36:59 -0600

Hello all -

I followed the instructions to the "t" making my many to many
relationship. Now I have a display page and in
  my repetition a list.. but I get a null point type exception..  the
list *should* be null as there should be no
records yet in it.  However, it does pass the null test and then
promptly blows up on the count().

When am I doing wrong?

-James Cicenia

     public NSArray theMetricList(){
     	System.out.println("before the null test");
     	if(theItem.portfolioMetricLists()!=null){
			System.out.println("After the null test");
			System.out.println("the count is:
"+theItem.portfolioMetricLists().count());
     		theMetricList =  theItem.portfolioMetricLists();

     	}
     	return theMetricList;
     }


before the null test
After the null test
23615 [WorkerThread5] INFO er.extensions.ERXNSLogLog4jBridge  -
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
java.lang.NullPointerException
[2004-03-26 20:33:54 CST] <WorkerThread5> java.lang.NullPointerException
	at
com.webobjects.foundation._NSStringUtilities.concat(_NSStringUtilities.j
ava:213)
	at
com.webobjects.eoaccess.EOSQLExpression._aliasForRelatedAttributeRelatio
nshipPath(EOSQLExpression.java:264)
	at
com.webobjects.eoaccess.EOSQLExpression.joinExpression(EOSQLExpression.j
ava:1169)
	at
com.webobjects.eoaccess.EOSQLExpression.prepareSelectExpressionWithAttri
butes(EOSQLExpression.java:1033)
	at
com.webobjects.jdbcadaptor.JDBCExpression.prepareSelectExpressionWithAtt
ributes(JDBCExpression.java:273)
	at
com.webobjects.eoaccess.EOSQLExpressionFactory.selectStatementForAttribu
tes(EOSQLExpressionFactory.java:219)
	at
com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java
:178)
	at
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationE
ditingContext(EODatabaseChannel.java:879)
	at
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecific
ation(EODatabaseChannel.java:216)
	at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecification
EditingContext(EODatabaseContext.java:3196)
	at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(
EODatabaseContext.java:3337)
	at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecif
ication(EOObjectStoreCoordinator.java:539)
	at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4053)
	at
com.webobjects.eoaccess.EODatabaseContext.objectsForSourceGlobalID(EODat
abaseContext.java:4251)
	at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsForSourceGlobal
ID(EOObjectStoreCoordinator.java:682)
	at
com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID(EOEdi
tingContext.java:3904)
	at
com.webobjects.eoaccess.EODatabaseContext._fireArrayFault(EODatabaseCont
ext.java:4418)
	at
com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitialization
OfObject(EOAccessArrayFaultHandler.java:70)
	at
com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyM
utableArray.java:38)
	at
com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMuta
bleArray.java:92)
	at CharterInspect.theMetricList(CharterInspect.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAcces
sor.java:54)
	at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(
NSKeyValueCoding.java:1160)
	at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueFo
rKey(NSKeyValueCoding.java:1268)
	at
com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539)
	at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValu
eCoding.java:498)
	at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementatio
n.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
	at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:
1600)
	at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent
(WOKeyValueAssociation.java:46)
	at
com.webobjects.appserver._private.WORepetition.appendToResponse(WORepeti
tion.java:248)
	at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespons
e(WODynamicGroup.java:121)
	at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyna
micGroup.java:130)
	at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:
992)
	at
com.webobjects.appserver._private.WOComponentReference.appendToResponse(
WOComponentReference.java:111)
	at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespons
e(WODynamicGroup.java:121)
	at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyna
micGroup.java:130)
	at
com.webobjects.appserver._private.WOComponentContent.appendToResponse(WO
ComponentContent.java:43)
	at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespons
e(WODynamicGroup.java:121)
	at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyna
micGroup.java:130)
	at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:
992)
	at
com.webobjects.appserver._private.WOComponentReference.appendToResponse(
WOComponentReference.java:111)
	at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespons
e(WODynamicGroup.java:121)
	at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyna
micGroup.java:130)
	at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:
992)
	at
com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:
1198)
	at
com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.ja
va:1418)
	at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedPage(WOComponentRequestHandler.java:230)
	at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedSession(WOComponentRequestHandler.java:287)
	at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedApplication(WOComponentRequestHandler.java:322)
	at
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque
st(WOComponentRequestHandler.java:358)
	at
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques
t(WOComponentRequestHandler.java:432)
	at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.jav
a:1306)
	at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.
java:173)
	at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java
:254)
	at java.lang.Thread.run(Thread.java:552)
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: database
  • Next by Date: Re: Many-to-many Help
  • Previous by thread: Re: database
  • Next by thread: Re: Many-to-many Help
  • Index(es):
    • Date
    • Thread