aspose file tools
The moose likes Websphere and the fly likes Syntax Error On Token Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "Syntax Error On Token "(", ";" expected" Watch "Syntax Error On Token "(", ";" expected" New topic
Author

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

mangala madhusudhan
Greenhorn

Joined: May 01, 2006
Posts: 2
HI,

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 {

try
{
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){

System.out.println("SQLEXception"+se);

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


madhusudhan
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Syntax Error On Token "(", ";" expected
 
Similar Threads
connexion to Cloudssape db in WSAD
Testing Database Connection
Null pointer exception
JNDI Lookup help in websphere 4.0
Name is not bound in this context