cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Carlos García del Canto (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CXF-6511) Method "isCglibProxyClass" has been deleted on Spring 4.2
Date Mon, 17 Aug 2015 10:09:46 GMT

    [ https://issues.apache.org/jira/browse/CXF-6511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14699320#comment-14699320
] 

Juan Carlos García del Canto commented on CXF-6511:
---------------------------------------------------

Sorry, I was on holidays and I couldn't answer your questions...

I marked this issue as invalid because I was wrong for the next reasons:

- Let's see the error:
{code}
Caused by: java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/Class;)Z
    at org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal(SpringAopClassHelper.java:85)
{code}

- Spring 4.1.7 AopUtils class Javadoc:
{code}
isCglibProxyClass

@Deprecated
public static boolean isCglibProxyClass(Class<?> clazz)

Deprecated. as of Spring 3.1 in favor of ClassUtils.isCglibProxyClass(Class)
Check whether the specified class is a CGLIB-generated class.
{code}

- On Spring 4.2 isCglibProxyClass doesn't exists, however that method exists on ClassUtils
class as Spring 4.1.7 javadoc saids...

- On CXF 3.1.1 is using ClassUtils.isCglibProxyClass that exists on Spring 4.2... so CXF code
is correct.

The way to solve this problem, is to make sure that you are using CXF core with version 3.
As you could read on http://cxf.apache.org/docs/featureslist.html "Note that the "cxf-core"
module is available starting from CXF 3.0.0. In CXF 2.7.x or earlier use "cxf-rt-core"", so
if your are using maven to include CXF you have to update your dependency from *cxf-rt-core*
to *cxf-core*.



> Method "isCglibProxyClass" has been deleted on Spring 4.2
> ---------------------------------------------------------
>
>                 Key: CXF-6511
>                 URL: https://issues.apache.org/jira/browse/CXF-6511
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.1
>            Reporter: Juan Carlos García del Canto
>
> Method *isCglibProxyClass* has been deleted on Spring 4.2, but SpringAopClassHelper CXF
class is using it in *getRealClassInternal* method and produces the following exception:
> {code}
> GRAVE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'ws_get_all_pets': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/Class;)Z
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
>     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
>     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
>     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
>     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
>     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
>     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
>     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
>     at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
>     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
>     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
>     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)
>     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
>     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/Class;)Z
>     at org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal(SpringAopClassHelper.java:85)
>     at org.apache.cxf.common.util.ClassHelper.getRealClass(ClassHelper.java:65)
>     at org.apache.cxf.jaxws.EndpointImpl.getImplementorClass(EndpointImpl.java:215)
>     at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:399)
>     at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
>     at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
>     at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1706)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1645)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
>     ... 21 more
> {code}
> Spring Framework 4.1.7.RELEASE doc that includes "isCglibProxyClass" method:
> http://docs.spring.io/spring/docs/4.1.7.RELEASE/javadoc-api/org/springframework/aop/support/AopUtils.html
> Spring Framework 4.2.0.BUILD-SNAPSHOT doc that doesn't include "isCglibProxyClass" method:
> http://docs.spring.io/spring/docs/4.2.0.BUILD-SNAPSHOT/javadoc-api/org/springframework/aop/support/AopUtils.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message