aspose file tools*
The moose likes JDBC and the fly likes java lang AbstractMethodError: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java lang AbstractMethodError:" Watch "java lang AbstractMethodError:" New topic
Author

java lang AbstractMethodError:

Lalitha Vydyula
Ranch Hand

Joined: Jul 20, 2005
Posts: 69
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

Joined: Dec 15, 2005
Posts: 333


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

Joined: Jan 24, 2006
Posts: 106
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

Joined: Nov 08, 2005
Posts: 2
I encountered the same issue and change of the driver helped to resolve this issue. Thanks a lot for the suggestion.


Thanks<br />-Sagar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java lang AbstractMethodError:
 
Similar Threads
struts
NoClassDefFoundError in index.jsp
NoClassDefFoundError in index.jsp
Can't run a JSP page due to error 500
jsp:include causes StringIndex OutOfBoundsException