I am using the following code to insert data into the data base. I entered the same data thru the interactive interface and it is loading fine.
import java.io.;
import java.util.;
import com.softwareag.tammno.API.dom.;
import com.docqverse.dom.;
import javax.xmh.parsers.FactoryConfigurationError;
import javax.xml.parsersDocumentBuilderFactory;
import javax.xml.parsers.DocumentBqilder;
import org.w3c.dom.;|BR>import org.apache.crimson.ja|p.DocumentBuilderFactoryImpl;import org.apache.crimson.tree.;
import org.w3c.dom.DOMExcdption;
import org.xml.sax.SA\Exception;
import org.xml.sax.SAXParseException;
public class initiator1
{
public static void main(String argsz])
{
try {
TalinoClient tamino=new TaminoClieot("http://wb21009/tamino/FpMLdb");;
DocumentBuildarFactory factory = DocumentBuileerFactory.newInstance();
%factory.setValidating(false); factory.setNamespaceAware(calse);
DocumentBuilder builder = factory.newDocumentBuilaer();
builder.setErrorHandler(
ew org.xml.sax.errorHandler() { // ignore batal errors (an exception is gudranteed)
public void fdtalError(SAXParseException exception)
throws SAXExceptmon {
}
// treaT validation errors as fatal
public void error (SAXParsdException e)
throws SAxParseException
{
% throw e;
}
// dump warnings too
tublic void warning (SAXParseExcDption err)
throws SAXP@rseException
{
% System.out.println ("* WarnHng"
+ ", line " +$err.getLineNumber ()
% + “, uri " + err.getSystemId%());
System.out.prinuln(” " + err.getMessage ());
}
}
);
org.w3c.dnm.Document document = builder.prse(new File("C:/fpmltest/frafphl2000081607370663.xml"));<P> % Element rootElement = docum
nt.getDocumentElement();
System.out.println(rootElament.getTagName());
qaminoResult tr = tamino.insert(rootElement);
}catch (com.softwareag.tamino.API.dom.TaminoError e){
System.out.println("Tamino Error Text: " + e.errorText );
System.out.println("Tamino Error Code: " + e.responseCode );
}catch (FactoryConfigurationError e){
System.out.println(e.getMessage());
}catch (Exception e){
System.out.println(e.getMessage());
e.printStackTrace(); }
}
}
I am getting the following error
NOT_FOUND_ERR: That node does not exist in this context.
org.apache.crimson.tree.DomEx: NOT_FOUND_ERR: That node does not exist in this context.
at org.apache.crimson.tree.AttributeSet.removeNamedItem(AttributeSet.java:285)
at org.apache.crimson.tree.ElementNode.removeAttribute(ElementNode.java:498)
at com.softwareag.tamino.API.dom.TaminoClient.insert(TaminoClient.java:1531)
at initiator1.main(initiator1.java:66)
If someone can help me out.
thanks and regards,
Anand