-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
i just upgraded to ZK 3.6.1 and ZK-Spring svn 11473. Now my app isn't coming up any more:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'application': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.zkoss.spring.bean.ZkComponentFactoryBean]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.zkoss.spring.bean.ZkComponentFactoryBean.<init>() at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getNonSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:718) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:614) at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:450) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:223) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:202) at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:143) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:503) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:473) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:599) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:570) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:192) at org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods(InjectionMetadata.java:117) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:321) ... 31 more Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.zkoss.spring.bean.ZkComponentFactoryBean]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.zkoss.spring.bean.ZkComponentFactoryBean.<init>() at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:58) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 45 more Caused by: java.lang.NoSuchMethodException: org.zkoss.spring.bean.ZkComponentFactoryBean.<init>() at java.lang.Class.getConstructor0(Class.java:2678) at java.lang.Class.getDeclaredConstructor(Class.java:1953) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54) ... 46 more
it seems the default constructor for org.zkoss.spring.bean.ZkComponentFactoryBean is now
public ZkComponentFactoryBean(boolean applied) { _applied = applied; }
but it seems the config beans are not aware of the new constructor or missed i something?
Thanks,
chris
Chris,
It is a version in developing. I will handle that part later. BTW, do you use XML configuration or Java annotation that cause this issue.
Henri,
i'm using spring annotation.
this is my current spring config (no security yet):
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:sec="http://www.springframework.org/schema/security" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:zksp="http://www.zkoss.org/2008/zkspring" xmlns:zksp-annot="http://www.zkoss.org/2008/zkspring-annot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.1.xsd http://www.zkoss.org/2008/zkspring http://www.zkoss.org/2008/zkspring/zkspring.xsd http://www.zkoss.org/2008/zkspring-annot http://www.zkoss.org/2008/zkspring-annot/zkspring-annot.xsd "> <!-- Generic --> <context:annotation-config /> <context:component-scan base-package="" /> <aop:aspectj-autoproxy/> <!-- ZK Spring config --> <zksp-annot:component-scan base-package="org.zkoss.spring.jpa,org.lugcamp,test"/> <zksp:zk-config/> <!-- Injected properties --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:/config/datasource.properties</value> </list> </property> </bean> </beans>
i try to do everything by annotations ;)
bye,
chris
hi henri,
am i connected to the wrong svn?
addon/ 11473 8 days henrichen bug: 2781558 SpringAnnotations - @EventHandler dosn't honor @Scope("idspace") ... branches/ 11493 37 hours tomyeh accurate zPkg.load releases/ 11498 36 hours jumperchen 3.6.1 svntest/ 9583 7 months daviechen trunk/ 11496 36 hours jumperchen 3.6.1
bye,
chris
Asked: 2009-04-28 21:15:44 +0800
Seen: 747 times
Last updated: May 06 '09