• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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".
 
reply
    Bookmark Topic Watch Topic
  • New Topic