You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2011/03/29 10:54:57 UTC

Re: cxf jaxrs:client and aop

Hi

The config is not visible. What happens if you comment out a jaxrs:client
altogether, just wondering, has it something to do with the jaxrs:client
proxy being AOP-ed or not...

thanks, Sergey

On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003 <br...@gmail.com>wrote:

> Not sure if there is a bug or if I am not doing something correct.
> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
>
>
>
>
>
>
> In my spring config file, I have defined an aspect bean called:  AuditImpl
>
>
>
>
> This extends an interface called:  Audit
> I have the auditClient as a property and within the AuditImpl, I define the
> auditClient as:
>
> private AuditInterface auditClient;
>    public void setAuditClient(AuditInterface auditClient) {
>        this.auditClient = auditClient;
>    }
>
>
> I can define the aspect, via xml schema config, or through annotations
> fine..  It will build and deploy to jboss fine.  As soon as I define
> @Before, it does not deploy any more.  Whether I define the Before in the
> xml schema or as an annotation, the defining of it kills the deployment.
>
> Any help is appreciated.  Is this a bug or am I doing something wrong?  If
> I
> am doing something wrong, can you please provide some help as to what?
> Thank you.
>
> I get the following error:
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'auditClient': Initialization of bean failed; nested exception is
> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
> warning
> can't determine superclass of missing type $Proxy388
>  [Xlint:cantFindType]
>        at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>        at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>        at
>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>        at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>        at
>
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>        at
>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>        at
>
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>        at
>
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>        at
>
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>        at
>
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>        at
>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>        at
>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>        at
>
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
> (more)
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
> Sent from the cxf-issues mailing list archive at Nabble.com.
>

Re: cxf jaxrs:client and aop

Posted by Brian Moss <br...@gmail.com>.
It seems that I need the jaxrs frontend lib.. without it, I can not
deploy..  so, the only way to resolve this is to go over the jboss
libraries, one at a time, to figure out which may be conflicting..
Unless someone out there knows.
Maybe there is another set of libraries that jboss comes with (ie..
geronimo, jetty, etc..) that is including an older library, that
should probably be swapped out with a newer one.

Hopefully, a reader can provide some clues..

Thanks for all your help on this.

Brian

On Thu, Mar 31, 2011 at 9:31 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi
>
> On Thu, Mar 31, 2011 at 2:08 PM, Brian Moss <br...@gmail.com> wrote:
>>
>> Hello,
>> I tried putting it in the endorsed directory, and that caused all
>> kinds of problems.
>> Right now, I have it in the common/lib directory.. This is where the
>> other jbossws libs get deployed, when doing the jbossws install.
>>
>> Since the jbossws 3.4.0 does not come with jaxrs frontend library
>> (which is odd to me), I had to download it separately and copy it to
>> the common/libs directory.
>> Any suggestions on where else I should deploy the jaxrs frontend library?
>>
>
> JBoss has its own JAX-RS implementation, RestEasy, so shipping an additional
> JAX-RS impl as part of jbossws/cxf is not an option. It looks like though
> that indeed, one of the libraries shipped with JBoss interferes with AOP, or
> may be its class loader hierarchy makes it difficult for AOP to access
> external interfaces proxified by jaxrs:client....
>
> Cheers, Sergey
>
>>
>> Brian
>>
>> On Thu, Mar 31, 2011 at 9:06 AM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>> > Hi Brian
>> >
>> > On Wed, Mar 30, 2011 at 10:53 PM, Brian Moss <br...@gmail.com>
>> > wrote:
>> >>
>> >> Another note to add...
>> >> I deploy the same project to glassfish, with the external interface
>> >> reference, to define the jaxrs:client.. and there were no issues.
>> >> So, this is definitely related to jboss and most likely a library that
>> >> comes with jboss, which is causing problems.
>> >>
>> > May be you can experiment with moving the jaxrs frontend library across
>> > various top-level JBoss folders (including the folders for deployers) ?
>> >
>> > Cheers, Sergey
>> >
>> >>
>> >> On Wed, Mar 30, 2011 at 5:06 PM, Brian Moss <br...@gmail.com>
>> >> wrote:
>> >> > Posting to users group:
>> >> >
>> >> > The problem appears to be that aspectj-weaver is throwing some kind
>> >> > of
>> >> > warning/exception, due to my jaxrs:client being created with an
>> >> > interface that is not in the local code.  It is a 3rd party
>> >> > interface,
>> >> > that is brought in via a dependency in pom.
>> >> > If I put a copy of the 3rd party interface, in a local package, then
>> >> > aspectj weaver is happy and I can deploy to jboss.
>> >> >
>> >> > (Note:  I am using jboss 5.1.0 with jbossws 3.4.0)
>> >> > I am thinking that there is a class conflict, somewhere in one of the
>> >> > libraries that come with jboss, but I am not sure how to figure that
>> >> > one out.
>> >> >
>> >> > A solution to this issue, is to "trick" aspectj weaver, into thinking
>> >> > that you have the external interface local.
>> >> > Just create a local "dummy" interface, that extends the external
>> >> > interface.  Dont put anything in it..  just extend it.
>> >> > Then use that dummy interface to define your jaxrs:client, and any
>> >> > where that you will be using that jaxrs:client.
>> >> >
>> >> > I am guessing that aspectj weaver does some kind of initial pass, and
>> >> > the jaxrs:client is not instantiated at that point, thus aspectj
>> >> > weaver fails to see the "super class" and fails.
>> >> >
>> >> > If anyone has any ideas on what could be the problem, I would
>> >> > appreciate some input.
>> >> > Yes, I have a fairly simple solution around the problem, but I would
>> >> > like to resolve the problem.
>> >> >
>> >> > Thanks.
>> >> > Brian
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin
>> >> > <sb...@gmail.com>
>> >> > wrote:
>> >> >> Redirecting to the users list...
>> >> >>
>> >> >> ---------- Forwarded message ----------
>> >> >> From: Sergey Beryozkin <sb...@gmail.com>
>> >> >> Date: Tue, Mar 29, 2011 at 9:54 AM
>> >> >> Subject: Re: cxf jaxrs:client and aop
>> >> >> To: dev@cxf.apache.org
>> >> >>
>> >> >>
>> >> >> Hi
>> >> >>
>> >> >> The config is not visible. What happens if you comment out a
>> >> >> jaxrs:client
>> >> >> altogether, just wondering, has it something to do with the
>> >> >> jaxrs:client
>> >> >> proxy being AOP-ed or not...
>> >> >>
>> >> >> thanks, Sergey
>> >> >>
>> >> >> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003
>> >> >> <br...@gmail.com>
>> >> >> wrote:
>> >> >>>
>> >> >>> Not sure if there is a bug or if I am not doing something correct.
>> >> >>> I have defined a jaxrs:client in my jbossws-cxf.xml file as
>> >> >>> follows:
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> In my spring config file, I have defined an aspect bean called:
>> >> >>>  AuditImpl
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> This extends an interface called:  Audit
>> >> >>> I have the auditClient as a property and within the AuditImpl, I
>> >> >>> define
>> >> >>> the
>> >> >>> auditClient as:
>> >> >>>
>> >> >>> private AuditInterface auditClient;
>> >> >>>    public void setAuditClient(AuditInterface auditClient) {
>> >> >>>        this.auditClient = auditClient;
>> >> >>>    }
>> >> >>>
>> >> >>>
>> >> >>> I can define the aspect, via xml schema config, or through
>> >> >>> annotations
>> >> >>> fine..  It will build and deploy to jboss fine.  As soon as I
>> >> >>> define
>> >> >>> @Before, it does not deploy any more.  Whether I define the Before
>> >> >>> in
>> >> >>> the
>> >> >>> xml schema or as an annotation, the defining of it kills the
>> >> >>> deployment.
>> >> >>>
>> >> >>> Any help is appreciated.  Is this a bug or am I doing something
>> >> >>> wrong?
>> >> >>>  If
>> >> >>> I
>> >> >>> am doing something wrong, can you please provide some help as to
>> >> >>> what?
>> >> >>> Thank you.
>> >> >>>
>> >> >>> I get the following error:
>> >> >>>
>> >> >>> org.springframework.beans.factory.BeanCreationException: Error
>> >> >>> creating
>> >> >>> bean
>> >> >>> with name 'auditClient': Initialization of bean failed; nested
>> >> >>> exception
>> >> >>> is
>> >> >>>
>> >> >>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
>> >> >>> warning
>> >> >>> can't determine superclass of missing type $Proxy388
>> >> >>>  [Xlint:cantFindType]
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>> >> >>>        at
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>> >> >>>        at
>> >> >>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>> >> >>>        at
>> >> >>> org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
>> >> >>> (more)
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> View this message in context:
>> >> >>>
>> >> >>>
>> >> >>> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
>> >> >>> Sent from the cxf-issues mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >
>> >
>>
>>
>
>



-- 
"Carpe Diem"
Brian Moss

Re: cxf jaxrs:client and aop

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

On Thu, Mar 31, 2011 at 2:08 PM, Brian Moss <br...@gmail.com> wrote:

> Hello,
> I tried putting it in the endorsed directory, and that caused all
> kinds of problems.
> Right now, I have it in the common/lib directory.. This is where the
> other jbossws libs get deployed, when doing the jbossws install.
>
> Since the jbossws 3.4.0 does not come with jaxrs frontend library
> (which is odd to me), I had to download it separately and copy it to
> the common/libs directory.
> Any suggestions on where else I should deploy the jaxrs frontend library?
>
>
JBoss has its own JAX-RS implementation, RestEasy, so shipping an additional
JAX-RS impl as part of jbossws/cxf is not an option. It looks like though
that indeed, one of the libraries shipped with JBoss interferes with AOP, or
may be its class loader hierarchy makes it difficult for AOP to access
external interfaces proxified by jaxrs:client....

