Strange error inserting nonXML document for Tamino 4.4.1

I am trying to insert non-XML document using code like

  TNonXMLObjectAccessor accessor = connection.newNonXMLObjectAccessor(TAccessLocation.newInstance(collection));
  TNonXMLObject nonXMLObject = TNonXMLObject.newInstance(inputStream, null, document, docname, contentType);
  accessor.insert( nonXMLObject );

and get the error in the last line:

[Fatal Error] :1:424: An invalid XML character (Unicode: 0x1) was found in the element content of the document.

com.softwareag.tamino.db.API.accessor.TInsertException( message: null, tag: JavaTaminoAPI_4_4_1_8, java: 1.5.0_06, os: Windows XP 5.1 ):

For Tamino 4.2.1 it was working OK. contentType is text/html.

It also fails with JavaTaminoAPI_4_2_0_52

I don’t suppose you have a test document available?

Something small that fails would be sufficient.

Actually the problem is that I need just to insert my bytes into Tamino, but I need to specify the contentType (or Tamino will throw the Exception if it do not know about it) and prevent Tamino from attemts to index it.

Using “audio/mpeg” content type solves the problem for 4.4.1 but id oesn’t works with Tamino 4.2.1

I am not able to reproduce the problem.

Can you please paste the part of your non-XML doc that fails ?

This is just String “The report is awaiting execution” converted to new ByteArrayInputStream(text.getBytes(“UTF-8”)).

I am still not to the problem.

Here is what i worked with and it works fine.

String text = “The report is awaiting execution”;
InputStream is = new ByteArrayInputStream(text.getBytes(“UTF-8”));
TNonXMLObject nonXMLObject = TNonXMLObject.newInstance(is, null, “ino:nonXML”, “text1”, “text/html”);
accessor.insert( nonXMLObject );

Its working fine for me on both 4.2.1 and 4.4.1 as well

But can you explain how the error above could happen?

It would help us if you can attach the HTTP Sniffer logs at the situation of the problem