• 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: WebObjects Error in Wonder D2W when populating MS SQL Server example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebObjects Error in Wonder D2W when populating MS SQL Server example


  • Subject: Re: WebObjects Error in Wonder D2W when populating MS SQL Server example
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 26 Sep 2008 11:14:51 -0700

Hi Dan,

If you reverse engineered this database, it is probably missing the EO_PK_TABLE. EOF uses this to keep track of primary keys for databases that don't have sequence generators. Identify columns don't work (or not easily) with EOF as they are populated on the server side and thus EOF does not know the PK value.

You can manually create this table with:

CREATE TABLE EO_PK_TABLE (NAME CHAR(40) PRIMARY KEY, PK INT);


A couple of other SQL Server pointers:

- timestamps are only accurate to 3ms, Java SQL timestamps are accurate to 1. This can cause update failures if you attempt to lock on timestamp columns. I do want to lock on them, so I manually force all timestamps to have 0ms.

- SQL Server does not support deferred constraints (along with several other standard SQL things, but I won't get started on that). Thus, the EOF operations may need to be re-ordered before execution on the DB server to avoid spurious constraint failures. I will attach a custom plugin that handles this (correctly, AFAIK, bug reports welcome).


Chuck


Attachment: MicrosoftPlugIn.tgz
Description: Binary data



Attachment: MicrosoftPlugIn_framework.tgz
Description: Binary data





On Sep 26, 2008, at 10:27 AM, Daniel Beatty wrote:

Greetings Ladies, and Gentlemen,
I am having a bit of a difficulty with Wonder D2W project that I am using to test out an MS SQL Server model for a class and I am hoping to work out the details of our favorite technology, soon. The error occurs when trying to populate a table in the database, in this case the "dept" table. I have produced a record of my work at http://venus.cs.ttu.edu/groups/webobjects/wiki/f136d/Reverse_Engineering_a_MS_SQL_Server_Database_with_Entity_Modeler.html , which is intended to be completed as class example for a database course (preferably using WO.) I could definately use some assistance from the gurus on this one.


In a nutshell, this is intended to be as "plain vanilla" of a D2W example as possible given that we are using a MS SQL Server 2005 database. The good news is that D2W/ Entity Modeler were/ are good for debugging such the database model. The down side, the error shown below is generated when trying to save a new entry in to the database such as dept= {dnum = ?, dname = "pain", mname ="", length= "0", takess = null} where dnum is the key and is a nchar of length 10.

I suppose the question is, how do I ensure that D2W or the database generates a key when it otherwise does not display it? Or should it come from the database, and if so how do I set that property?

Thank you,
Dan


Re-enter
employeeCourseD2W2
Exception Description
Application:
employeeCourseD2W2
Error:
java.lang.IllegalStateException: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@4c8f24 failed to provide new primary keys for entity 'Dept'
Reason:
Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@4c8f24 failed to provide new primary keys for entity 'Dept'
Stack trace:
File
Line#
Method
Package
EODatabaseContext.java
5709
prepareForSaveWithCoordinator
com.webobjects.eoaccess
EOObjectStoreCoordinator.java
365
saveChangesInEditingContext
com.webobjects.eocontrol
EOEditingContext.java
3176
saveChanges
com.webobjects.eocontrol
ERXEC.java
937
_saveChanges
er.extensions
ERXEC.java
860
saveChanges
er.extensions
ERD2WInspectPage.java
198
tryToSaveChanges
er.directtoweb
ERD2WInspectPage.java
244
submitAction
er.directtoweb
NativeMethodAccessorImpl.java
NA
invoke0
sun.reflect
NativeMethodAccessorImpl.java
39
invoke
sun.reflect
DelegatingMethodAccessorImpl.java
25
invoke
sun.reflect
Method.java
585
invoke
java.lang.reflect
NSKeyValueCoding.java
636
methodValue
com.webobjects.foundation
NSKeyValueCoding.java
1134
valueInObject
com.webobjects.foundation
NSKeyValueCoding.java
1293
valueForKey
com.webobjects.foundation
WOComponent.java
1686
valueForKey
com.webobjects.appserver
NSKeyValueCoding.java
447
valueForKey
com.webobjects.foundation
NSKeyValueCodingAdditions.java
212
valueForKeyPath
com.webobjects.foundation
WOComponent.java
1754
valueForKeyPath
com.webobjects.appserver
WOKeyValueAssociation.java
50
valueInComponent
com.webobjects.appserver._private
WOImageButton.java
257
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOConditional.java
86
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WOGenericContainer.java
29
invokeAction
com.webobjects.appserver._private
WOComponentContent.java
38
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WOGenericContainer.java
29
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOConditional.java
86
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOComponent.java
1078
invokeAction
com.webobjects.appserver
ERXComponent.java
88
invokeAction
er.extensions
WOComponentReference.java
127
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOComponentContent.java
38
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
ERXWOForm.java
165
invokeAction
er.extensions
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
ERXWOConditional.java
109
invokeChildrenAction
er.extensions
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
ERXWOConditional.java
100
invokeAction
er.extensions
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOConditional.java
86
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOComponent.java
1078
invokeAction
com.webobjects.appserver
ERXComponent.java
88
invokeAction
er.extensions
WOComponentReference.java
127
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOComponentContent.java
38
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOHTMLURLValuedElement.java
149
invokeAction
com.webobjects.appserver._private
WODynamicGroup.java
105
invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java
115
invokeAction
com.webobjects.appserver._private
WOComponent.java
1078
invokeAction
com.webobjects.appserver
WOComponentReference.java
127
invokeAction
com.webobjects.appserver._private
WOSwitchComponent.java
154
invokeAction
com.webobjects.appserver._private
WOComponent.java
1078
invokeAction
com.webobjects.appserver
ERD2WPage.java
566
invokeAction
er.directtoweb
WOSession.java
1353
invokeAction
com.webobjects.appserver
WOApplication.java
1736
invokeAction
com.webobjects.appserver
ERXAjaxApplication.java
117
invokeAction
er.extensions
ERXApplication.java
1355
invokeAction
er.extensions
WOComponentRequestHandler.java
206
_dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java
298
_dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java
332
_dispatchWithPreparedApplication
com.webobjects.appserver._private
WOComponentRequestHandler.java
369
_handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java
442
handleRequest
com.webobjects.appserver._private
WOApplication.java
1678
dispatchRequest
com.webobjects.appserver
ERXApplication.java
1439
dispatchRequest
er.extensions
WOWorkerThread.java
144
runOnce
com.webobjects.appserver._private
WOWorkerThread.java
226
run
com.webobjects.appserver._private
Thread.java
613
run
java.lang
NA : Non applicable, JIT activated




Dan Beatty, M.S. CS (B.S. EECS)
Ph.D. Student
Texas Tech University
email@hidden
http://venus.cs.ttu.edu/~dabeatty






_______________________________________________ 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

  • Follow-Ups:
    • Re: WebObjects Error in Wonder D2W when populating MS SQL Server example
      • From: David Avendasora <email@hidden>
    • Re: WebObjects Error in Wonder D2W when populating MS SQL Server example
      • From: Daniel Beatty <email@hidden>
References: 
 >WebObjects Error in Wonder D2W when populating MS SQL Server example (From: Daniel Beatty <email@hidden>)

  • Prev by Date: Re: Binary AND Qualifier
  • Next by Date: Re: WebObjects Error in Wonder D2W when populating MS SQL Server example
  • Previous by thread: WebObjects Error in Wonder D2W when populating MS SQL Server example
  • Next by thread: Re: WebObjects Error in Wonder D2W when populating MS SQL Server example
  • Index(es):
    • Date
    • Thread