Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception :java.sql.SQLException: Incorrect list format: 7 > 1

 
Sri Palem
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Cache DB for my application.
I configured the drivers correctly and added CacheDB.jar too in my classpath. I dont know whats wrong with the connection information. Whenever i try connecting to Cache DB it is giving the above mentioned error. My code is as follows..

String url = "jdbc:Cache://<IP Address>:<Port>/<Namespace>";
Driver drv = (Driver) Class.forName("com.intersys.jdbc.CacheDriver").newInstance();
DriverManager.registerDriver(drv);
con = DriverManager.getConnection(url);

Did anyone faced the same issue, if yes please share with me and suggest the solution
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the entire stack trace.

Where is the user name and password ? Drivers usually register themselves when called with Class.forName(). There may be no need to register the driver again. Are you able to connect via a JDBC supported SQL editor ?
 
Sri Palem
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not using any SQL Editor for cache..

This is what i get in my console..

java.sql.SQLException: Incorrect list format: 7 > 1
at com.intersys.jdbc.SysList.eltLength(SysList.java:306)
at com.intersys.jdbc.SysList.getString(SysList.java:1355)
at com.intersys.jdbc.SysList.readServerEncoding(SysList.java:270)
at com.intersys.jdbc.CacheConnection.connect(CacheConnection.java:801)
at com.intersys.jdbc.CacheConnection.<init>(CacheConnection.java:262)
at com.intersys.jdbc.CacheDriver.connect(CacheDriver.java:171)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.misyshealthcare.cprweb.connector.cache.TestConnection.main(TestConnection.java:31)
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the namespace / User / Pass again. Are you sure that they are correct
 
Sri Palem
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think for getting the connection object, only url is enough, username and password are not required. And i am giving correct URL only. But still getting the same exception. In case, if Username and password are wrong, it should show a message like Wrong username or wrong password. But i dont know why it is showing "Incorrect List format".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic