web stats
Database Reader Error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 02-17-2016, 07:22 AM
atibbits atibbits is offline
Mirth Guru
Join Date: May 2012
Location: Salina, KS
Posts: 381
atibbits is on a distinguished road
Thumbs down Database Reader Error

I keep getting the following error when I try and execute SQL code from a database reader channel.

[2016-02-17 10:12:11,479]  ERROR (com.mirth.connect.connectors.jdbc.DatabaseReceiver:212): Failed to process row retrieved from the database in channel "CMR_OP_referral_orders"
org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
I understand that it having an issue with some of my data I am trying to pull in, but is there a way to still pull the data in? The other strange thing is I can execute this exact code in a lower version of Mirth (i.e. and it runs just fine. However, in version I get this error. Any thoughts???
Reply With Quote
Old 02-17-2016, 11:15 AM
jackwhaines jackwhaines is offline
Join Date: May 2011
Location: Kansas City, Missouri
Posts: 255
jackwhaines is on a distinguished road
Send a message via Skype™ to jackwhaines

Check out this post. Explains how to remove/replace illegal XML characters before Mirth starts processing.


-= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
-= jack.haines@HealthcareIntegrations.com
-= Mirth Connect (Advanced)-certified
-= Gold member of HL7.org
-= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines
Reply With Quote
Old 02-19-2016, 08:49 AM
atibbits atibbits is offline
Mirth Guru
Join Date: May 2012
Location: Salina, KS
Posts: 381
atibbits is on a distinguished road

That's a neat trick! I couldn't get it to work for my problem, but it is good to know that exists. Thanks!
Reply With Quote
Old 03-09-2017, 01:24 PM
mhaase mhaase is offline
OBX.2 Kenobi
Join Date: Dec 2015
Posts: 62
mhaase is on a distinguished road

So I've applied the following method to a handful of SQL queries that presented this error and it has fixed them all so far.

xyz.PatNo as "Patient Number"

Removing ALL double quotes from the query and truncating the alias:

xyz.PatNo as PatientNumber

This is assuming you want to retain the alias. Hope this helps!
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 07:33 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation