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 <[email protected]> wrote:
> Redirecting to the users list...
>
> ---------- Forwarded message ----------
> From: Sergey Beryozkin <[email protected]>
> Date: Tue, Mar 29, 2011 at 9:54 AM
> Subject: Re: cxf jaxrs:client and aop
> To: [email protected]
>
>
> 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 <[email protected]>
> 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

Reply via email to