MuleSoft和SQL Server数据库连接失败 [英] MuleSoft and SQL Server DB connection failure

查看:119
本文介绍了MuleSoft和SQL Server数据库连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望大家能为我提供帮助,在我身旁使用MuleSoft(MS)专家已有2天了,我们无法解决这个问题.简而言之,我们无法连接到SQL Server数据库.我正在使用Generic_Database_Connectory并提供以下信息:

I hope you all can help me, it's been 2 days WITH a MuleSoft(MS) Guru by my side and we cannot figure this issue out. Simply put, we cannot connect to a SQL Server database. I am using a Generic_Database_Connectory with the following information:

  • URL:jdbc:jtds:sqlserver://ba-crmdb01.ove.local:60520;Instance=CRM;user=rcapilli...
  • 驱动程序类名称:com.microsoft.sqlserver.jdbc.SQLServerDriver
  • URL: jdbc:jtds:sqlserver://ba-crmdb01.ove.local:60520;Instance=CRM;user=rcapilli...
  • Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver

这是最新的sqljdbc4.jar文件. 测试连接"工作正常.那里没有问题.但是当我运行该应用程序时,出现此错误(如下)

It's a sqljdbc4.jar file, the latest. The "test connection" works fine. No issues there. But when I run the app, I get this error (below)

任何人都可以使SQL Server数据库连接正常工作?

Anyone been able to get a SQL Server DB connection to work???

ERROR 2015-04-09 14:05:31,106 [pool-17-thread-1] org.mule.exception.DefaultSystemExceptionStrategy: Caught exception in Exception Strategy: null
java.lang.NullPointerException
	at org.mule.module.db.internal.domain.connection.DefaultDbConnection.isClosed(DefaultDbConnection.java:100) ~[mule-module-db-3.6.1.jar:3.6.1]
	at org.mule.module.db.internal.domain.connection.TransactionalDbConnectionFactory.releaseConnection(TransactionalDbConnectionFactory.java:136) ~[mule-module-db-3.6.1.jar:3.6.1]
	at org.mule.module.db.internal.processor.AbstractDbMessageProcessor.process(AbstractDbMessageProcessor.java:99) ~[mule-module-db-3.6.1.jar:3.6.1]
	at org.mule.transport.polling.MessageProcessorPollingMessageReceiver$1.process(MessageProcessorPollingMessageReceiver.java:164) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.transport.polling.MessageProcessorPollingMessageReceiver$1.process(MessageProcessorPollingMessageReceiver.java:148) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:16) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:30) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:14) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:54) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:44) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:50) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:40) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:41) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:48) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:28) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:13) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:109) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:30) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.transport.polling.MessageProcessorPollingMessageReceiver.pollWith(MessageProcessorPollingMessageReceiver.java:147) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.transport.polling.MessageProcessorPollingMessageReceiver.poll(MessageProcessorPollingMessageReceiver.java:138) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:216) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:80) ~[mule-core-3.6.1.jar:3.6.1]
	at org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:49) ~[mule-core-3.6.1.jar:3.6.1]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_75]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) ~[?:1.7.0_75]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) ~[?:1.7.0_75]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.7.0_75]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_75]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_75]
	at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]

推荐答案

这是我以前的配置方式,它对我有用..您可以尝试以下示例:-

This is how I used to configure and it works for me.. you can try this example :-

<db:generic-config name="Generic_Database_Configuration"
        url="jdbc:sqlserver://ANIRBAN-PC\\SQLEXPRESS:1433;databaseName=MyDBName;user=sa;password=mypassword"
        driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" doc:name="Generic Database Configuration" />

,在M子流中:-

<db:select config-ref="Generic_Database_Configuration" doc:name="Database">
    <db:parameterized-query><![CDATA[select * from table1]]></db:parameterized-query>
  </db:select>  

这篇关于MuleSoft和SQL Server数据库连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