Hi,
I am trying to insert an xml document into a collection with 2 doctypes,
but I get an error.
The error message is:
com.softwareag.tamino.db.API.accessor.TInsertException( message: null, tag: JavaTaminoAPI_4_2_0_53, java: 1.4.2_08, os: Windows XP 5.1 ):
at com.softwareag.tamino.db.api.accessor.TAccessFailureVerifier.verifyInsertResponse(Unknown Source)
at com.softwareag.tamino.db.api.accessor.TXMLObjectAccessorImpl.insert(Unknown Source)
at com.softwareag.tils.TestTamino.main(TestTamino.java:100)
Caused by: com.softwareag.tamino.db.API.common.TAccessFailureException( message: Tamino access failure (7935, INOXDE7935, Schema not found), tag: JavaTaminoAPI_4_2_0_53, java: 1.4.2_08, os: Windows XP 5.1 ):
at com.softwareag.tamino.db.api.accessor.TAccessFailureVerifier.newAccessFailureException(Unknown Source)
at com.softwareag.tamino.db.api.accessor.TAccessFailureVerifier.verify(Unknown Source)
... 3 more
while the source code is:
String xmlString=“3descrizione”;
try{
conn = TConnectionFactory.getInstance().newConnection(DATABASE_URL + "/" + COLLECTION,DOCTYPE,USERNAME,PASSWORD );
}
catch(TServerNotAvailableException e){
e.printStackTrace();
}
transaction = conn.useLocalTransactionMode();
// Obtain a TXMLObjectAccessor with a DOM object model
TXMLObjectAccessor xmlObjectAccessor = conn.newXMLObjectAccessor(
TAccessLocation.newInstance(COLLECTION),
TDOMObjectModel.getInstance() );
Xml x = new Xml();
Document mydoc = x.StringToDom(xmlString); // w3c Document
TXMLObject tobj = TXMLObject.newInstance( mydoc);
try{
xmlObjectAccessor.insert( tobj ); //eseguo la insert
transaction.commit(); //faccio la commit
}catch (TAccessorException accessorException) {
transaction.rollback();
accessorException.printStackTrace();
}finally{
conn.useAutoCommitMode();
try {
conn.close();
} catch (TConnectionCloseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //chiudo la connessione
}
}
Does anyone can help me?