小编Rom*_*nov的帖子

无法创建与数据库的连接(ColdFusion)

我正在通过ColdFusion创建一个简单的CRUD应用程序.我要去ColdFusion管理员面板http://localhost:8600/CFIDE/administrator/index.cfm,并添加一个"新数据源".但是我收到以下错误:

Connection verification failed for data source: dsnMyVariable
java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. 
The root cause was that: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Run Code Online (Sandbox Code Playgroud)

DSN SQLNonTransientConnectionException错误

mysql coldfusion coldfusion-2016

5
推荐指数
1
解决办法
3188
查看次数

在 Coldfusion 线程中使用函数参数

如何在 Coldfusion 线程中使用函数参数?我不明白为什么会出现以下错误:

元素 SOMEID 在 ARGUMENTS 中未定义。

我的代码的简化示例。

public any function createSomeEntity(required numeric someId) {     
    thread action="run" name="someThread" {
        var result = someFunction(someId = arguments.someId);
        // some logic
    }
    thread action="join" name="someThread" timeout="5000";
    
    if (someThread.status != "COMPLETED") {
        // action 1
    } else {
        // action 2
    }
}       
Run Code Online (Sandbox Code Playgroud)

coldfusion multithreading cfthread

4
推荐指数
1
解决办法
46
查看次数