This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes Exception  :java.sql.SQLException: Incorrect list format: 7 > 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Exception  :java.sql.SQLException: Incorrect list format: 7 > 1" Watch "Exception  :java.sql.SQLException: Incorrect list format: 7 > 1" New topic
Author

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

Sravanthi Macharla
Greenhorn

Joined: Sep 12, 2009
Posts: 23
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

Joined: Feb 24, 2006
Posts: 6603
    
    1

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 ?


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Sravanthi Macharla
Greenhorn

Joined: Sep 12, 2009
Posts: 23
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

Joined: Feb 24, 2006
Posts: 6603
    
    1

Check the namespace / User / Pass again. Are you sure that they are correct
Sravanthi Macharla
Greenhorn

Joined: Sep 12, 2009
Posts: 23
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".
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Exception :java.sql.SQLException: Incorrect list format: 7 > 1
 
Similar Threads
JDBC drivers - Where to download
Register 2 DB drivers for the same url
java.sql.SQLException: ORA-00020: maximum number of processes (%s) exceeded
Help setting up VIA Rhine driver for Solaris 10
need help on dynamic loading of jdbc driver