Tomcat 7 with CXF 2.7, two WARs causing BeanCurrentlyInCreationException

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Tomcat 7 with CXF 2.7, two WARs causing BeanCurrentlyInCreationException

Alex O'Ree-2
Ran into a bit of a strange issue and I'm unsure how to proceed. I'm
running a Tomcat7 instance with two war files, both are using Apache
CXF 2.7.11 with spring 3.2.8 release

In both web.xmls, i have the
org.springframework.web.context.ContextLoaderListener and the CXF
servlet.
Both war files have a beans.xml which defines my cxf web services

When deploying the second war file, i'm getting a bunch of exceptions,
everything from
BeanCurrentlyInCreationException, to cannot create inner bean due to
circular dependency.

I'm not entirely sure what's happening, but removing the
ContextLoaderListener on the second war's web.xml resolves the start
up issue, however none of the services fire up.

My best guess is that tomcat is somehow sharing the spring
ContextLoaderListener or something related to CXF across WAR
boundaries and it's causing some kind of conflict.

I have no idea how to resolve this. Any help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 with CXF 2.7, two WARs causing BeanCurrentlyInCreationException

Dennis Kieselhorst-2
> When deploying the second war file, i'm getting a bunch of exceptions,
> everything from
> BeanCurrentlyInCreationException, to cannot create inner bean due to
> circular dependency.
Please post the stacktrace.

If you deploy the second war file without the first war file it's starting up properly?

Regards
Dennis


Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 with CXF 2.7, two WARs causing BeanCurrentlyInCreationException

Alex O'Ree
Ahh sorry I missed your reply.  The answer is no. I deployed the war with
the problem to a clean tomcat instance and hit the same problem.  It
appears that my service implementation is causing this issue. I'm still not
sure why. I'm going to comment out everything then slowly readd code until
it works.

It's the error message that bothers me. There is no obvious circular
reference in the implementation

On May 4, 2017 3:31 PM, "Dennis Kieselhorst" <[hidden email]> wrote:

> > When deploying the second war file, i'm getting a bunch of exceptions,
> > everything from
> > BeanCurrentlyInCreationException, to cannot create inner bean due to
> > circular dependency.
> Please post the stacktrace.
>
> If you deploy the second war file without the first war file it's starting
> up properly?
>
> Regards
> Dennis
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 with CXF 2.7, two WARs causing BeanCurrentlyInCreationException

Alex O'Ree
Turns out my circular reference problem was that I had an Endpoint
reference in my implementation class. It was used under another app
container to programmatically add a jaxws handler to the chain. When
migrating to CXF, this had to be removed and replaced with a
corresponding definition in beans.xml

On Fri, May 12, 2017 at 7:39 AM, Alex O'Ree <[hidden email]> wrote:

> Ahh sorry I missed your reply.  The answer is no. I deployed the war with
> the problem to a clean tomcat instance and hit the same problem.  It appears
> that my service implementation is causing this issue. I'm still not sure
> why. I'm going to comment out everything then slowly readd code until it
> works.
>
> It's the error message that bothers me. There is no obvious circular
> reference in the implementation
>
> On May 4, 2017 3:31 PM, "Dennis Kieselhorst" <[hidden email]> wrote:
>>
>> > When deploying the second war file, i'm getting a bunch of exceptions,
>> > everything from
>> > BeanCurrentlyInCreationException, to cannot create inner bean due to
>> > circular dependency.
>> Please post the stacktrace.
>>
>> If you deploy the second war file without the first war file it's starting
>> up properly?
>>
>> Regards
>> Dennis
>>
>>
>