|
From: Colin S. <col...@ex...> - 2003-12-11 17:29:53
|
jürgen höller [werk3AT] wrote:
>Everybody,
>
>Hibernate 2.1 final with CGLIB2 underneath has just been released. This poses the question whether we should still release our 1.0 M4 with CGLIB1 support. Of course, our current codebase works nicely with Hibernate 2.1 as long as you don't use CGLIB-based AOP proxies (i.e. proxy full target objects instead of just interfaces), so we don't *have* to update immediately.
>
>
>
Hmm, maybe this was once the case, but I am not sure it is so easy any
longer. I tried dropping in Hibernate 2.1 final (with cglib2). However,
when using TransactionProxyFactoryBean, which no longer has the old
ProxyInterfacesOnly boolean option (which used to default to true, and
used a JDK proxy in the true case instead of cglib proxy), I now get an
exception
java.lang.NoClassDefFoundError:
org/springframework/aop/framework/OptimizedCglib1AopProxy
at
org.springframework.transaction.interceptor.TransactionProxyFactoryBean.afterPropertiesSet(TransactionProxyFactoryBean.java:167)
at
org.springframework.beans.factory.support.AbstractBeanFactory.callLifecycleMethodsIfNecessary(AbstractBeanFactory.java:1011)
at
org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:539)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:186)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:184)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284)
at
org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:107)
The offending line is:
ProxyFactory proxyFactory = new ProxyFactory();
Of course, ProxyFactory extends AdvisedSupport, which directly
references OptimizedCglib1AopProxy.
|