• 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: NullPointerException in many-many relationship cross two models
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NullPointerException in many-many relationship cross two models


  • Subject: Re: NullPointerException in many-many relationship cross two models
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 14 Dec 2009 19:42:16 -0800


On Dec 14, 2009, at 7:37 PM, Ren, Kevin wrote:


Hi,

You are brilliant, guys. It's simple copy/past error in the URL.

jdbc:mysql://156.13.128.28:3306/school? useUnicode=true&characterEncoding=UTF8

One was using characterEncoding=UTF-8 instead of UTF8, causing this problem.

Now I change them both to UTF8 and works,


UTF-8 is the correct form


Chuck


-----Original Message-----
From:
webobjects-dev-bounces+kevin.ren=email@hidden
[mailto:webobjects-dev-bounces+kevin.ren=email@hidden.c
om] On Behalf Of Mike Schrag
Sent: Tuesday, 15 December 2009 4:25 p.m.
To: Development WebObjects
Subject: Re: NullPointerException in many-many relationship
cross two models

same connection dictionary like "i think they're the same
because the url is the same" or same like "i tested with
.equals(..) at runtime and it returns true thereby proving
they're the same" (technically they don't have to be exactly
.equals, but if they are .equals, they are same-enough)

On Dec 14, 2009, at 10:22 PM, Ren, Kevin wrote:


HI,

I checked that, they are same connection dictionary,
because this just moral test example.

Not using WOnder,

Thanks

Kevin

-----Original Message-----
From: Chuck Hill [mailto:email@hidden]
Sent: Tuesday, 15 December 2009 4:18 p.m.
To: Ren, Kevin
Cc: email@hidden
Subject: Re: NullPointerException in many-many
relationship cross two
models

Both models need to have the exact (and I _do_ mean _exact_) same
connection dictionary.  The dictionaries must be equals().
This is
most easily accomplished by setting the programatically
when the app
loads.  Wonder, of course, does this.


Chuck


On Dec 14, 2009, at 3:30 PM, Ren, Kevin wrote:
Hi,

There is m-m relationship between A and B entities which are in
different models, but in same database. I can create and
platen this
relationship in EOModler and got AB table as well.

AB is in the same DB and only has compound PK like A_ID and B_ID.

When I tried to do saveChanges got this error


[2009-12-15 12:6:48 NZDT] <WorkerThread0> java.lang.NullPointerException at com .webobjects .eoaccess .EODatabaseContext


.primaryKeyForIntermediateRowFromSourceObject(EODatabaseContext.java:
4845)

      at
com
.webobjects
.eoaccess
.EODatabaseContext
.databaseOperationForIntermediateRowFromSourceObject
(EODatabaseContext.java:4863)

      at
com
.webobjects
.eoaccess
.EODatabaseContext
.recordInsertForIntermediateRowFromSourceObject
(EODatabaseContext.java:4888)

      at
com
.webobjects
.eoaccess
.EODatabaseContext
.relayAttributesInRelationshipSourceObjectDestinationObject
(EODatabaseContext.java:4913)

      at
com
.webobjects
.eoaccess
.EODatabaseContext
.relayAttributesInRelationshipSourceObjectDestinationObjects
(EODatabaseContext.java:4966)

      at
com
.webobjects
.eoaccess
.EODatabaseContext
.recordChangesInEditingContext(EODatabaseContext.java:6036)
      at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.saveChangesInEditingContext(EOObjectStoreCoordinator.java:373)

      at
com
.webobjects

.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)


And I found only updateObjects could has two entities's
details and
insertedObjects does not print out anything.

Not sure this does not work in across models or something
else need
setup?

thanks



Xiaowen(Kevin) Ren

Analyst Programmer
Channel Applications, Retail Applications ANZ National Bank
Ltd Level
6 ASB Tower
2 Hunter Street
PO Box 1791
Wellington
Phone: 04 4365363
Fax: 04 8028696





"This e-mail and any attachments to it (the "Communication") is,
unless otherwise stated, confidential,  may contain
copyright material
and is for the use only of the intended recipient. If you
receive the
Communication in error, please notify the sender
immediately by return
e-mail, delete the Communication and the return e-mail,
and do not
read, copy, retransmit or otherwise deal with it. Any views
expressed
in the Communication are those of the individual sender
only, unless
expressly stated to be those of Australia and New Zealand Banking
Group Limited ABN 11 005 357 522, or any of its related entities
including ANZ National Bank Limited (together "ANZ"). ANZ
does not
accept liability in connection with the integrity of or
errors in the
Communication, computer virus, data corruption,
interference or delay
arising from or in respect of the Communication."

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


v
illage.net

This email sent to email@hidden

-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific
problems.
http://www.global-village.net/products/practical_webobjects










"This e-mail and any attachments to it (the
"Communication") is, unless otherwise stated, confidential,
may contain copyright material and is for the use only of the
intended recipient. If you receive the Communication in
error, please notify the sender immediately by return e-mail,
delete the Communication and the return e-mail, and do not
read, copy, retransmit or otherwise deal with it. Any views
expressed in the Communication are those of the individual
sender only, unless expressly stated to be those of Australia
and New Zealand Banking Group Limited ABN 11 005 357 522, or
any of its related entities including ANZ National Bank
Limited (together "ANZ"). ANZ does not accept liability in
connection with the integrity of or errors in the
Communication, computer virus, data corruption, interference
or delay arising from or in respect of the Communication."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

@mdimen
sion.com

This email sent to email@hidden


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

This email sent to email@hidden



"This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication."
_______________________________________________
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

-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








_______________________________________________
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: 
 >RE: NullPointerException in many-many relationship cross two models (From: "Ren, Kevin" <email@hidden>)

  • Prev by Date: Re: Oracle and EOF with Timestamps
  • Next by Date: RE: NullPointerException in many-many relationship cross two models
  • Previous by thread: RE: NullPointerException in many-many relationship cross two models
  • Next by thread: RE: NullPointerException in many-many relationship cross two models
  • Index(es):
    • Date
    • Thread