Cheers, Sergey


> Brian
>
> On Thu, Mar 31, 2011 at 9:06 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
> > Hi Brian
> >
> > On Wed, Mar 30, 2011 at 10:53 PM, Brian Moss <br...@gmail.com>
> > wrote:
> >>
> >> Another note to add...
> >> I deploy the same project to glassfish, with the external interface
> >> reference, to define the jaxrs:client.. and there were no issues.
> >> So, this is definitely related to jboss and most likely a library that
> >> comes with jboss, which is causing problems.
> >>
> > May be you can experiment with moving the jaxrs frontend library across
> > various top-level JBoss folders (including the folders for deployers) ?
> >
> > Cheers, Sergey
> >
> >>
> >> On Wed, Mar 30, 2011 at 5:06 PM, Brian Moss <br...@gmail.com>
> >> wrote:
> >> > Posting to users group:
> >> >
> >> > The problem appears to be that aspectj-weaver is throwing some kind of
> >> > warning/exception, due to my jaxrs:client being created with an
> >> > interface that is not in the local code.  It is a 3rd party interface,
> >> > that is brought in via a dependency in pom.
> >> > If I put a copy of the 3rd party interface, in a local package, then
> >> > aspectj weaver is happy and I can deploy to jboss.
> >> >
> >> > (Note:  I am using jboss 5.1.0 with jbossws 3.4.0)
> >> > I am thinking that there is a class conflict, somewhere in one of the
> >> > libraries that come with jboss, but I am not sure how to figure that
> >> > one out.
> >> >
> >> > A solution to this issue, is to "trick" aspectj weaver, into thinking
> >> > that you have the external interface local.
> >> > Just create a local "dummy" interface, that extends the external
> >> > interface.  Dont put anything in it..  just extend it.
> >> > Then use that dummy interface to define your jaxrs:client, and any
> >> > where that you will be using that jaxrs:client.
> >> >
> >> > I am guessing that aspectj weaver does some kind of initial pass, and
> >> > the jaxrs:client is not instantiated at that point, thus aspectj
> >> > weaver fails to see the "super class" and fails.
> >> >
> >> > If anyone has any ideas on what could be the problem, I would
> >> > appreciate some input.
> >> > Yes, I have a fairly simple solution around the problem, but I would
> >> > like to resolve the problem.
> >> >
> >> > Thanks.
> >> > Brian
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin <
> sberyozkin@gmail.com>
> >> > wrote:
> >> >> Redirecting to the users list...
> >> >>
> >> >> ---------- Forwarded message ----------
> >> >> From: Sergey Beryozkin <sb...@gmail.com>
> >> >> Date: Tue, Mar 29, 2011 at 9:54 AM
> >> >> Subject: Re: cxf jaxrs:client and aop
> >> >> To: dev@cxf.apache.org
> >> >>
> >> >>
> >> >> Hi
> >> >>
> >> >> The config is not visible. What happens if you comment out a
> >> >> jaxrs:client
> >> >> altogether, just wondering, has it something to do with the
> >> >> jaxrs:client
> >> >> proxy being AOP-ed or not...
> >> >>
> >> >> thanks, Sergey
> >> >>
> >> >> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003
> >> >> <br...@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> Not sure if there is a bug or if I am not doing something correct.
> >> >>> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> In my spring config file, I have defined an aspect bean called:
> >> >>>  AuditImpl
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> This extends an interface called:  Audit
> >> >>> I have the auditClient as a property and within the AuditImpl, I
> >> >>> define
> >> >>> the
> >> >>> auditClient as:
> >> >>>
> >> >>> private AuditInterface auditClient;
> >> >>>    public void setAuditClient(AuditInterface auditClient) {
> >> >>>        this.auditClient = auditClient;
> >> >>>    }
> >> >>>
> >> >>>
> >> >>> I can define the aspect, via xml schema config, or through
> annotations
> >> >>> fine..  It will build and deploy to jboss fine.  As soon as I define
> >> >>> @Before, it does not deploy any more.  Whether I define the Before
> in
> >> >>> the
> >> >>> xml schema or as an annotation, the defining of it kills the
> >> >>> deployment.
> >> >>>
> >> >>> Any help is appreciated.  Is this a bug or am I doing something
> wrong?
> >> >>>  If
> >> >>> I
> >> >>> am doing something wrong, can you please provide some help as to
> what?
> >> >>> Thank you.
> >> >>>
> >> >>> I get the following error:
> >> >>>
> >> >>> org.springframework.beans.factory.BeanCreationException: Error
> >> >>> creating
> >> >>> bean
> >> >>> with name 'auditClient': Initialization of bean failed; nested
> >> >>> exception
> >> >>> is
> >> >>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
> >> >>> warning
> >> >>> can't determine superclass of missing type $Proxy388
> >> >>>  [Xlint:cantFindType]
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
> >> >>>        at
> >> >>>
> >> >>>
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
> >> >>>        at
> >> >>>
> >> >>>
> >> >>>
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
> >> >>>        at
> >> >>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
> >> >>>        at
> >> >>> org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
> >> >>> (more)
> >> >>>
> >> >>>
> >> >>> --
> >> >>> View this message in context:
> >> >>>
> >> >>>
> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
> >> >>> Sent from the cxf-issues mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >
> >
>
>
>

