• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.AbstractMethodError

 
somenath chatterjee
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am facing an issue mention in below-
Presently I am working on Socket based application, And I had tested this application on Client test server, there it�s working fine. Then I put this application on client production server, and run this application. Whenever it�s got the request from pos-terminal and tries to verify with database its showing an error that is-

java.lang.AbstractMethodError:com.mysql.jdbc.jdbc2.Connection.createStatement(III)Ljava/sql/Statement;
at snaq.db.CacheConnection.createStatement(CacheConnection.java:203)
at snaq.db.CacheConnection.createStatement(CacheConnection.java:157)
at com.checkusa.MEMVerification.findMember(MEMVerification.java:68)
at com.checkusa.RequestHandler.handleRequest(RequestHandler.java:226)
at com.checkusa.Listener.run(Listener.java:509)
at java.lang.Thread.run(Thread.java:595)

where Both (Test and production server) having java version "1.5.0_14", both are using same database server which is in same IP where test server present.for JDBC I used mysql-connector-java-3.0.16-ga-bin.jar. For database connection pooling I user DBPool_v4.8.3.jar and Linux version also same �Red Hat Linux release 7.2 (Enigma)�.
Let me know if you faced similar problem and the solution if available.
 
Campbell Ritchie
Sheriff
Posts: 51344
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

I don't know much about this Error, but its API page includes this:
Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.
Not sure how much I can help, but find out whether there has been any recompiling going on. Try recompiling the suspect class and see what happens.

I tried a little demonstration application.. . . runs:-
[d4075031@linux10 ~]$ cd /media/DATAWRITE
[d4075031@linux10 DATAWRITE]$ javac -d . AbstractClass.java ConcreteClass.java AbstractErrorDemo.java
[d4075031@linux10 DATAWRITE]$ java trivia.AbstractErrorDemo
Concrete Class i = 3

[d4075031@linux10 DATAWRITE]$
Changing the abstract class to thisgives this result
d4075031@linux10 DATAWRITE]$ javac -d . AbstractClass.java
[d4075031@linux10 DATAWRITE]$ java trivia.AbstractErrorDemo
Exception in thread "main" java.lang.AbstractMethodError: trivia.ConcreteClass.getI()I
at trivia.AbstractErrorDemo.go(AbstractErrorDemo.java:15)
at trivia.AbstractErrorDemo.main(AbstractErrorDemo.java:9)
[d4075031@linux10 DATAWRITE]$
QED
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is probably some difference in the JAR files on the servers. Check this out. Are you sure that you are using the same mysql-connector-java-3.0.16-ga-bin.jar in both servers? Maybe you could just copy this JAR from the client server to the production server and retest.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic