Announcement

Collapse
No announcement yet.

SELECT XMLTYPE from Source

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    Anybody knows it ???

    Comment


    • #3
      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

      Comment

      Working...
      X