Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java lang AbstractMethodError:

 
Lalitha Vydyula
Ranch Hand
Posts: 69
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm getting the below error when I'm trying to use the setDate() method of the OracleCallableStatement.

java.lang.AbstractMethodError: void oracle.jdbc.OracleCallableStatement.setDate(java.lang.String, java.sql.Date)
at mypackage.ARSummaryUtil.getAmountToBeCredited(ARSummaryUtil.java:119)
at _ARSummary._jspService(ARSummary.jsp:16)
[SRC:/ARSummary.jsp]
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)

Here is the code snippet
------------------------------------
try
{
connection = getConnection();
stmt = connection.createStatement();
java.sql.Date date = new java.sql.Date(new java.util.Date().getTime());
result = stmt.executeQuery("select id from okc_k_headers_b where
contract_number='9999'"); // Hardcoded contract_number value
while(result.next())
{
p_id = result.getInt(1);
}
ocstmt = (OracleCallableStatement)connection.prepareCall("begin OKS_BILL_REC_PUB.pre_terminate_amount(?,?,?,?,?,?,?); end;");
ocstmt.setNUMBER(1, null); // IN Paramater1
ocstmt.setInt(2, p_id); //IN Paramater2
ocstmt.setDate("p_terminate_date", new java.sql.Date(sysDate.getTime()));
ocstmt.setInt(4,2); // IN Paramater4
ocstmt.registerOutParameter(5, Types.NUMERIC); // OUT Parameter1
ocstmt.registerOutParameter(6, Types.NUMERIC); // OUT Parameter2
ocstmt.registerOutParameter(6, Types.VARCHAR); // OUT Parameter3
ocstmt.execute();
X_Amount = ocstmt.getFloat(5);
X_manual_credit = ocstmt.getFloat(6);
X_return_status = ocstmt.getString(7);
}

Is it a driver problem.
I'm using JDeveloper 9.0.5.2
In the above class I'm trying to connect to a remote database(version 9.2.0.6.0)
I have 10gR2 installed on my machine.
Can anyone help. Thanks in advance
 
stu derby
Ranch Hand
Posts: 333
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm getting the below error when I'm trying to use the setDate() method of the OracleCallableStatement.

java.lang.AbstractMethodError: void oracle.jdbc.OracleCallableStatement.setDate(java.lang.String, java.sql.Date)
...


Huh, well that is a little wonky. You could certainly try a newer version of the driver.

However, another way to go (I think) is this:


I won't promise that it will even compile, but I think it'll work... (You'll need to change the type of octmt wherever it's defined...)
 
Babji Reddy
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually this kind of run-time error comes, when the code is compiled a version of oracle JAR and ran with another version (which lacks features of the first one) in its classpath.
Put the same JAR in build classpath and recompile.. It should work.
 
Sagar Gudala
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I encountered the same issue and change of the driver helped to resolve this issue. Thanks a lot for the suggestion.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic