cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <>
Subject Re: Could not instantiate bean SpringBus: 2.4.1
Date Fri, 01 Jul 2011 09:12:19 GMT

I believe this is from another classloder issue, that said, the  
classloader(it could be your servlet war classloader) which load  
org.apache.cxf.transport.servlet.CXFServlet isn't the one(it could be  
the container classloader) which load javax.servlet.Servlet, so  
although  org.apache.cxf.transport.servlet.CXFServlet  is actually a  
servlet class, you still see such exception.
This should come from the class loader policy you changed here. The  
workaround probably could be you add a jar(like geronimo- 
servlet_3.0_spec.jar) which contain  javax.servlet.Servlet in your WEB- 

I'd say this kind of lib version conflict issue(neethi in your case)  
between the container and your application module(the war) is really  
general, the self-first classloader solution may not always work and  
it may bring more troubles, the root reason is that the classloader  
mechanism used by JEE/Servlet container  isn't very dynamic and you  
actually have no full control about how to load classes from your own  
module, to fix this kind of issue, a new technique(OSGi container) was  
brought up and it is very powerful to handle such problem you  
encounter, you can easily specify the lib version you want to use in  
your own module, and different versions lib co-exist in same container  
won't be a problem anymore.

On 2011-7-1, at 下午1:06, Lalit Kumar wrote:

> Hi,
> I tried changing the class loader policy for module 1st but  
> following error
> started appearing
> Error 404: javax.servlet.UnavailableException: SRVE0201E: Servlet
> [org.apache.cxf.transport.servlet.CXFServlet]: not a servlet class
> As far as neethi is concerened it is being loaded lony once
> Regards,
> Lalit Kumar
> -----
> Lalit Kumar
> Technical Specialist
> Fidelity International
> --
> View this message in context:
> Sent from the cxf-dev mailing list archive at

Freeman Fang

Twitter: freemanfang

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message