Re: cxf jaxrs:client and aop

Posted by Brian Moss <br...@gmail.com>.
Hello,
I tried putting it in the endorsed directory, and that caused all
kinds of problems.
Right now, I have it in the common/lib directory.. This is where the
other jbossws libs get deployed, when doing the jbossws install.

Since the jbossws 3.4.0 does not come with jaxrs frontend library
(which is odd to me), I had to download it separately and copy it to
the common/libs directory.
Any suggestions on where else I should deploy the jaxrs frontend library?

Brian

On Thu, Mar 31, 2011 at 9:06 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi Brian
>
> On Wed, Mar 30, 2011 at 10:53 PM, Brian Moss <br...@gmail.com>
> wrote:
>>
>> Another note to add...
>> I deploy the same project to glassfish, with the external interface
>> reference, to define the jaxrs:client.. and there were no issues.
>> So, this is definitely related to jboss and most likely a library that
>> comes with jboss, which is causing problems.
>>
> May be you can experiment with moving the jaxrs frontend library across
> various top-level JBoss folders (including the folders for deployers) ?
>
> Cheers, Sergey
>
>>
>> On Wed, Mar 30, 2011 at 5:06 PM, Brian Moss <br...@gmail.com>
>> wrote:
>> > Posting to users group:
>> >
>> > The problem appears to be that aspectj-weaver is throwing some kind of
>> > warning/exception, due to my jaxrs:client being created with an
>> > interface that is not in the local code.  It is a 3rd party interface,
>> > that is brought in via a dependency in pom.
>> > If I put a copy of the 3rd party interface, in a local package, then
>> > aspectj weaver is happy and I can deploy to jboss.
>> >
>> > (Note:  I am using jboss 5.1.0 with jbossws 3.4.0)
>> > I am thinking that there is a class conflict, somewhere in one of the
>> > libraries that come with jboss, but I am not sure how to figure that
>> > one out.
>> >
>> > A solution to this issue, is to "trick" aspectj weaver, into thinking
>> > that you have the external interface local.
>> > Just create a local "dummy" interface, that extends the external
>> > interface.  Dont put anything in it..  just extend it.
>> > Then use that dummy interface to define your jaxrs:client, and any
>> > where that you will be using that jaxrs:client.
>> >
>> > I am guessing that aspectj weaver does some kind of initial pass, and
>> > the jaxrs:client is not instantiated at that point, thus aspectj
>> > weaver fails to see the "super class" and fails.
>> >
>> > If anyone has any ideas on what could be the problem, I would
>> > appreciate some input.
>> > Yes, I have a fairly simple solution around the problem, but I would
>> > like to resolve the problem.
>> >
>> > Thanks.
>> > Brian
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin <sb...@gmail.com>
>> > wrote:
>> >> Redirecting to the users list...
>> >>
>> >> ---------- Forwarded message ----------
>> >> From: Sergey Beryozkin <sb...@gmail.com>
>> >> Date: Tue, Mar 29, 2011 at 9:54 AM
>> >> Subject: Re: cxf jaxrs:client and aop
>> >> To: dev@cxf.apache.org
>> >>
>> >>
>> >> Hi
>> >>
>> >> The config is not visible. What happens if you comment out a
>> >> jaxrs:client
>> >> altogether, just wondering, has it something to do with the
>> >> jaxrs:client
>> >> proxy being AOP-ed or not...
>> >>
>> >> thanks, Sergey
>> >>
>> >> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003
>> >> <br...@gmail.com>
>> >> wrote:
>> >>>
>> >>> Not sure if there is a bug or if I am not doing something correct.
>> >>> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> In my spring config file, I have defined an aspect bean called:
>> >>>  AuditImpl
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> This extends an interface called:  Audit
>> >>> I have the auditClient as a property and within the AuditImpl, I
>> >>> define
>> >>> the
>> >>> auditClient as:
>> >>>
>> >>> private AuditInterface auditClient;
>> >>>    public void setAuditClient(AuditInterface auditClient) {
>> >>>        this.auditClient = auditClient;
>> >>>    }
>> >>>
>> >>>
>> >>> I can define the aspect, via xml schema config, or through annotations
>> >>> fine..  It will build and deploy to jboss fine.  As soon as I define
>> >>> @Before, it does not deploy any more.  Whether I define the Before in
>> >>> the
>> >>> xml schema or as an annotation, the defining of it kills the
>> >>> deployment.
>> >>>
>> >>> Any help is appreciated.  Is this a bug or am I doing something wrong?
>> >>>  If
>> >>> I
>> >>> am doing something wrong, can you please provide some help as to what?
>> >>> Thank you.
>> >>>
>> >>> I get the following error:
>> >>>
>> >>> org.springframework.beans.factory.BeanCreationException: Error
>> >>> creating
>> >>> bean
>> >>> with name 'auditClient': Initialization of bean failed; nested
>> >>> exception
>> >>> is
>> >>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
>> >>> warning
>> >>> can't determine superclass of missing type $Proxy388
>> >>>  [Xlint:cantFindType]
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>> >>>        at
>> >>>
>> >>>
>> >>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>> >>>        at
>> >>>
>> >>>
>> >>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>> >>>        at
>> >>>
>> >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>> >>>        at
>> >>>
>> >>>
>> >>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>> >>>        at
>> >>>
>> >>>
>> >>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>> >>>        at
>> >>>
>> >>>
>> >>> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>> >>>        at
>> >>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>> >>>        at
>> >>> org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
>> >>> (more)
>> >>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> >>> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
>> >>> Sent from the cxf-issues mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >>
>> >>
>
>



