Hello all,

I am trying to create batch SQL Query from Java servlet(JSP page) and send it to Oracle database. The batch consists of multiple Insert statements.

for e.g:

Connection dbCon = null;

try {
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("Created Driver");
dbCon = DriverManager.getConnection("jdbcracle:thin:@ddddd:9999:xxxx", "id", "password");
System.out.println("Created Connection ");
} catch (Exception e) {
e.printStackTrace();
}

con = dbcon.getConnection();
con.setAutoCommit(false); // If some fail, we want to rollback the rest
stmt = con.createStatement();


try
{
/////////////// This throws the java.lang.AbstractMethodError exception.
stmt.addBatch("INSERT INTO testx VALUES(4, 'Amaretto')");
stmt.addBatch("INSERT INTO testx VALUES(3, 'Dellole')");
}
catch (SQLException e)
{
System.out.println("ANS: exception thrown ");
e.printStackTrace();
}

//int[] upCounts = stmt.executeBatch();
//con.commit();
//con.setAutoCommit(true);

At runtime, I get the java.lang.AbstractMethodError exception in stmt.addBatch(...),

java.lang.AbstractMethodError
at jsp_servlet._orm._jsp.__ormnotification._jspServic e(__ormnotification.java:276)
at weblogic.servlet.jsp.JspBase.service(JspBase.java: 27)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:120)
at weblogic.servlet.internal.ServletContextImpl.invok eServlet(ServletContextImpl.java:945)
at weblogic.servlet.internal.ServletContextImpl.invok eServlet(ServletContextImpl.java:909)
at weblogic.servlet.internal.ServletContextManager.in vokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Mu xableSocketHTTP.java:392)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableS ocketHTTP.java:274)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:130)

I am using classes12.zip drivers from Oracle. Does anyone else faced the same problem ?

Thanks,
Amit
Quantros, Inc