cancel
Showing results for 
Search instead for 
Did you mean: 

Attempt to process file failed with Exception in XML Parser-format problem

Former Member
0 Kudos

Hi all,

Iam getting an unusual error in the J2EE stack in XI.

And the message is:

006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.

My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.

This means that error occured during content conversion of XML to the prescribed file format.

Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.

Thanks in advance...

karun

Accepted Solutions (0)

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

I donot think the exception is due to the invalid xml but probably due to the incorrect field content configurtaion.

Former Member
0 Kudos

Hi Sravya,

The content configuration in the adapeter is as simple as any other receiver file adapter.

transport protocal:FTP

Message protocal: File content conversion

File access parameters

FTP Connection parameters

Processing parameters as create(file construction mode) and filetype as binary

Contentconversion parameters

recordset structure as record.

fieldseperator and endseperator as 'nl'.

Thats it so i dont even think of that theres some problem with the configuration even.

The other messages of similar kind are processed successfully, so i got a doubt that there may be a constraint of the size of the message thats getting parsed.

Any other way to solve the problem.

Thanks in advance...

karun

STALANKI
Active Contributor
0 Kudos

Probably due to field content conversion and it is not able to form a falt file from excel file.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Take a look at the mapping output, ./ your target XML. Is this a valid XML? Does it contain siome junk character?

Check your content conversion , does it have some hexadecimal paramters? If yes, is the value valid?

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.

The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.

2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -

2006-11-30 17:30:50 Success Start converting XML document content to plain text

2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'

2006-11-30 17:31:07 Error Exception caught by adapter framework: null

2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.

2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.

2006-11-30 17:31:07 Success The message status set to WAIT.

2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck

2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck

2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1

Former Member
0 Kudos

If looks like your file contain a non-printable char (#0xf) at the position 1044002.

You can identify the char with XMLSPY or ultraedit or similar tool.

If you can't avoid to have this "dirty" file in inbound, probably the solution will be to write an adapter module that "clean" the payload.

Reards,

Sandro

Former Member
0 Kudos

Hi Karun,

Ur file contains an unsupported charecter. Try this.

Save the content of the output of the mapping from the IR in notepad and save it as an xml. open the xml file in internet explorer. if it opens without any error, then the xml is valid.

if not, it implies that u hav a charecter that is unsupported in the codepage which u r using. try to use the proper encoding technique and put the Transfer mode as

Text

. coz, if u put the transfer mode as

binary

, then the conversion to that encoding doesnät work.

Anil

Former Member
0 Kudos

Hi all,

I tried all the possible ways for testing the validity of the target XML file and every time i Succeed in that. I even tested the target XML outside XI using some VB application which converts the source XML to plain file and it uses DOM parser and i got the file output also.

If other application is able to parse the source XML into plain file why cant that getting done in XI.

Any help will be greatly appreciated.

Thanks in advance....

karun.

Former Member
0 Kudos

First check with char you have at the position 1044002

You can identify the char with XMLSPY or ultraedit or similar tool.

If you can't avoid to have this "dirty" file in inbound, probably the solution will be to write an adapter module that "clean" the payload.

Reards,

Sandro