Hi all,
just tried to receive a TXMLObject from the database, modify it and perform an update with it. I used the example shown in the documentation for TaminoAPI4Java as reference but it didnt work.
The following exception was thrown:
--------------------------------------
com.softwareag.common.instrumentation.contract.ViolatedPrecondition: Violated Precondition: Update not possible. TXMLObject instance does not contain an ino:id!
at com.softwareag.common.instrumentation.contract.Precondition.check(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TStreamAccessorImpl.update(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TXMLObjectAccessorImpl.update(Unknown Source)
at de.stuttgart.ba.informatik.gehe.dbhandler.XQueryHandler.performUpdate(XQueryHandler.java:224)
at de.stuttgart.ba.informatik.gehe.dbhandler.PersonHandler.savePerson(PersonHandler.java:155)
at de.stuttgart.ba.informatik.gehe.dbhandler.PersonHandler.main(PersonHandler.java:196)
Exception in thread “main”
--------------------------------------
It seems as if my TXMLObject has no ino:id. But I just received it from the database, slightly modified it and then tried to update it.
It might be that this question has already posted. But the Keyword search for the forum (in the dropdown box) doesnt return any results, no matter which word I entered.
Thanks a lot in advance,
Holger
new Update:
I tried a
System.out.println(“Ino:ID” + xmlObject.getI());
and as expected there was no return.
I understand now that my TXMLObject needs to have an ino:id so that the update knows where to insert the xmlObject. But how can I get this id?
Good night,
Holger
OK, now I tried to insert an ino:id on my own like this:
xmlObject.setId(“23”);
23 is my age, so just a random number 
Now the database returns the following exception:
Access failed:Tamino access failure (INOXDE7935, Schema not found, Failed to locate schema for doctype ‘Person’ in collection ‘TigerCollection’.)
Seems as if my database is not configured well.
Any ideas?
Thanks a lot,
Good night (definitely no more work for tonight),
Holger
[This message was edited by Hoscha on 11 March 2004 at 23:43.]
#webMethods#webMethods-Tamino-XML-Server-APIs#API-Management