web stats
Problem with database reader on sql server 2005 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2012, 03:34 AM
merics merics is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 5
merics
Default Problem with database reader on sql server 2005

Hallo, i update my mirth to the new version 2.2.1.5861 (old 1.8.2.4472) and i have setted mirth with sql driver jdbc (sqljdbc4.jar) and i have added the new line on dbdrivers.xml file for SQL Server 2005.
But it doesn't work, i have a problem with all the channel that connecting on database reader with ms sql server 2005 connection.
The channel open a connection with this string "jdbc:sqlserver://xxxxx:1433;databaseName=yyy;" and sql specific account but don't retrieve the tables from the db. With the older version i didn't have any problem, the sql account is the same and the connection string also.
Any help is appreciated!
Attached Images
File Type: jpg mirth.jpg (164.1 KB, 16 views)
Reply With Quote
  #2  
Old 07-10-2012, 07:11 AM
upstart33 upstart33 is offline
Mirth Guru
 
Join Date: Dec 2010
Location: Chicago, IL.
Posts: 392
upstart33 is on a distinguished road
Default

Try this instead:

Code:
jdbc:jtds:sqlserver://server:port/database
Reply With Quote
  #3  
Old 07-10-2012, 07:12 AM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 588
cory_cole is on a distinguished road
Default

Are you getting any errors?
Reply With Quote
  #4  
Old 07-11-2012, 03:06 AM
merics merics is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 5
merics
Default

Yes i receive this error:
Thanks

