Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   SELECT XMLTYPE from Source (http://www.mirthcorp.com/community/forums/showthread.php?t=219203)

fospi 06-18-2019 07:45 AM

SELECT XMLTYPE from Source
 
Hi, I'm using Mirth Connect 3.0 version.

I have a problem with a Database reader:

I'm trying to read from ORACLE this select:

SELECT ID, MSG_DATE, SEND, XML_MSG FROM TABLE_NAME

Where XML_MSG is a XMLTYPE based in CLOB. And I need to read ths XML from it.

If I tried to do this select from Oracle it works perfectly, however from MIRTH i have this error:

[2019-06-18 16:44:30,085] ERROR (com.mirth.connect.connectors.jdbc.DatabaseReceive r:131): Failed to poll for messages from the database in channel "Messages - SAP ECOFIN"
java.lang.NullPointerException
at oracle.jdbc.driver.NamedTypeAccessor.getOracleObje ct(NamedTypeAccessor.java:302)
at oracle.jdbc.driver.NamedTypeAccessor.getObject(Nam edTypeAccessor.java:164)
at oracle.jdbc.driver.NamedTypeAccessor.getObject(Nam edTypeAccessor.java:121)
at oracle.jdbc.driver.OracleResultSetImpl.getObject(O racleResultSetImpl.java:1108)
at com.sun.rowset.CachedRowSetImpl.populate(Unknown Source)
at com.mirth.connect.connectors.jdbc.DatabaseReceiver Query.poll(DatabaseReceiverQuery.java:166)
at com.mirth.connect.connectors.jdbc.DatabaseReceiver .poll(DatabaseReceiver.java:111)
at com.mirth.connect.donkey.server.channel.PollConnec tor$PollConnectorTask.run(PollConnector.java:141)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)

Seems the problem is charging the xml type but i don't understand how to do it.

Anybody knows why????

Thanks in advance.

fospi 08-30-2019 12:57 AM

Anybody knows it ???

agermano 08-30-2019 10:37 AM

According to this: https://oracle-base.com/articles/9i/xmltype-datatype

You can probably do:

Code:

SELECT ID, MSG_DATE, SEND, XML_MSG.getStringValue() FROM TABLE_NAME


All times are GMT -8. The time now is 12:20 AM.

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