Forum: CSV Manager, Topic: Class cast exception http://www.ricebridge.com/feeds/forums/csvman/6.rss Copyright (c) 2004 Ricebridge Topic Posts Fri Nov 25 12:20:15 UTC 2005 Richard Rodger: To get your code worki http://local.ricebridge.com/forum/topic.htm?f=csvman&t=6&s=all#post18 To get your code working, use the loadAsLists method. The load method returns a List of String[] arrays, which is not what you want. Fri, 25 Nov 2005 12:20:15 UTC Ayyappan Chandrasekaran: Hi, When i try to u http://local.ricebridge.com/forum/topic.htm?f=csvman&t=6&s=all#post17 Hi, When i try to use CsvManager to load the file into List of List i am getting Class Cast exception. could any one please help. this is my code package csv; import com.ricebridge.csvman.CsvManager; import java.util.*; import java.io.*; public class ReadCsv { public void readDecisionTable(String fileName) { File csvFile = new File(fileName); CsvManager csvManager = new CsvManager(); csvManager.setSeparator(";"); List data = csvManager.load( csvFile ); for( int line = 0; line < data.size(); line++ ) { System.out.println( "line: "+line ); List fields = (List) data.get(line);//Class cast exception for( int field = 0; field < fields.size(); field++ ) { System.out.println( "field "+field+" has value: " + fields.get(field) ); } } decisionTableData.get(lineCount); } } Fri, 25 Nov 2005 11:03:10 UTC