Tamino insert problems

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?

I suspect that “*” is an invalid XML element name.

I would expect the document to have a top level element name corresponding to one of the doctypes in the collection.

Hi Mark,
I am sorry but there was an error on my cut/paste operation.
The root of the element is “fagioli”.
So, the doctype id “fagioli”.

It seems the API cannot recognize the schema.

I will send you the Java class as attach

Thanks a lot
TestTamino.java (2.76 KB)

I’m afraid I can’t see the code/attachment.

The error that you are observing is coming from Tamino - are you certain that the root element name corresponds to a doctype that has been defined within the collection?

Hi Mark
here is the .java file, in zip format.

The root elements corresponds to a doctype defined into the collection.
I cannot understand the problem I am having

Regards
TestTamino.zip (1.04 KB)

I suspect there is a fault in the serialization of the XML.

Check out the example code ProcessXMLGreeting in JavaTaminoAPIExamples.jar that ships with Tamino.