• 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
OpenbasePKPlugin: NEWID FOR null ID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OpenbasePKPlugin: NEWID FOR null ID


  • Subject: OpenbasePKPlugin: NEWID FOR null ID
  • From: Shelley Eitzen <email@hidden>
  • Date: Thu, 24 Jul 2008 11:30:27 +0930

Hi All,

we are trying to convert an existing application to use the OpenbasePKPlugin.

We have included the driver and plugin details in the model and the application successfully starts and
for some entities a primary key is generated without using the EO_PK_TABLE.


but we get "NEWID FOR null ID" when we try and insert a new row into a particular table
The tablename is included in the entity, it has a primary key defined with a unique index.



error exert:
251819 [WorkerThread8] INFO er.transaction.adaptor.Exceptions - Database Exception occured: com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression: "NEWID FOR null ID">:
Next exception:SQL State:42000 -- error code: 0 -- msg: SQL ERROR - [position 9, near '
' in 'NEWID FOR null ID'] newid failed - a table name was expected but was not found.


SQL: [B@9f6a5e
251819 [WorkerThread8] WARN NSLog - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression: "NEWID FOR null ID">:
Next exception:SQL State:42000 -- error code: 0 -- msg: SQL ERROR - [position 9, near '
' in 'NEWID FOR null ID'] newid failed - a table name was expected but was not found.


SQL: [B@9f6a5e
[2008-07-24 11:10:13 CST] <WorkerThread8> com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression: "NEWID FOR null ID">:
Next exception:SQL State:42000 -- error code: 0 -- msg: SQL ERROR - [position 9, near '
' in 'NEWID FOR null ID'] newid failed - a table name was expected but was not found.


SQL: [B@9f6a5e
at com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel(JDBCContext.java:138)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:310)
at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:261)
at com.webobjects.jdbcadaptor.OpenBasePKPlugIn.newPrimaryKeys(OpenBasePKPlugIn.java:68)
at com.webobjects.jdbcadaptor.JDBCChannel.primaryKeysForNewRowsWithEntity(JDBCChannel.java:537)
at com.webobjects.eoaccess.EODatabaseContext._batchNewPrimaryKeysWithEntity(EODatabaseContext.java:5900)
at com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5883)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:409)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3226)
at er.extensions.ERXEC._saveChanges(ERXEC.java:937)
at er.extensions.ERXEC.saveChanges(ERXEC.java:860)
at CEContributorsEditingComponent.setACompetencyIsUsedForATarget(CEContributorsEditingComponent.java:91)
.....



code exert:

public void setACompetencyIsUsedForATarget( boolean set) {
if ( set && !aCompetencyIsUsedForATarget() && sourceObject!=null) {
aCEContributor = (CEContributorTraining)EOUtilities.createAndInsertInstance(sourceObject.editingContext(), "CEContributorTraining");
aCEContributor.addObjectToBothSidesOfRelationshipWithKey(aCompetency, "toIndividualCompetency");
if (aCETypeTarget!=null) aCEContributor.addObjectToBothSidesOfRelationshipWithKey(aCETypeTarget.toCEType(), "toCEType");
sourceObject.addObjectToBothSidesOfRelationshipWithKey(aCEContributor, "toCEContributors");
}



Can anyone assist?

Environment:
Openbase 10.0.10
Leopard 10.5.3
WebObjects 5.3
Eclipse 3.3.2



Thanks in advance

Shelley

_______________________________________________
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:
    • Unable to release locks held by deallocated EOEditingContext
      • From: Joe Moreno <email@hidden>
  • Prev by Date: Re: Parameterized NSArray in 5.3.3
  • Next by Date: WOActionURL causes session to be created
  • Previous by thread: Re: DBEdit with MacIntel
  • Next by thread: Unable to release locks held by deallocated EOEditingContext
  • Index(es):
    • Date
    • Thread