-- 
"Carpe Diem"
Brian Moss

Re: cxf jaxrs:client and aop

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Brian

On Wed, Mar 30, 2011 at 10:53 PM, Brian Moss <br...@gmail.com>wrote:

> Another note to add...
> I deploy the same project to glassfish, with the external interface
> reference, to define the jaxrs:client.. and there were no issues.
> So, this is definitely related to jboss and most likely a library that
> comes with jboss, which is causing problems.
>
> May be you can experiment with moving the jaxrs frontend library across
various top-level JBoss folders (including the folders for deployers) ?

Cheers, Sergey


>
>
> On Wed, Mar 30, 2011 at 5:06 PM, Brian Moss <br...@gmail.com>
> wrote:
> > Posting to users group:
> >
> > The problem appears to be that aspectj-weaver is throwing some kind of
> > warning/exception, due to my jaxrs:client being created with an
> > interface that is not in the local code.  It is a 3rd party interface,
> > that is brought in via a dependency in pom.
> > If I put a copy of the 3rd party interface, in a local package, then
> > aspectj weaver is happy and I can deploy to jboss.
> >
> > (Note:  I am using jboss 5.1.0 with jbossws 3.4.0)
> > I am thinking that there is a class conflict, somewhere in one of the
> > libraries that come with jboss, but I am not sure how to figure that
> > one out.
> >
> > A solution to this issue, is to "trick" aspectj weaver, into thinking
> > that you have the external interface local.
> > Just create a local "dummy" interface, that extends the external
> > interface.  Dont put anything in it..  just extend it.
> > Then use that dummy interface to define your jaxrs:client, and any
> > where that you will be using that jaxrs:client.
> >
> > I am guessing that aspectj weaver does some kind of initial pass, and
> > the jaxrs:client is not instantiated at that point, thus aspectj
> > weaver fails to see the "super class" and fails.
> >
> > If anyone has any ideas on what could be the problem, I would
> > appreciate some input.
> > Yes, I have a fairly simple solution around the problem, but I would
> > like to resolve the problem.
> >
> > Thanks.
> > Brian
> >
> >
> >
> >
> >
> > On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
> >> Redirecting to the users list...
> >>
> >> ---------- Forwarded message ----------
> >> From: Sergey Beryozkin <sb...@gmail.com>
> >> Date: Tue, Mar 29, 2011 at 9:54 AM
> >> Subject: Re: cxf jaxrs:client and aop
> >> To: dev@cxf.apache.org
> >>
> >>
> >> Hi
> >>
> >> The config is not visible. What happens if you comment out a
> jaxrs:client
> >> altogether, just wondering, has it something to do with the jaxrs:client
> >> proxy being AOP-ed or not...
> >>
> >> thanks, Sergey
> >>
> >> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003 <brianmoss1003@gmail.com
> >
> >> wrote:
> >>>
> >>> Not sure if there is a bug or if I am not doing something correct.
> >>> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> In my spring config file, I have defined an aspect bean called:
>  AuditImpl
> >>>
> >>>
> >>>
> >>>
> >>> This extends an interface called:  Audit
> >>> I have the auditClient as a property and within the AuditImpl, I define
> >>> the
> >>> auditClient as:
> >>>
> >>> private AuditInterface auditClient;
> >>>    public void setAuditClient(AuditInterface auditClient) {
> >>>        this.auditClient = auditClient;
> >>>    }
> >>>
> >>>
> >>> I can define the aspect, via xml schema config, or through annotations
> >>> fine..  It will build and deploy to jboss fine.  As soon as I define
> >>> @Before, it does not deploy any more.  Whether I define the Before in
> the
> >>> xml schema or as an annotation, the defining of it kills the
> deployment.
> >>>
> >>> Any help is appreciated.  Is this a bug or am I doing something wrong?
>  If
> >>> I
> >>> am doing something wrong, can you please provide some help as to what?
> >>> Thank you.
> >>>
> >>> I get the following error:
> >>>
> >>> org.springframework.beans.factory.BeanCreationException: Error creating
> >>> bean
> >>> with name 'auditClient': Initialization of bean failed; nested
> exception
> >>> is
> >>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
> >>> warning
> >>> can't determine superclass of missing type $Proxy388
> >>>  [Xlint:cantFindType]
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> >>>        at
> >>>
> >>>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
> >>>        at
> >>>
> >>>
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
> >>>        at
> >>>
> >>>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
> >>>        at
> >>>
> >>>
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> >>>        at
> >>>
> >>>
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> >>>        at
> >>>
> >>>
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> >>>        at
> >>>
> >>>
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
> >>>        at
> >>>
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
> >>>        at
> >>>
> >>>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
> >>>        at
> >>>
> >>>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
> >>>        at
> >>>
> >>>
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
> >>>        at
> >>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
> >>>        at
> org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
> >>> (more)
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
> >>> Sent from the cxf-issues mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> >>
>

