Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception - To connect excel sheet

 
bala kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the following error when i get the data from XL sheet to store the data into oracle db in LINUX .

Code:
String path = "/home/nfsmnt/resource_uploads/web_links/"+fileName;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection("jdbcdbcriver={Microsoft Excel Driver (*.xls)};DBQ="+path+";DriverID=22;READONLY=false","","");
Statement stmt = connection.createStatement();


Exception:

java.lang.NullPointerException at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436) at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.thomsonhighereducation.DAO.ResourceOrderDAO.addWeblinkData(ResourceOrderDAO.java:2239) at
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic