You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Lalit Kumar <la...@gmail.com> on 2011/07/01 05:29:46 UTC
Re: Could not instantiate bean SpringBus: 2.4.1
Thanks Dan!!
I checked the WEB-INF/lib folder of my web application. there I have
neethi-3.0.0.jar.
One more point that I am using websphere 7.0. Is there any chance that older
version of neethi jar is being picked from websphere???
Regards,
Lalit Kumar
-----
Lalit Kumar
Technical Specialist
Fidelity International
--
View this message in context: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4540910.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Willem Jiang <wi...@gmail.com>.
There are some change on the bus extensions loading since CXF 2.4.0.
The issue may be related to this part of change.
On 7/1/11 4:39 PM, Lalit Kumar wrote:
> Hi,
>
> Even I checked the code 2.3.5 version it works fine. Don't know if there is
> any trouble with 2.4.1 version.
>
> Regards,
>
>
> -----
> Lalit Kumar
> Technical Specialist
> Fidelity International
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541377.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
I think that's because CXF 2.3.5 still use neethi 2.x, it's probably
just compatible with your container.
Freeman
On 2011-7-1, at 下午4:39, Lalit Kumar wrote:
> Hi,
>
> Even I checked the code 2.3.5 version it works fine. Don't know if
> there is
> any trouble with 2.4.1 version.
>
> Regards,
>
>
> -----
> Lalit Kumar
> Technical Specialist
> Fidelity International
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541377.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Lalit Kumar <la...@gmail.com>.
Hi,
Even I checked the code 2.3.5 version it works fine. Don't know if there is
any trouble with 2.4.1 version.
Regards,
-----
Lalit Kumar
Technical Specialist
Fidelity International
--
View this message in context: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541377.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Lalit Kumar <la...@gmail.com>.
Hi,
Regards,
Lalit Kumar
http://cxf.547215.n5.nabble.com/file/n4541555/Servlet_references.jpg
-----
Lalit Kumar
Technical Specialist
Fidelity International
--
View this message in context: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541555.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Andreas Veithen <an...@gmail.com>.
On Fri, Jul 1, 2011 at 11:12, Freeman Fang <fr...@gmail.com> wrote:
> Hi,
>
> 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-INF/lib.
I think it's actually the other way round. The application probably
contains the javax.servlet.Servlet class in one of the JARs in
WEB-INF/lib, while it shouldn't.
> 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.
>
> Freeman
> 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:
>> http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541011.html
>> Sent from the cxf-dev mailing list archive at Nabble.com.
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
>
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
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-
INF/lib.
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.
Freeman
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: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541011.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Lalit Kumar <la...@gmail.com>.
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: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4541011.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Could not instantiate bean SpringBus: 2.4.1
Posted by Freeman Fang <fr...@gmail.com>.
On 2011-7-1, at 上午11:29, Lalit Kumar wrote:
> Thanks Dan!!
>
> I checked the WEB-INF/lib folder of my web application. there I have
> neethi-3.0.0.jar.
>
> One more point that I am using websphere 7.0. Is there any chance
> that older
> version of neethi jar is being picked from websphere???
Yeah, it's possible, you need also check the lib folder of websphere
to see if there's old version neethi jar there. You may need configure
your container to enable self-first classloading way if there's neethi
version conflict.
Freeman
>
> Regards,
> Lalit Kumar
>
> -----
> Lalit Kumar
> Technical Specialist
> Fidelity International
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p4540910.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com