File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Please find out why the Error is in my code!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Please find out why the Error is in my code!!!!" Watch "Please find out why the Error is in my code!!!!" New topic

Please find out why the Error is in my code!!!!

Sourav Satyajit Mishra

Joined: May 08, 2008
Posts: 10
I am developing a code which produces a graph using CEWOLF jar files and charts, i am using Excel as the Datasource. but am still getting this error of illegal start of expression and ";" expected for the try catch block.

Please help!!!

i give the code bellow

[ June 05, 2008: Message edited by: Scott Selikoff ]

----------------------------------<br />You may only be a person in this world, but for someone, you�re the world.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41057
Welcome to JavaRanch.

Next time you post code of any length, please UseCodeTags. The code is unnecessarily hard to read as it is.

It is probably much easier to track down the problem if you write a standalone application that reads the Excel file. Then once that works, you can embed the code in the web app.

Ping & DNS - my free Android networking tools app
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30068

Welcome to JavaRanch!

That code wouldn't compile. It is not legal Java to have a loose try/catch block. It needs to be in a method (or static block.) Since it is accessing a database, maybe you want to make the the main method.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Please find out why the Error is in my code!!!!
Similar Threads
cewolf charts
Cewolf - PageViewCountData's data
JSP just wont work
cewolf data points not visible
Problem in dataset when linking with mssqlser