Fixing the BAD XML Instance Issue – OBIEE 11g


“The current xml is invalid with the following errors: Bad xml instance!” is very unusual error but when this has been encountered it is become frustrating as it sounds the entire report can’t be saved !

I remember last time I had faced the similar issue in 11.1.1.3 version while I was building a new report from scratch . The error enforced me not to even edit the reports so I neither I can move to criteria nor I can save this . That was weird !  The only option left was to edit the XML using Catalog manager but until and unless you know where the problem lies you can’t fix it right ?

Now recently I got similar kind of issue in one of our upgraded 11.1.1.6 report which is a Combined request report and when I tried to edit the Criteria Analysis properties Interaction tab to remove Sort column of un-check any other options it throws me below error during the save:

Okay … so the error was at the very last line of the displayed XML as below:

Line:814, Col:61, Element ‘criteria’ is not valid for content model: ‘((criteria,interactionOptions,views,prompts,listOptions),segmentOptions)’

so the bug is around the green circled tags !! Reason is whenever you un-check some options under “Analysis-Properties” it will throw errors !! Probably this is some problem with the up-graded code in 11g from 10g as I tried to replicate the same creating a new reports from scratch which was pretty cool and removing any interaction works perfectly okay in the dashboard report .

After spending some times the reason of the issue found with the fix . I have customized the location for the below tag from Advanced XML :

<saw:interactionOptions drill=”true” movecolumns=”true” sortcolumns=”false” addremovevalues=”true” groupoperations=”true” calcitemoperations=”true” showhidesubtotal=”true” showhiderunningsum=”true” inclexclcolumns=”true”/>

Edited the XML and moved it from beforesection to the end of all. As it is combined request hence several would be present but placed it after all of them.

 After that apply the changes in Advanced XML and voila …. your problem fixed !  Note that this could be the one of incident with BAD XML error and probably you can found it in several other places with no relation to my above fix note . This those cases you need to dig down into more details of the Advanced XML generated and fix those issues as applicable for your case .

Bottom line is same . Dig into the XML details to find out the crappy code and the fix it ! …

So that’s it …. till next time… Happy weekend 🙂

 

3 thoughts on “Fixing the BAD XML Instance Issue – OBIEE 11g

  1. We typically faced this issue in 11.1.1.3 due to setting any kinds of defaults. We backed up the _datatype_formats on a regular basis and restored to older version when such errors prevented us from editing any reports.

    Then again, as you mentioned this could have been just one of the causes.

    Cheers,
    Ram Chaitanya

  2. Thanks for the great post! Why does this error show for some analysis’ and not others? I’m hesitant to do much fixing of XML if it’s something that’ll persist for other analysis’.

    Thanks again.

    • This is typically a weird issue. No straight forward answer to fix it. As Ram mentioned below, it could wise to take the backup of your _datatype_formats code in catalog and restore it to get rid of such incident. But in any case if the issue persist the wise way to do it is, make the same changes in OBIEE 10g version and see the XML difference. I know there might not be a luxury to have another OBIEE instance just to fix this but in my case I did it in that way because we were just upgrading 10g to 11g and I had both env available to see whats going wrong there .

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s