Hi, I have an application that loops thru Employee document and prints them depending on whether they meet several conditions and renames the Employee element to SubmissionEmployee in the application. Now I want to insert all the SubmissionEmployee document back into tamino.
outputter.output(employee, System.out);
// Insert the new Object to Tamino
TXMLObject submissionEmployee = TXMLObject.newInstance(employee);
response = accessor.insert(submissionEmployee);
I now get an error Tamino access failure (, (cvc-particle.2.1): element content missing, minOccurs constraint violation in element declaration, Line 1, Column 38: Line 1, Column 38: [element “EmployeeDetails” in element “SubmissionEmployee”]) What can be the problem and how best can I solve it. Thanks
The error arises simply because the the modified document does not conform to the schema. The error says that there is no EmployeeDetails element in SubmissionEmployee. This can be solved by modifying the schema to add/change the minOccurs facette on the EmployeeDetails element with the value “0” to make it optional.
Thanks for the reply Stuart, I’ve checked… the modified document conforms to the SubmissionEmployee Schema. The EmployeeDetails element is there as well. I’ve also modified the schema but I still get the same error Nested Exception ( com.softwareag.tamino.db.API.common.TAccessFailureException, tag: JavaTaminoAPI_4_1_4_42_1_1, java: 1.4.1_02, os: Windows XP 5.1 ) stacktrace: Attached please find the result document that I get out of my java program and the SubmissionEmployee schema. Thanks SubmissionEmployee.tsd (9.01 KB)
Hello, the xml document can be stored againest the schema. So I am guessing now there is a different problem and the error now is different to the original one? If not is the database and collection that the java program is updating correct - does it have the correct schema?