cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing Java Stack AAE Data

Former Member
0 Kudos

Hi,

I am able to extract AAE logs from the Java stack.

I am facing problems in parsing this data.

Manual observation reveals the main logs, but I get a lot of junk (non displayable characters also).

The field in question is AUDIT_DATA from BC_MSG_AUDIT (PI 7.1)

I am reading the blob data as UTF-8 string via InputStreamReader.

I have added a function to strip the string from invalid XML characters (as i am returning data via a web service).

I am pasting a sample output:

��ur9[Lcom.sap.engine.messaging.impl.util.auditlog.AuditEntry;�U7t�(xpsr6com.sap.engine.messaging.impl.util.auditlog.AuditEntry*Z

msgExists_[params_t[Ljava/lang/String;Lstatus_tALcom/sap/engine/interfaces/messaging/api/auditlog/AuditLogStatus;LtextKey_tLjava/lang/String;L

timestamp_tLjava/sql/Timestamp;xpur[Ljava.lang.String;��V��{GxptDLNGppppsr?com.sap.engine.interfaces.messaging.api.auditlog.AuditLogStatus*IhashCodeLvalueqxp����tStSTATUS_SET_SUCCESSsrjava.sql.Timestamp&��S�eInanosxrjava.util.Datehj�KYtxpw'��xv��squqpppppqtAFW_MARK_FOR_RETRYsq~w'��x

��@squqt Mail_http://sap.com/xi/XI/Systemtpcom.sap.engine.interfaces.messaging.api.exception.RetryControlException: Channel stopped by administrative task.pppsq����tEtRECEIVE_DELIVER_ERRORsqw'��x

��squqtNDLVppppqqsq~w'��x�@

As u can see, most of the main error messages are there, but why all the junk characters??

Cheers,

Earlence

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

> I am reading the blob data as UTF-8 string via InputStreamReader.

Obviously the data is not UTF-8 encoded. So try another code page.

It could be ASCII

Former Member
0 Kudos

Earlier i was getting errors that invalid "Unicode" characters are present.

Hence the stream is unicode.

Cheers,

Earlence

stefan_grube
Active Contributor
0 Kudos

you are right.

�ï is a BOM.

Strange, that this occurs so often.

So you have to remove that BOM in your Java code.

Former Member
0 Kudos

Hi,

Thanks! That helped a lot.

would this occurence of so many BOMs be specific to PI or could there be something wrong in data retrieval?

cheers,

Earlence

stefan_grube
Active Contributor
0 Kudos

> would this occurence of so many BOMs be specific to PI or could there be something wrong in data retrieval?

I think the BOM is part of the database content, so you cannot do anything here.

Former Member
0 Kudos

Hi,

I am still not able to decode the blob properly.

There are too many BOMs and other supposedly "junk" characters which most probably might be chars which are not decoded properly.

Any ideas anyone???

Cheers,

Earlence