• 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: ec.saveChages gives null exception (didn't before)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ec.saveChages gives null exception (didn't before)


  • Subject: Re: ec.saveChages gives null exception (didn't before)
  • From: Drew Thoeni <email@hidden>
  • Date: Mon, 7 Mar 2005 20:46:21 -0500

I've researched Chuck's idea (below) and EOModeler jdbc2info says I'm using the right info (FrontBase). FYI, I'm not planning on changing databases frequently.

I also followed up on Arturo's suggestion and my foreign keys are marked as "NO" under "Deferrable" in "Check" in the table definition. So, a couple of questions:

1) Can the "deferred" value be set in EOModeler and passed to the DB via the SQL command in EOModeler?

2) If not, (and this is really a Frontbase question) it appears you can't modify this in Frontbase once it is set (must delete referential rule and readd). Is this correct. Frontbase user's guide is silent on this matter.

Regards,

Drew

On Mar 7, 2005, at 12:37 PM, Chuck Hill wrote:

It is more likely what you have not done. When you connect to a database in EOModeler, it caches some database specific information to the connection dictionary under the jdbc2info key. If you later change databases (as I recall you have) and don't use EOModeler to connect to the new database, this jdbc2info will still be for the old database. I'm not 100% sure that connecting to the new DB will update this, it's not something I do frequently.

If you inspect the root node in the EOModel you should see this jdbc2info key. Delete it and save the model. If you want you can then connect to the new database and save the model, or EOF can regenerate this information from the database each time it is run. If you are going to switch back and forth a lot, I would try to avoid saving this information in the model. Note that if it is not in the model, EOF will keep two connections to the database open, one for data and one for this information. In most cases this does not matter, but it will in you are in a environment where the DB license is on a per connection basis.

Chuck

On Mar 6, 2005, at 8:08 PM, Drew Thoeni wrote:

For quite some time, this method, and all others that save to the Class table (like a classroom, not an object definition) worked fine. I've looked at the SQL that is being generated and it appears fine. There is only one not-null column in the table (the key) and the failures are on updates to an existing record. Clearly, something is null that should not be. And, it seems it's a result of something I've done. But I've spent about an hour tinkering with this and (probably in 10 minutes) reached my level of expertise.

Can anyone suggest what I might check into regarding this exception?


[2005-03-06 22:49:59 EST] <main> Waiting for requests...
[2005-03-06 22:58:35 EST] <WorkerThread8> java.lang.NullPointerException
at com.webobjects.jdbcadaptor.JDBCAdaptor.isValidQualifierType(JDBCAdapto r.java:659)
at com.webobjects.eoaccess.EODatabaseContext.isValidQualifierTypeForAttri bute(EODatabaseContext.java:5146)
at com.webobjects.eoaccess.EODatabaseContext.lockingNonQualifiableAttribu tes(EODatabaseContext.java:5160)
at com.webobjects.eoaccess.EODatabaseContext.createAdaptorOperationsForDa tabaseOperationAttributes(EODatabaseContext.java:5346)
at com.webobjects.eoaccess.EODatabaseContext.createAdaptorOperationsForDa tabaseOperation(EODatabaseContext.java:5520)
at com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseCon text.java:6337)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditing Context(EOObjectStoreCoordinator.java:411)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext .java:3148)
at ClassAdmin.saveClass(ClassAdmin.java:63)

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development 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
  • Follow-Ups:
    • Re: ec.saveChages gives null exception (didn't before)
      • From: Chuck Hill <email@hidden>
References: 
 >ec.saveChages gives null exception (didn't before) (From: Drew Thoeni <email@hidden>)
 >Re: ec.saveChages gives null exception (didn't before) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: PDF
  • Next by Date: using static methods in WebObjects Builder?
  • Previous by thread: Re: ec.saveChages gives null exception (didn't before)
  • Next by thread: Re: ec.saveChages gives null exception (didn't before)
  • Index(es):
    • Date
    • Thread