Re: cxf jaxrs:client and aop

Posted by Brian Moss <br...@gmail.com>.
Another note to add...
I deploy the same project to glassfish, with the external interface
reference, to define the jaxrs:client.. and there were no issues.
So, this is definitely related to jboss and most likely a library that
comes with jboss, which is causing problems.



On Wed, Mar 30, 2011 at 5:06 PM, Brian Moss <br...@gmail.com> wrote:
> Posting to users group:
>
> The problem appears to be that aspectj-weaver is throwing some kind of
> warning/exception, due to my jaxrs:client being created with an
> interface that is not in the local code.  It is a 3rd party interface,
> that is brought in via a dependency in pom.
> If I put a copy of the 3rd party interface, in a local package, then
> aspectj weaver is happy and I can deploy to jboss.
>
> (Note:  I am using jboss 5.1.0 with jbossws 3.4.0)
> I am thinking that there is a class conflict, somewhere in one of the
> libraries that come with jboss, but I am not sure how to figure that
> one out.
>
> A solution to this issue, is to "trick" aspectj weaver, into thinking
> that you have the external interface local.
> Just create a local "dummy" interface, that extends the external
> interface.  Dont put anything in it..  just extend it.
> Then use that dummy interface to define your jaxrs:client, and any
> where that you will be using that jaxrs:client.
>
> I am guessing that aspectj weaver does some kind of initial pass, and
> the jaxrs:client is not instantiated at that point, thus aspectj
> weaver fails to see the "super class" and fails.
>
> If anyone has any ideas on what could be the problem, I would
> appreciate some input.
> Yes, I have a fairly simple solution around the problem, but I would
> like to resolve the problem.
>
> Thanks.
> Brian
>
>
>
>
>
> On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> Redirecting to the users list...
>>
>> ---------- Forwarded message ----------
>> From: Sergey Beryozkin <sb...@gmail.com>
>> Date: Tue, Mar 29, 2011 at 9:54 AM
>> Subject: Re: cxf jaxrs:client and aop
>> To: dev@cxf.apache.org
>>
>>
>> Hi
>>
>> The config is not visible. What happens if you comment out a jaxrs:client
>> altogether, just wondering, has it something to do with the jaxrs:client
>> proxy being AOP-ed or not...
>>
>> thanks, Sergey
>>
>> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003 <br...@gmail.com>
>> wrote:
>>>
>>> Not sure if there is a bug or if I am not doing something correct.
>>> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
>>>
>>>
>>>
>>>
>>>
>>>
>>> In my spring config file, I have defined an aspect bean called:  AuditImpl
>>>
>>>
>>>
>>>
>>> This extends an interface called:  Audit
>>> I have the auditClient as a property and within the AuditImpl, I define
>>> the
>>> auditClient as:
>>>
>>> private AuditInterface auditClient;
>>>    public void setAuditClient(AuditInterface auditClient) {
>>>        this.auditClient = auditClient;
>>>    }
>>>
>>>
>>> I can define the aspect, via xml schema config, or through annotations
>>> fine..  It will build and deploy to jboss fine.  As soon as I define
>>> @Before, it does not deploy any more.  Whether I define the Before in the
>>> xml schema or as an annotation, the defining of it kills the deployment.
>>>
>>> Any help is appreciated.  Is this a bug or am I doing something wrong?  If
>>> I
>>> am doing something wrong, can you please provide some help as to what?
>>> Thank you.
>>>
>>> I get the following error:
>>>
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'auditClient': Initialization of bean failed; nested exception
>>> is
>>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
>>> warning
>>> can't determine superclass of missing type $Proxy388
>>>  [Xlint:cantFindType]
>>>        at
>>>
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>>>        at
>>>
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>>>        at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>>>        at
>>>
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>>        at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>>>        at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>>>        at
>>>
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>>>        at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>>>        at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>>>        at
>>>
>>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>>>        at
>>>
>>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>>>        at
>>>
>>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>>>        at
>>>
>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>>>        at
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>>>        at
>>>
>>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>>>        at
>>>
>>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>>>        at
>>>
>>> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>>>        at
>>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>>>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
>>> (more)
>>>
>>>
>>> --
>>> View this message in context:
>>> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
>>> Sent from the cxf-issues mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Application Integration Division of Talend
>> http://sberyozkin.blogspot.com
>>
>
>
>
> --
> "Carpe Diem"
> Brian Moss
>



