Worklight Adapter连接到Advantage数据库 [英] Worklight Adapter to connect to Advantage Database

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

问题描述

我需要通过worklight Adapter连接到Advantage数据库。
我添加了adsjdbc.jar(8.1),并在* SQLadapter.xml文件中添加了数据源定义

I need to connect to the Advantage Database through worklight Adapter. I added the adsjdbc.jar(8.1), and added the datasource definition in *SQLadapter.xml file

<dataSourceDefinition>
<driverClass>com.extendedsystems.jdbc.advantage.ADSDriver</driverClass>
<url>jdbc:extendedsystems:advantage://ipaddress:port/wxzy$/TP8/COMPANY/ABCDMAIN/ABCDMAIN.add;</url>
<user>xyz</user>
<password>12345</password>
</dataSourceDefinition>

当我尝试调用该程序时,它抛出

When I try to Invoke the procedure, It throws

{
"errors": [
 "Runtime: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([Extended Systems][Advantage JDBC]Connection reset)"
],
"info": [
 ],
"isSuccessful": false,
"warnings": [
]
}

请提供建议。

谢谢@Idan,
我尝试使用Java程序进行连接,然后尝试使用以下适配器,

Thanks @Idan, I tried with a Java Program to connect, before trying with the adapter as below,

Class.forName(com.extendedsystems.jdbc.advantage.ADSDriver);

Class.forName("com.extendedsystems.jdbc.advantage.ADSDriver");

connection = DriverManager.getConnection("jdbc:extendedsystems:" +
        "advantage://port:host//abcd$//TP8//COMPANY//XYZMAIN//XYZMAIN.add;user=xxxx;password=123456");
 statement = connection.createStatement();
resultSet = statement.executeQuery("select * from USERS");
while (resultSet.next()) {
 System.out.println("PS USER NAME :"+ resultSet.getInt("PS_USERNAME"));
}

但是我得到了一个com.extendedsystems.jdbc.advantage.ADSException:[Extended系统] [优势JDBC]连接重置

But I get a com.extendedsystems.jdbc.advantage.ADSException: [Extended Systems][Advantage JDBC]Connection reset

请咨询。

谢谢

推荐答案

我怀疑问题出在JDBC URL值中。

I suspect that problem is in the JDBC URL value.

您已设置以下内容:
< url> jdbc:extendedsystems:advantage:// ipaddress:port / wxzy $ / TP8 / COMPANY / ABCDMAIN / ABCDMAIN.add;< / url>

但在文档中给出了这个例子:
(jdbc:extendedsystems:advantage:// server1:6262 / test / data; user = user1; password = up1);

But in the documentation it gives this example: ("jdbc:extendedsystems:advantage://server1:6262/test/data;user=user1;password=up1");

所以如果我是你,我会检查你为什么使用JBDC URL你曾在那里使用过,它似乎与Advantage数据库的产品目录不一致。

So if I were you I'd check why you used the JBDC URL that you've used there, which does not seem to be inline with the product doucmentation of Advantage Database.

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

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