cancel
Showing results for 
Search instead for 
Did you mean: 

"&# 19" is an invalid XML character.

Former Member
0 Kudos

HI!

I have created a query template which runs an Oracle stored procedure:

CALL Stored_Proc_Name('[Param.1]','[Param.2]',:x).

When I test it and show result in "text/html" it works well.

Now, I have added an "SQL Query action bloc" in a BLS which referred to that last query template. When I'm trying to generate sample XML of the action bloc, I’m getting the following error message:

"There was an error generating sample XML.

Error message: Character reference

"& #19" is an invalid XML character."

I did a search in my result but I didn't find any weird character.

Also, I did try to output the result of my query template in "text/xml" format. I was able to see some results but i was getting a JAVA error on the page: Invalid character.

Any idea of what this could be and to resolve it without encoding database content?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

In which mode is the query executed?

Fixed query or command Query?

Check it out.

test the query template in "xml/html" and see the xml file. if possible post the xml.

Regards,

Kishore

Former Member
0 Kudos

I'm using mode FixedQueryWithOutput.

I did test the query in "text/xml" and I'm getting the same error.

Unfortunatly, since I can't generate the XML files, I can't post it....

I could post the HTML file but it contains more than 10 000 rows. It is a very big file.

Also Oracle version used is 9.2.0.7.0.

Thanks!

jcgood25
Active Contributor
0 Kudos

Marie-Helene,

It may very well be that a non-unicode (unfriendly xml character) symbol ended up in the db through an import of some sort or a copy/paste. If you can focus on the string fields like a comment field, etc. you may be able to filter your query a bit to see where or which record is not playing well with the query template.

It is possible that sending the saved query template results to an iGrid may work since xml is not in the mix. If that works and you can narrow it down you may be able to see the strange character(s) visibly in the applet.

Another thing to try would be to run a query in a format such as: http://<servername>:<port>/Lighthammer/Illuminator?QueryTemplate=Folder/NameQuery&Content-Type=raw/b...

The raw binary feed is the same used by the applets, but when the browser gets the results it won't know what to do with the mime-type and IE will give you the Open/Save As dialog. If you save it to disk you may be able to find the character and position by opening the saved file with a text editor.

Best Regards,

Jeremy Good

Former Member
0 Kudos

Thanks Jeremy.

You are right, there was some non-unicode character in the db. We were getting <TAB> and <!!> in the data fields.

Changes have been done and the stored procedure is translating <TAB> and <!!> to <Space>.

So, the data coming back from the query is all "xml friendly" now.

jcgood25
Active Contributor
0 Kudos

I take it that everything is now working as you expected?

Regards,

Jeremy

Former Member
0 Kudos

Yes, thanks for all!

jamie_cawley
Advisor
Advisor
0 Kudos

What mode are you using on the query template? What version of oracle?

Former Member
0 Kudos

Check your link editors (for the various action blocks) in the BL transaction. May be there's an invalid expression out there.

Former Member
0 Kudos

Thanks Udayan but the problem is not there.

The problem is really in the way results are translate in XML format.

When I'm running my query template in the query template editor and try to show results in "text/xml", I'm getting the same error.

And all Param has a good value.