You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Akella, Sivanand (TCS)" <Si...@alcoa.com> on 2004/04/12 08:09:58 UTC

IncompatibleClassChangeError

Hi,

I am a new bie to Velocity and am using webwork framework along with velocity.

I am getting the following error:


The code that is causing this error might be(I used some print statements)
		ActionContext context = ActionContext.getContext();
		Map parameters = context.getParameters(); --> this causes the error.

Any guess?
500 Internal Server Error
java.lang.IncompatibleClassChangeError
	at com.alcoadirect.cart.action.ViewCart.doExecute(ViewCart.java:63)
	at webwork.action.ActionSupport.execute(ActionSupport.java:116)
	at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:113)
	at webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:161)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
	at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
	at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
	at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
	at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
	at java.lang.Thread.run(Thread.java:534)


Thanks,
Siva



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: IncompatibleClassChangeError

Posted by Mike Kienenberger <mk...@alaska.net>.
"Akella, Sivanand (TCS)" <Si...@alcoa.com> wrote:
> The code that is causing this error might be(I used some print statements)
> 		ActionContext context = ActionContext.getContext();
> 		Map parameters = context.getParameters(); --> this causes the error.
> 
> Any guess?
> 500 Internal Server Error
> java.lang.IncompatibleClassChangeError
> 	at com.alcoadirect.cart.action.ViewCart.doExecute(ViewCart.java:63)
> 	at webwork.action.ActionSupport.execute(ActionSupport.java:116)

>>From 
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IncompatibleClassChangeError.html
=======
Thrown when an incompatible class change has occurred to some class 
definition. The definition of some class, on which the currently executing 
method depends, has since changed. 
=======

I'd say it's either a problem of compiling against one set of jars and 
running with a different set of jars, or that you have multiple versions of 
some jar being loaded in your application.

You can find out all about the convolutions of Oracle Application Server 
class-loading in this document.

http://otn.oracle.com/tech/java/oc4j/pdf/ClassLoadingInOC4J_WP.pdf

One of the things I found most helpful was to define the following command 
as per the above document to force my jars in WEB-INF/lib to be used before 
any other jar files.

<web-app-class-loader search-local-classesfirst="true"/>

If you're running under unix, you can use the "lsof" tool to identify all 
jars in use by your application.  Under Windows, you might be able to use 
the "handle" tool to provide the same functionality.  Search google for more 
info on these tools.


In any case, this is not a velocity problem.   If the above doesn't help 
you, try posting to the webwork user list.

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org