• 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: Having Troubles with JUnit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Having Troubles with JUnit


  • Subject: Re: Having Troubles with JUnit
  • From: Richard Palmer <email@hidden>
  • Date: Fri, 27 Aug 2010 08:48:17 -0500

Aloha Johnny,

I  recently had a similar problem with an adaptor failing to provide new primary keys which gave me fits.

I am not sure if it was related to upgrading WOLIPS.  I have not upgraded explicitly, but customarily upgrade everything that the eclipse upgrader wants to 'improve' without paying too close attention.

Anyway, the problem was that the JDBC adaptor was sometime returning new primary keys with a valueType of NSData instead of  Integer.  I found that this was related to the entry for the primary key in the relevant eomodeld plist having  a key of 'className' instead of 'valueClassName' and no prototypeName was set.

I solved the problem by setting a prototypeName to 'id' as necessary and getting rid of the other stuff.

I am not sure of the genesis of this problem, nor if it is apposite to your situation, but it is worth looking at.

richard palmer

On Aug 26, 2010, at 7:01 PM, Johnny Miller wrote:

Still stuck.

Here is the stack trace:

java.lang.IllegalStateException: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@35de7497 failed to provide new primary keys for entity 'HPPoster'
at com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5713)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:370)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1085)
at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1007)

I'm noticing that 'EO_PK_TABLE' does not seem to get created.  My TestSuite class is able to successfully login to the database and call a stored function.

Not sure what it all means.

Any help would be greatly appreciated.

Johnny


Begin forwarded message:

From: Johnny Miller <email@hidden>
Date: August 25, 2010 5:43:10 PM HST
To: WebObjects-Dev Mailing List List <email@hidden>
Subject: Having Troubles with JUnit

Out of the blue (or maybe since I updated WOLIPS?) I'm having all kinds of issues with running my test cases on my frameworks.

I found this tidbit on the Wiki that helped (which I didn't seem to need before): http://wiki.objectstyle.org/confluence/display/WO/Testing-JUnit+and+TestNG

But now I'm getting an error on one of my frameworks that I'm unable to create a primary key for the entity I'm testing (IllegalStateException - Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@50152643 failed to provide new primary keys for entity)?

The way I test my EOModels is I have a test database that I setup/tear down every time that I run the test.  I'm able to create the tables (using EOUtilities.rawRowsForSQL) but when I try to saveChanges on the EO i'm creating I get the error above.

I'm using a MySQL database with the MySQL plugin framework.  Did something change recently in WOLips that could have caused my old tests to fail?

Thanks in advance,

Johnny Miller
Kahalawai Media Corp
http://www.kahalawai.com




Johnny Miller
Kahalawai Media Corp
http://www.kahalawai.com


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: Having Troubles with JUnit
      • From: Mike Schrag <email@hidden>
References: 
 >Having Troubles with JUnit (From: Johnny Miller <email@hidden>)
 >Fwd: Having Troubles with JUnit (From: Johnny Miller <email@hidden>)

  • Prev by Date: Fwd: Cloud Computing and PCI Compliance
  • Next by Date: Re: Interacting from command line with wotaskd
  • Previous by thread: Re: Having Troubles with JUnit
  • Next by thread: Re: Having Troubles with JUnit
  • Index(es):
    • Date
    • Thread