[2012-07-11 12:05:15,343] ERROR (org.mule.impl.model.seda.SedaModel:194): Error encountered starting channel: 8084dcd5-d0c0-4d38-895b-cea02dd84ba2
org.mule.providers.FatalConnectException: ReconnectStrategy "org.mule.providers.SingleAttemptConnectionStrateg y" failed to reconnect receiver on endpoint "jdbc://query"
at org.mule.providers.SingleAttemptConnectionStrategy .doConnect(SingleAttemptConnectionStrategy.java:34 )
at org.mule.providers.AbstractConnectionStrategy.conn ect(AbstractConnectionStrategy.java:67)
at org.mule.providers.AbstractMessageReceiver.start(A bstractMessageReceiver.java:391)
at org.mule.providers.AbstractConnector.registerListe ner(AbstractConnector.java:508)
at org.mule.impl.model.AbstractModel.registerListener s(AbstractModel.java:240)
at org.mule.impl.model.AbstractModel.registerComponen t(AbstractModel.java:190)
at com.mirth.connect.server.controllers.MuleEngineCon troller.registerChannel(MuleEngineController.java: 380)
at com.mirth.connect.server.controllers.MuleEngineCon troller.deployChannels(MuleEngineController.java:2 22)
at com.mirth.connect.server.controllers.MuleEngineCon troller.redeployAllChannels(MuleEngineController.j ava:334)
at com.mirth.connect.server.servlets.EngineServlet.do Post(EngineServlet.java:54)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:547)
at org.eclipse.jetty.servlet.ServletHandler.doHandle( ServletHandler.java:480)
at org.eclipse.jetty.server.session.SessionHandler.do Handle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.do Handle(ContextHandler.java:941)
at org.eclipse.jetty.servlet.ServletHandler.doScope(S ervletHandler.java:409)
at org.eclipse.jetty.server.session.SessionHandler.do Scope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.do Scope(ContextHandler.java:875)
at org.eclipse.jetty.server.handler.ScopedHandler.han dle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handl e(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.ha ndle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java :349)
at org.eclipse.jetty.server.HttpConnection.handleRequ est(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHan dler.content(HttpConnection.java:936)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpPa rser.java:801)
at org.eclipse.jetty.http.HttpParser.parseAvailable(H ttpParser.java:224)
at org.eclipse.jetty.server.AsyncHttpConnection.handl e(AsyncHttpConnection.java:51)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.han dle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.r un(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.run Job(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.r un(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)Caused by: org.mule.providers.FatalConnectException: ReconnectStrategy "org.mule.providers.SingleAttemptConnectionStrateg y" failed to reconnect receiver on endpoint "jdbc://query"
at org.mule.providers.SingleAttemptConnectionStrategy .doConnect(SingleAttemptConnectionStrategy.java:34 )
at org.mule.providers.AbstractConnectionStrategy.conn ect(AbstractConnectionStrategy.java:67)
at org.mule.providers.AbstractMessageReceiver.connect (AbstractMessageReceiver.java:348)
at org.mule.providers.SingleAttemptConnectionStrategy .doConnect(SingleAttemptConnectionStrategy.java:32 )
... 32 moreCaused by: org.mule.providers.ConnectException: Initialisation Failure: Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL 'jdbc:jtds:sqlserver://GVMSMACKSQL:1433/SLW'
at com.mirth.connect.connectors.jdbc.JdbcMessageRecei ver.doConnect(JdbcMessageReceiver.java:112)
at org.mule.providers.AbstractMessageReceiver.connect (AbstractMessageReceiver.java:355)
at org.mule.providers.SingleAttemptConnectionStrategy .doConnect(SingleAttemptConnectionStrategy.java:32 )
... 35 moreCaused by: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL 'jdbc:jtds:sqlserver://GVMSMACKSQL:1433/SLW'
at org.apache.commons.dbcp.BasicDataSource.createConn ectionFactory(BasicDataSource.java:1452)
at org.apache.commons.dbcp.BasicDataSource.createData Source(BasicDataSource.java:1371)
at org.apache.commons.dbcp.BasicDataSource.getConnect ion(BasicDataSource.java:1044)
at com.mirth.connect.connectors.jdbc.JdbcConnector.ge tConnection(JdbcConnector.java:425)
at com.mirth.connect.connectors.jdbc.JdbcMessageRecei ver.doConnect(JdbcMessageReceiver.java:109)
... 37 moreCaused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.commons.dbcp.BasicDataSource.createConn ectionFactory(BasicDataSource.java:1437)
... 41 more
Reply With Quote
  #5  
Old 07-11-2012, 03:19 AM
merics merics is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 5
merics
Default

Instead if i use this string: jdbc:sqlserver://xxx:1433;databaseName=yyy; the error that i receive is:

[2012-07-11 12:17:25,401] FATAL (org.mule.impl.DefaultComponentExceptionStrategy:8 4): The error is: com.microsoft.sqlserver.jdbc.SQLServerException: Could not retrieve database tables select .....
Reply With Quote
  #6  
Old 07-11-2012, 06:03 AM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 588
cory_cole is on a distinguished road
Default

Try to run your query directly in SQL Server.
Reply With Quote
  #7  
Old 07-11-2012, 06:12 AM
merics merics is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 5
merics
Default

The query succeded on SQL Server, it's a simple select * from table. The query is the same that was on the old version of Mirth. Nothing was changed, only the version of Mirth. The server is the same with same account...can be a problem with permission of the sql account? I don't have another solution. Thank you very much
Reply With Quote
  #8  
Old 07-11-2012, 06:51 AM
upstart33 upstart33 is offline
Mirth Guru
 
Join Date: Dec 2010
Location: Chicago, IL.
Posts: 392
upstart33 is on a distinguished road
Default

Maybe this thread will help?

http://www.mirthcorp.com/community/f...atabase+tables
Reply With Quote
  #9  
Old 07-13-2012, 02:58 AM
merics merics is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 5
merics
Default

In this mode i have resolved:
Use Javascript = YES and
var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('com.microsoft.sqlserver.jdbc.SQLServerDriver','j dbc:sqlserver://XXX:1433;databaseName=YYY;','user','pwd');
var exp = "select * from xxx";
var result = dbConn.executeCachedQuery(exp);
dbConn.commit();
dbConn.close();
return result;

Thank you very much!
Reply With Quote
Reply

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 -7. The time now is 08:15 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Mirth Corporation