View Single Post
Old 08-27-2006, 04:32 AM   #5 (permalink)
j.gohel
Code Monkey
 
Join Date: Apr 2005
Posts: 68
j.gohel is on a distinguished road
Hi Belisarius,

I have a already exisiting application for which i had to create a new module.
Now the application was already compiled and working since 4 years.

The application is built on MVC architecture.
So from the controller one method is invoked which is there in a abstract class and my each class made for the new module extends this abstract class and implements its only single abstract method .

But this abstract class was already compiled and existing there.In my new module i was just using this abstract class as mentioned above by extending it.

When i made the new module and integrated the new module in the application the following things occured:

When i compiled my .java files on my Windows Machine and the resulting .class files i deployed in my application in my webserver on my Windows machine they worked fine.

But when the same class files were deployed on UNIX machine in the application on my weblogic server ,the exception was thrown:

java.lang.NoSuchMethodError occured.

I saw the stack trace and found out the method where the exception was occuring.This was the same method of that abstract class which was already compiled and i was implementing that by making my new classes to extend that abstract class.

And the exception was occuring when this method was invoked from the controller and the method version which was getting called is the one i implemented in my newly made classes by extending the above mentioned abstract class.

I checked each and every line of code but i found nothing wrong..

Also i looked in to the java docs .It was given like this:
usually this error is caught by the compiler ,but it can occur at runtime only if the class definition has incompatibly been changed.

But the same .java files when i compiled on the UNIX machine and the resulting .class files were deployed in my webapplication on weblogic ,they worked fine.

So this was the problem.So what do you say now??

Jignesh
j.gohel is offline   Reply With Quote