-- 
"Carpe Diem"
Brian Moss

Re: cxf jaxrs:client and aop

Posted by Brian Moss <br...@gmail.com>.
Posting to users group:

The problem appears to be that aspectj-weaver is throwing some kind of
warning/exception, due to my jaxrs:client being created with an
interface that is not in the local code.  It is a 3rd party interface,
that is brought in via a dependency in pom.
If I put a copy of the 3rd party interface, in a local package, then
aspectj weaver is happy and I can deploy to jboss.

(Note:  I am using jboss 5.1.0 with jbossws 3.4.0)
I am thinking that there is a class conflict, somewhere in one of the
libraries that come with jboss, but I am not sure how to figure that
one out.

A solution to this issue, is to "trick" aspectj weaver, into thinking
that you have the external interface local.
Just create a local "dummy" interface, that extends the external
interface.  Dont put anything in it..  just extend it.
Then use that dummy interface to define your jaxrs:client, and any
where that you will be using that jaxrs:client.

I am guessing that aspectj weaver does some kind of initial pass, and
the jaxrs:client is not instantiated at that point, thus aspectj
weaver fails to see the "super class" and fails.

If anyone has any ideas on what could be the problem, I would
appreciate some input.
Yes, I have a fairly simple solution around the problem, but I would
like to resolve the problem.

Thanks.
Brian





On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Redirecting to the users list...
>
> ---------- Forwarded message ----------
> From: Sergey Beryozkin <sb...@gmail.com>
> Date: Tue, Mar 29, 2011 at 9:54 AM
> Subject: Re: cxf jaxrs:client and aop
> To: dev@cxf.apache.org
>
>
> Hi
>
> The config is not visible. What happens if you comment out a jaxrs:client
> altogether, just wondering, has it something to do with the jaxrs:client
> proxy being AOP-ed or not...
>
> thanks, Sergey
>
> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003 <br...@gmail.com>
> wrote:
>>
>> Not sure if there is a bug or if I am not doing something correct.
>> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
>>
>>
>>
>>
>>
>>
>> In my spring config file, I have defined an aspect bean called:  AuditImpl
>>
>>
>>
>>
>> This extends an interface called:  Audit
>> I have the auditClient as a property and within the AuditImpl, I define
>> the
>> auditClient as:
>>
>> private AuditInterface auditClient;
>>    public void setAuditClient(AuditInterface auditClient) {
>>        this.auditClient = auditClient;
>>    }
>>
>>
>> I can define the aspect, via xml schema config, or through annotations
>> fine..  It will build and deploy to jboss fine.  As soon as I define
>> @Before, it does not deploy any more.  Whether I define the Before in the
>> xml schema or as an annotation, the defining of it kills the deployment.
>>
>> Any help is appreciated.  Is this a bug or am I doing something wrong?  If
>> I
>> am doing something wrong, can you please provide some help as to what?
>> Thank you.
>>
>> I get the following error:
>>
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'auditClient': Initialization of bean failed; nested exception
>> is
>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
>> warning
>> can't determine superclass of missing type $Proxy388
>>  [Xlint:cantFindType]
>>        at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>>        at
>>
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>>        at
>>
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>>        at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>>        at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>>        at
>>
>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>>        at
>>
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>>        at
>>
>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>>        at
>>
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>>        at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>>        at
>>
>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>>        at
>>
>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>>        at
>>
>> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>>        at
>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
>> (more)
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
>> Sent from the cxf-issues mailing list archive at Nabble.com.
>
>
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend
> http://sberyozkin.blogspot.com
>



-- 
"Carpe Diem"
Brian Moss

Re: cxf jaxrs:client and aop

Posted by Brian Moss <br...@gmail.com>.
If I comment out the jaxrs:client, then there are no issues..
I have a jaxrs:server defined with no issues.  I also have a
jaxws:client defined with no issues.

The issue is with the jaxrs:client.. Even if I do not use it anywhere
in the code... and just have it defined (whether it be defined in the
jbossws-cxf.xml config file or a spring config file), it throws that
exception as soon as I define an advice like @Before.

I can have a class with the @Aspect and @Component annotations.
That class can have the AuditInterface auditClient in it.  That class
can even have pointcuts defined..  Everything is fine up to that
point.
But the second I define and advice (ie.. like @Before), whether I
define it in xml schema or via annotations, then the jaxrs:client
throws exceptions.

I am starting to believe that this is a bug.  I have tried many
combinations (xml config, annotation, moving around jaxrs:client
definintion, not including it in aspect class, etc.. and nothing is
working).

