web stats
Mirth DataWriter does not connect with Oracle 11g - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2016, 11:36 AM
itsjohn itsjohn is offline
OBX.1 Kenobi
 
Join Date: Feb 2013
Posts: 42
itsjohn is on a distinguished road
Post Mirth DataWriter does not connect with Oracle 11g

Hi All,

Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
Mirth Connect Server 3.4.2.8129 64bit
Java version: 1.8.0_111

I am unable to connect to an Oracle Database 11g Express. I have installed Oracle Express Edition and the TNSNAMES.ORA contains an entry like this:
XE = XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = username-txl.city.corp.company.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

I am using a Database Writer with connection string with the service name in the connection template (Javascript disabled):
jdbcracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL= TCP)(HOST=username-txl.city.corp.company.com)(PORT = 1521))(CONNECT_DATA=(SERVICE_NAME=XE)))

When i click on the insert=>get tables i do not get any errors and neither does the table list fetched. Same happens when i use the SID or DB name: xe using connection string:
jdbcracle:thin:@username-txl.city.corp.company.com:1521:xe (or XE)

I tested the connection string with a Database Reader (Javascript disabled) and on clicking Select button, it doesnt fetch the tables but if I use a SELECT statement it works. Just wanted to know why the fetching of tables doesn't work.

As part of this question, I also wanted to know if Oracle data types like blob and XMLTypes are supported in Mirth Connect.


Can anyone help me with this issues? Thanks in advance!

Last edited by itsjohn; 11-01-2016 at 11:44 AM.
Reply With Quote
  #2  
Old 11-01-2016, 11:49 AM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

So it IS connecting if you can run a select and get data. Am I missing something??
Reply With Quote
  #3  
Old 11-01-2016, 11:53 AM
itsjohn itsjohn is offline
OBX.1 Kenobi
 
Join Date: Feb 2013
Posts: 42
itsjohn is on a distinguished road
Default

Its connecting but the Mirth does not fetch the tables when I click on Get Tables in the database writer connector.

I also wanted to know if Oracle data types like blob and XMLTypes are supported in Mirth Connect.
Reply With Quote
  #4  
Old 11-01-2016, 11:59 AM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

I've been working with MC and databases for 5 years and I don't think I've ever seen the fetching "feature" work. LOL

I'm also pretty sure I've used BLOBS before as well.
Reply With Quote
  #5  
Old 11-01-2016, 12:00 PM
itsjohn itsjohn is offline
OBX.1 Kenobi
 
Join Date: Feb 2013
Posts: 42
itsjohn is on a distinguished road
Default

Thanks! Just tried fetching a BLOB and it worked! Do you know how to insert a XMLType in Mirth Connect?
Reply With Quote
  #6  
Old 11-01-2016, 12:06 PM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

Quote:
Originally Posted by itsjohn View Post
Thanks! Just tried fetching a BLOB and it worked! Do you know how to insert a XMLType in Mirth Connect?
I do not. I've not had to work with that yet.
Reply With Quote
  #7  
Old 11-01-2016, 12:11 PM
itsjohn itsjohn is offline
OBX.1 Kenobi
 
Join Date: Feb 2013
Posts: 42
itsjohn is on a distinguished road
Default

Has anyone used Oracle data type XMLTypes with Mirth Connect? Do they work with inserts? I would appreciate if you give a code snippet for it. Thanks!
Reply With Quote
  #8  
Old 11-02-2016, 06:25 AM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

Not my answer. From the new Mirth Connect Slack Channel
http://www.mirthcorp.com/community/f...d.php?t=216581



Quote:

hugosoares

the easy way to do this is just create a statement like:

"insert into table values (xmlType(?))"

and then set the parameter like:

stmt.setString(1, '<xml>Hi there</xml>')
Reply With Quote
  #9  
Old 11-02-2016, 08:15 AM
itsjohn itsjohn is offline
OBX.1 Kenobi
 
Join Date: Feb 2013
Posts: 42
itsjohn is on a distinguished road
Default

Thanks for your reply!

That code doesnt work! The following error is thrown:
DETAILS: JavaException: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
Reply With Quote
Reply

Tags
blob, database writer, oracle, xmltype

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 09:38 AM.


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