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": [
]
}
Kindly advice.
Thanks
Thanks @Idan, I tried with a Java Program to connect, before trying with the adapter as below,
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"));
}
But I get a com.extendedsystems.jdbc.advantage.ADSException: [Extended Systems][Advantage JDBC]Connection reset
Please Advice.
Thanks
I suspect that problem is in the JDBC URL value.
You have set the following:
<url>jdbc:extendedsystems:advantage://ipaddress:port/wxzy$/TP8/COMPANY/ABCDMAIN/ABCDMAIN.add;</url>
But in the documentation it gives this example:
("jdbc:extendedsystems:advantage://server1:6262/test/data;user=user1;password=up1");
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.