I did have success though, if I create the jaxrs:client
programmatically.. via the JAXRSClientFactory.create(getAuditUri(),
AuditInterface.class)
I put this in an AfterPropertiesSet(), and it worked.
The only issue now is that @Before advice works, but @AfterReturning
and @AfterThrowing now do not.  Very odd..


But, we should be able to define this in the config, and not be
limited to the programmatic approach.





On Tue, Mar 29, 2011 at 4:56 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Redirecting to the users list...
>
> ---------- Forwarded message ----------
> From: Sergey Beryozkin <sb...@gmail.com>
> Date: Tue, Mar 29, 2011 at 9:54 AM
> Subject: Re: cxf jaxrs:client and aop
> To: dev@cxf.apache.org
>
>
> Hi
>
> The config is not visible. What happens if you comment out a jaxrs:client
> altogether, just wondering, has it something to do with the jaxrs:client
> proxy being AOP-ed or not...
>
> thanks, Sergey
>
> On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003 <br...@gmail.com>
> wrote:
>>
>> Not sure if there is a bug or if I am not doing something correct.
>> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
>>
>>
>>
>>
>>
>>
>> In my spring config file, I have defined an aspect bean called:  AuditImpl
>>
>>
>>
>>
>> This extends an interface called:  Audit
>> I have the auditClient as a property and within the AuditImpl, I define
>> the
>> auditClient as:
>>
>> private AuditInterface auditClient;
>>    public void setAuditClient(AuditInterface auditClient) {
>>        this.auditClient = auditClient;
>>    }
>>
>>
>> I can define the aspect, via xml schema config, or through annotations
>> fine..  It will build and deploy to jboss fine.  As soon as I define
>> @Before, it does not deploy any more.  Whether I define the Before in the
>> xml schema or as an annotation, the defining of it kills the deployment.
>>
>> Any help is appreciated.  Is this a bug or am I doing something wrong?  If
>> I
>> am doing something wrong, can you please provide some help as to what?
>> Thank you.
>>
>> I get the following error:
>>
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'auditClient': Initialization of bean failed; nested exception
>> is
>> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
>> warning
>> can't determine superclass of missing type $Proxy388
>>  [Xlint:cantFindType]
>>        at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>>        at
>>
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>>        at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>>        at
>>
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>>        at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>>        at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>>        at
>>
>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>>        at
>>
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>>        at
>>
>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>>        at
>>
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>>        at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>>        at
>>
>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>>        at
>>
>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>>        at
>>
>> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>>        at
>> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
>> (more)
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
>> Sent from the cxf-issues mailing list archive at Nabble.com.
>
>
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend
> http://sberyozkin.blogspot.com
>



-- 
"Carpe Diem"
Brian Moss

Re: cxf jaxrs:client and aop

Posted by Sergey Beryozkin <sb...@gmail.com>.
Redirecting to the users list...

---------- Forwarded message ----------
From: Sergey Beryozkin <sb...@gmail.com>
Date: Tue, Mar 29, 2011 at 9:54 AM
Subject: Re: cxf jaxrs:client and aop
To: dev@cxf.apache.org


Hi

The config is not visible. What happens if you comment out a jaxrs:client
altogether, just wondering, has it something to do with the jaxrs:client
proxy being AOP-ed or not...

thanks, Sergey


On Tue, Mar 29, 2011 at 5:08 AM, brianmoss1003 <br...@gmail.com>wrote:

> Not sure if there is a bug or if I am not doing something correct.
> I have defined a jaxrs:client in my jbossws-cxf.xml file as follows:
>
>
>
>
>
>
> In my spring config file, I have defined an aspect bean called:  AuditImpl
>
>
>
>
> This extends an interface called:  Audit
> I have the auditClient as a property and within the AuditImpl, I define the
> auditClient as:
>
> private AuditInterface auditClient;
>    public void setAuditClient(AuditInterface auditClient) {
>        this.auditClient = auditClient;
>    }
>
>
> I can define the aspect, via xml schema config, or through annotations
> fine..  It will build and deploy to jboss fine.  As soon as I define
> @Before, it does not deploy any more.  Whether I define the Before in the
> xml schema or as an annotation, the defining of it kills the deployment.
>
> Any help is appreciated.  Is this a bug or am I doing something wrong?  If
> I
> am doing something wrong, can you please provide some help as to what?
> Thank you.
>
> I get the following error:
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'auditClient': Initialization of bean failed; nested exception is
> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
> warning
> can't determine superclass of missing type $Proxy388
>  [Xlint:cantFindType]
>        at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
>        at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>        at
>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>        at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>        at
>
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>        at
>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>        at
>
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>        at
>
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>        at
>
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>        at
>
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>        at
>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>        at
>
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>        at
>
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)......
> (more)
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-jaxrs-client-and-aop-tp4268741p4268741.html
> Sent from the cxf-issues mailing list archive at Nabble.com.
>






-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com