File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Syntax Error On Token Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Syntax Error On Token "(", ";" expected" Watch "Syntax Error On Token "(", ";" expected" New topic

Syntax Error On Token "(", ";" expected

mangala madhusudhan

Joined: May 01, 2006
Posts: 2

This is madhusudhan.
i am using websphere application developer 5.1.2 for developing strtus application.
i write JDBC connection pool code in Action Class excute() .

I received " syntax error on token "(",";" expected " in line "private Connection getConnetion()"

Please send me mail for this error.

Connection con = this.getConnection();

private Connection getConnection() throws SQLException {

Context ctx = new javax.naming.InitialContext();
System.out.println("Before DS");
DataSource ds = (DataSource) ctx.lookup("jdbc/DataSourcePPT");
System.out.println("after DS");
//Connection dbConnection = ds.getConnection();
//System.out.println("After Connetion");
catch (NamingException ne) {
System.out.println("Naming Exception"+ne);
catch (SQLException se){


catch(Exception e)
System.out.println("Error in"+e);
return ds.getConnection();

I agree. Here's the link:
subject: Syntax Error On Token "(", ";" expected
jQuery in Action, 3rd edition