You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Andre V. <ave...@su...> - 2004-03-18 09:03:27
|
Thanks ! I will try that. andre -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: 17 March 2004 18:25 To: spr...@li... Subject: Re: [Springframework-developer] AutoProxy+Hibernate I've just fixed a bug in AbstractAutoProxyCreator today (reported by = Cameron Braid), where common interceptors were initialized too eagerly, = potentially causing implicit circular references. So please check out = the current CVS version: There's a good chance that you're issue is = fixed there. This will of course also make it into the upcoming Spring = 1.0 final. Juergen -----Original Message----- From: spr...@li... = [mailto:spr...@li...]On Behalf = Of Andre Vermeulen Sent: Wednesday, March 17, 2004 3:15 PM To: spr...@li... Subject: [Springframework-developer] AutoProxy+Hibernate I have two AutoProxy instances createAuditInfoProxyCreator and = deleteAuditInfoProxyCreator, which wrap some of my classes with = Interceptors. The two interceptors I am using is createAuditInfoAdvice and = deleteAuditInfoAdvice. The configuration settings is below.=20 I have an implementation which use the same AutoProxies, but it is using = SQLMap which works fine - I am not using SQLMapTemplate at the moment = for this implemetation. Now have I written the same functionality as my = previous SQLMap implemetation, but using Hibernate and HibernateTemplate = (no Transaction support at the moment). I can include one of the = AutoProxies instances to the Hibernate implementation and it will work = fine. But as soon as I add both the AutoProxies I get a exception = (org.springframework.beans.factory.FactoryBeanCircularReferenceException)= .=20 I am not sure whether I unstand the concept of a = FactoryBeanCircularReferenceException 100%, but both my iterceptors are = using a Hibernate SessionFactory - this should not be a problem ?? I = will include the whole tacktrace below. Any pointers ? Something obvious I am missing ? Or is it just a CR... This problem seem similar to Cameron Braid problem as... = http://sourceforge.net/mailarchive/message.php?msg_id=3D7536635 Did you solve your problem Cameron ?? Any help will be appreciated - I will see whta I can figure out in the = mean while. regards andre=20 AutoProxys : ************** <bean id=3D"createAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*FetchRule</value> </property> <property name=3D"interceptorNames"> <list> <value>createAuditInfoAdvice</value> </list> </property> </bean> <bean id=3D"deleteAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*ConfirmRule</value> </property> <property name=3D"interceptorNames"> <list> <value>deleteAuditInfoAdvice</value> </list> </property> </bean> Advices :=20 ********** <bean id=3D"createAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateCreateAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> <property name=3D"uuidGenerator" > <ref bean=3D"keyGenerator"/> </property> </bean> <bean id=3D"deleteAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateDeleteAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> </bean> Exception : ************ Testcase: = testExecute(com.cablenet.datasync.rules.hibernate.test.TestHibernateConfi= rmRule): Caused an ERROR Error creating bean with name 'confirmReplyListener' defined in = classpath resource [appConfig.xml]: Can't resolve reference to bean = 'confirmRuleRegistry' while setting property 'constructor argument'; = nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmReplyListener' defined in classpath resource = [appConfig.xml]: Can't resolve reference to bean 'confirmRuleRegistry' = while setting property 'constructor argument'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'createAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'sessionFactory' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean 'cnDS' while = setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference at = org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFo= rSharedInstance(AbstractBeanFactory.java:444) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:124) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:172) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:172) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:222) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:136) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.DefaultListableBeanFactory.preI= nstantiateSingletons(DefaultListableBeanFactory.java:159) at = org.springframework.context.support.AbstractApplicationContext.refresh(Ab= stractApplicationContext.java:268) at = org.springframework.context.support.FileSystemXmlApplicationContext.<init= >(FileSystemXmlApplicationContext.java:42) at = org.springframework.context.support.ClassPathXmlApplicationContext.<init>= (ClassPathXmlApplicationContext.java:40) at com.cablenet.datasync.AppContext.getAppContextHibernate(Unknown = Source) at = com.cablenet.datasync.rules.hibernate.test.TestHibernateConfirmRule.testE= xecute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Alef A. <al...@jt...> - 2004-03-18 08:46:45
|
People are editing the XML with XMLMind's xml editor. Updating the documentation online for now happens manually, once every now and then. I haven't looked into Confluence yet. I don't really care what system the documentation is written with, as long as it generates HTML and something like PDF (I like this very much). I don't think migrating it right now makes sense :-). Alef _____ From: spr...@li... [mailto:spr...@li...] On Behalf Of Keith Donald Sent: Wednesday, March 17, 2004 8:08 PM To: spr...@li... Subject: [Springframework-developer] reference documentation What's the process for updating the reference documentation? Any particular tool I need to edit the .xml files? Just wonderin' because I have some content/tutorial/samples I'd like to contribute! Thanks! Keith p.s. are we going to convert our docs over to Confluence? Do we have a timeframe for the that? |
|
From: <tri...@tr...> - 2004-03-18 03:20:23
|
I have applied a consistent license header on all java source files. If you have changes that are not checked in, please make sure that you merge with the header changes. Thomas P.S. The header now reads: /* * Copyright 2002-2004 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ |
|
From: Kopylenko, D. <dko...@ac...> - 2004-03-17 19:48:08
|
Confluence should be coming soon, but I haven't heard from Atlassian folks for a while? Mike, what is the story there? Regards, Dmitriy. -----Original Message----- From: Keith Donald [mailto:kd...@cs...] Sent: Wednesday, March 17, 2004 2:08 PM To: spr...@li... Subject: [Springframework-developer] reference documentation What's the process for updating the reference documentation? Any particular tool I need to edit the .xml files? Just wonderin' because I have some content/tutorial/samples I'd like to contribute! Thanks! Keith p.s. are we going to convert our docs over to Confluence? Do we have a timeframe for the that? |
|
From: Colin S. <col...@ex...> - 2004-03-17 19:43:40
|
Best (free) tool for docbook work seems to be seems to be XmlMind: http://www.xmlmind.com/xmleditor/ Keith Donald wrote: > What's the process for updating the reference documentation? Any > particular tool I need to edit the .xml files? Just wonderin' because > I have some content/tutorial/samples I'd like to contribute! > > Thanks! > Keith > > p.s. are we going to convert our docs over to Confluence? Do we have a > timeframe for the that? > * * > |
|
From: <sk...@fe...> - 2004-03-17 19:37:27
|
I am assuming the docs are in Docbook if so I believe some people are using XMLMind which i've been using a lot lately and am loving. I'm also loving docbook which I started using after someone on the Spring mailing list mentioned. Now I just need to get our documentation dept. to learn it oi. I spent the better part of yesterday playing with docbook support in openoffice so I could get a cleaner docbook to word conversion, don't ask. It didn't go that well. I also would be interested in what other tools people are using for docbook editing. Sean Kroah FedEx Ground (412) 859-5130 sk...@fe... |
|
From: Keith D. <kd...@cs...> - 2004-03-17 19:08:13
|
What's the process for updating the reference documentation? Any particular tool I need to edit the .xml files? Just wonderin' because I have some content/tutorial/samples I'd like to contribute! Thanks! Keith p.s. are we going to convert our docs over to Confluence? Do we have a timeframe for the that? |
|
From: <jue...@we...> - 2004-03-17 18:23:57
|
I've just fixed a bug in AbstractAutoProxyCreator today (reported by = Cameron Braid), where common interceptors were initialized too eagerly, = potentially causing implicit circular references. So please check out = the current CVS version: There's a good chance that you're issue is = fixed there. This will of course also make it into the upcoming Spring = 1.0 final. Juergen -----Original Message----- From: spr...@li... = [mailto:spr...@li...]On Behalf = Of Andre Vermeulen Sent: Wednesday, March 17, 2004 3:15 PM To: spr...@li... Subject: [Springframework-developer] AutoProxy+Hibernate I have two AutoProxy instances createAuditInfoProxyCreator and = deleteAuditInfoProxyCreator, which wrap some of my classes with = Interceptors. The two interceptors I am using is createAuditInfoAdvice and = deleteAuditInfoAdvice. The configuration settings is below.=20 I have an implementation which use the same AutoProxies, but it is using = SQLMap which works fine - I am not using SQLMapTemplate at the moment = for this implemetation. Now have I written the same functionality as my = previous SQLMap implemetation, but using Hibernate and HibernateTemplate = (no Transaction support at the moment). I can include one of the = AutoProxies instances to the Hibernate implementation and it will work = fine. But as soon as I add both the AutoProxies I get a exception = (org.springframework.beans.factory.FactoryBeanCircularReferenceException)= .=20 I am not sure whether I unstand the concept of a = FactoryBeanCircularReferenceException 100%, but both my iterceptors are = using a Hibernate SessionFactory - this should not be a problem ?? I = will include the whole tacktrace below. Any pointers ? Something obvious I am missing ? Or is it just a CR... This problem seem similar to Cameron Braid problem as... = http://sourceforge.net/mailarchive/message.php?msg_id=3D7536635 Did you solve your problem Cameron ?? Any help will be appreciated - I will see whta I can figure out in the = mean while. regards andre=20 AutoProxys : ************** <bean id=3D"createAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*FetchRule</value> </property> <property name=3D"interceptorNames"> <list> <value>createAuditInfoAdvice</value> </list> </property> </bean> <bean id=3D"deleteAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*ConfirmRule</value> </property> <property name=3D"interceptorNames"> <list> <value>deleteAuditInfoAdvice</value> </list> </property> </bean> Advices :=20 ********** <bean id=3D"createAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateCreateAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> <property name=3D"uuidGenerator" > <ref bean=3D"keyGenerator"/> </property> </bean> <bean id=3D"deleteAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateDeleteAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> </bean> Exception : ************ Testcase: = testExecute(com.cablenet.datasync.rules.hibernate.test.TestHibernateConfi= rmRule): Caused an ERROR Error creating bean with name 'confirmReplyListener' defined in = classpath resource [appConfig.xml]: Can't resolve reference to bean = 'confirmRuleRegistry' while setting property 'constructor argument'; = nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmReplyListener' defined in classpath resource = [appConfig.xml]: Can't resolve reference to bean 'confirmRuleRegistry' = while setting property 'constructor argument'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'createAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'sessionFactory' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean 'cnDS' while = setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference at = org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFo= rSharedInstance(AbstractBeanFactory.java:444) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:124) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:172) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:172) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:222) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:136) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.DefaultListableBeanFactory.preI= nstantiateSingletons(DefaultListableBeanFactory.java:159) at = org.springframework.context.support.AbstractApplicationContext.refresh(Ab= stractApplicationContext.java:268) at = org.springframework.context.support.FileSystemXmlApplicationContext.<init= >(FileSystemXmlApplicationContext.java:42) at = org.springframework.context.support.ClassPathXmlApplicationContext.<init>= (ClassPathXmlApplicationContext.java:40) at com.cablenet.datasync.AppContext.getAppContextHibernate(Unknown = Source) at = com.cablenet.datasync.rules.hibernate.test.TestHibernateConfirmRule.testE= xecute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) |
|
From: Seth L. <se...@eh...> - 2004-03-17 18:23:44
|
Rim, Mark wrote:
> jozsa,
>
> well, for now, i think the short answer is yes. you do have to manually parse
> request parameters. otherwise, you could look through some source code and
> override methods at just the right points. but manual parsing might be easier.
>
> it looks like the issue is in the bean framework and not in the web stuff.
> although you can "get" map values by key using the BeanWrapper, you cannot set
> them. for example,
>
> MapBean tb = new MapBean();
> BeanWrapper bw = new BeanWrapperImpl(tb);
> tb.getMap().put("key1","value1");
> # the following works
> assertEquals("value1", bw.getPropertyValue("map[key1]"));
> # the next statement fails
> bw.setPropertyValue("map[key1]","value2");
>
> since mvc bindings (probably) depends on the bean framework, this is the
> likely cause of your pain. this may be by-design or a bug. i raised the issue
> on the developer mailing list during a bout with insomnia last night.
What is the current status on this issue for a 1.0 release? Do the
developers feel this is an issue to be fixed?
Judging from the amount of questions related to this issue found in the
forums and mailing lists (including my own) I feel this a feature worth
implementing.
It provides some symmetry with how getPropertyValue works. Also, many
of Spring's MVC users are Struts converts. The above functionality is
present in Struts, and having it in Spring would make porting those
applications to Spring easier and more straight forward.
If this functionality won't be added for 1.0, it would be very helpful
to have a workaround posted.
There are many patches for this, including my own, that are good
starting points. Most are labeled "hacks" so having the developer's
feedback would be very useful. :)
Thoughts or comments?
Thanks!
Seth
|
|
From: Andre V. <ave...@su...> - 2004-03-17 14:17:08
|
I have two AutoProxy instances createAuditInfoProxyCreator and = deleteAuditInfoProxyCreator, which wrap some of my classes with = Interceptors. The two interceptors I am using is createAuditInfoAdvice and = deleteAuditInfoAdvice. The configuration settings is below.=20 =20 I have an implementation which use the same AutoProxies, but it is using = SQLMap which works fine - I am not using SQLMapTemplate at the moment = for this implemetation. Now have I written the same functionality as my = previous SQLMap implemetation, but using Hibernate and HibernateTemplate = (no Transaction support at the moment). I can include one of the = AutoProxies instances to the Hibernate implementation and it will work = fine. But as soon as I add both the AutoProxies I get a exception = (org.springframework.beans.factory.FactoryBeanCircularReferenceException)= .=20 =20 I am not sure whether I unstand the concept of a = FactoryBeanCircularReferenceException 100%, but both my iterceptors are = using a Hibernate SessionFactory - this should not be a problem ?? I = will include the whole tacktrace below. =20 =20 =20 Any pointers ? Something obvious I am missing ? Or is it just a CR... =20 This problem seem similar to Cameron Braid problem as... = http://sourceforge.net/mailarchive/message.php?msg_id=3D7536635 =20 Did you solve your problem Cameron ?? =20 Any help will be appreciated - I will see whta I can figure out in the = mean while. =20 regards =20 andre=20 =20 AutoProxys : ************** =20 <bean id=3D"createAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*FetchRule</value> </property> <property name=3D"interceptorNames"> <list> <value>createAuditInfoAdvice</value> </list> </property> </bean> =20 <bean id=3D"deleteAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*ConfirmRule</value> </property> <property name=3D"interceptorNames"> <list> <value>deleteAuditInfoAdvice</value> </list> </property> </bean> =20 =20 Advices :=20 ********** <bean id=3D"createAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateCreateAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> =20 <property name=3D"uuidGenerator" > <ref bean=3D"keyGenerator"/> </property> </bean> =20 <bean id=3D"deleteAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateDeleteAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> </bean> =20 Exception : ************ =20 Testcase: = testExecute(com.cablenet.datasync.rules.hibernate.test.TestHibernateConfi= rmRule): Caused an ERROR Error creating bean with name 'confirmReplyListener' defined in = classpath resource [appConfig.xml]: Can't resolve reference to bean = 'confirmRuleRegistry' while setting property 'constructor argument'; = nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmReplyListener' defined in classpath resource = [appConfig.xml]: Can't resolve reference to bean 'confirmRuleRegistry' = while setting property 'constructor argument'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'createAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'sessionFactory' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean 'cnDS' while = setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference at = org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFo= rSharedInstance(AbstractBeanFactory.java:444) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:124) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) |
|
From: Andre V. <ave...@su...> - 2004-03-17 14:14:52
|
=20 I have two AutoProxy instances createAuditInfoProxyCreator and = deleteAuditInfoProxyCreator, which wrap some of my classes with = Interceptors. The two interceptors I am using is createAuditInfoAdvice and = deleteAuditInfoAdvice. The configuration settings is below.=20 =20 I have an implementation which use the same AutoProxies, but it is using = SQLMap which works fine - I am not using SQLMapTemplate at the moment = for this implemetation. Now have I written the same functionality as my = previous SQLMap implemetation, but using Hibernate and HibernateTemplate = (no Transaction support at the moment). I can include one of the = AutoProxies instances to the Hibernate implementation and it will work = fine. But as soon as I add both the AutoProxies I get a exception = (org.springframework.beans.factory.FactoryBeanCircularReferenceException)= .=20 =20 I am not sure whether I unstand the concept of a = FactoryBeanCircularReferenceException 100%, but both my iterceptors are = using a Hibernate SessionFactory - this should not be a problem ?? I = will include the whole tacktrace below. =20 =20 =20 Any pointers ? Something obvious I am missing ? Or is it just a CR... =20 This problem seem similar to Cameron Braid problem as... = http://sourceforge.net/mailarchive/message.php?msg_id=3D7536635 =20 Did you solve your problem Cameron ?? =20 Any help will be appreciated - I will see whta I can figure out in the = mean while. =20 regards =20 andre=20 =20 AutoProxys : ************** =20 <bean id=3D"createAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*FetchRule</value> </property> <property name=3D"interceptorNames"> <list> <value>createAuditInfoAdvice</value> </list> </property> </bean> =20 <bean id=3D"deleteAuditInfoProxyCreator" = class=3D"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCre= ator"> <property name=3D"proxyTargetClass"> <value>true</value> </property> <property name=3D"beanNames"> <value>*ConfirmRule</value> </property> <property name=3D"interceptorNames"> <list> <value>deleteAuditInfoAdvice</value> </list> </property> </bean> =20 =20 Advices :=20 ********** <bean id=3D"createAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateCreateAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> =20 <property name=3D"uuidGenerator" > <ref bean=3D"keyGenerator"/> </property> </bean> =20 <bean id=3D"deleteAuditInfoAdvice" = class=3D"com.cablenet.datasync.interceptors.HibernateDeleteAuditInfoAdvic= e"> <property name=3D"sessionFactory" > <ref bean=3D"sessionFactory"/> </property> </bean> =20 Exception : ************ =20 Testcase: = testExecute(com.cablenet.datasync.rules.hibernate.test.TestHibernateConfi= rmRule): Caused an ERROR Error creating bean with name 'confirmReplyListener' defined in = classpath resource [appConfig.xml]: Can't resolve reference to bean = 'confirmRuleRegistry' while setting property 'constructor argument'; = nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmReplyListener' defined in classpath resource = [appConfig.xml]: Can't resolve reference to bean 'confirmRuleRegistry' = while setting property 'constructor argument'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'confirmRuleRegistry' defined in classpath resource = [appConfig.xml]: Initialization method of bean failed; nested exception = is org.springframework.beans.factory.BeanCreationException: Error = creating bean with name 'createAuditInfoAdvice' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'createAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'sessionFactory' defined in classpath = resource [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'cnDS' while setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'sessionFactory' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean 'cnDS' while = setting property 'dataSource'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cnDS' defined in classpath resource [appConfig.xml]: = Initialization method of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'deleteAuditInfoAdvice' defined in classpath resource = [appConfig-Hibernate.xml]: Can't resolve reference to bean = 'sessionFactory' while setting property 'sessionFactory'; nested = exception is = org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference org.springframework.beans.factory.FactoryBeanCircularReferenceException: = Factory bean 'sessionFactory' returned null object - possible cause: not = fully initialized due to circular bean reference at = org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFo= rSharedInstance(AbstractBeanFactory.java:444) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:124) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:172) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:506) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.populateBean(AbstractAutowireCapableBeanFactory.java:361) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:150) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso= lveInterceptorNames(AbstractAutoProxyCreator.java:240) at = org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post= ProcessAfterInitialization(AbstractAutoProxyCreator.java:188) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBea= nFactory.java:111) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:172) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveReference(AbstractAutowireCapableBeanFactory.java:585) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:553) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:222) at = org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact= ory.createBean(AbstractAutowireCapableBeanFactory.java:136) at = org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs= tractBeanFactory.java:142) at = org.springframework.beans.factory.support.DefaultListableBeanFactory.preI= nstantiateSingletons(DefaultListableBeanFactory.java:159) at = org.springframework.context.support.AbstractApplicationContext.refresh(Ab= stractApplicationContext.java:268) at = org.springframework.context.support.FileSystemXmlApplicationContext.<init= >(FileSystemXmlApplicationContext.java:42) at = org.springframework.context.support.ClassPathXmlApplicationContext.<init>= (ClassPathXmlApplicationContext.java:40) at com.cablenet.datasync.AppContext.getAppContextHibernate(Unknown = Source) at = com.cablenet.datasync.rules.hibernate.test.TestHibernateConfirmRule.testE= xecute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) |
|
From: <jue...@we...> - 2004-03-17 13:26:43
|
The only thing that Spring does in terms of JSTL is to expose a JSTL = LocalizationContext to JstlViews: So if you use a DispatcherServlet with = JstlViews, fmt tags in those views will access the Spring MessageSource. = In all other views like plain InternalResourceViews, there shouldn't be = any sort of JSTL interference. And no, Spring doesn't mess with the classloader ;-) It's much easier: A = JSTL LocalizationContext allows you to specify the ResourceBundle that = JSTL tags should access, on a per-request basis (via special request = attributes). Spring simply passes a MessageSource-wrapping = ResourceBundle subclass in there. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Max Kutny Sent: Wednesday, March 17, 2004 1:07 PM To: spr...@li... Subject: [Springframework-developer] interference with jstl bundle lookup strategy Guys, will you advise me with the following issue: once the DispatcherServlet is loaded fmt tags fail to found the resource bundle unless it's configured as a MessageSource. Am I getting right that spring intersepts calls to ResourceBunld.getBundle() (probably by providing own class loader)? If that was made intentionally what was the rationale behind? Thanks. -- Max ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Max K. <mk...@um...> - 2004-03-17 12:07:21
|
Guys, will you advise me with the following issue: once the DispatcherServlet is loaded fmt tags fail to found the resource bundle unless it's configured as a MessageSource. Am I getting right that spring intersepts calls to ResourceBunld.getBundle() (probably by providing own class loader)? If that was made intentionally what was the rationale behind? Thanks. -- Max |
|
From: Keith D. <kd...@cs...> - 2004-03-17 04:37:33
|
Anna, I took a look and verified what you're seeing is definitely a bug. Good catch. I'll let you know as soon as I get it resolved and will incorpora= te a test to verify it's fixed. Thanks! Keith ----- Original Message -----=20 From: "Keith Donald" <kd...@cs...> To: <spr...@li...> Sent: Tuesday, March 16, 2004 7:02 PM Subject: RE: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox > Anna, > > Did you recompile the attributes after you changed the property name? = I > know I quite often forget that step. There is a build.xml file in the test > area with a target that will do this for you. I *hope* that's what it was, > but I will take a look later. > > Thanks, > Keith > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behal= f Of > Anna Chen > Sent: Tuesday, March 16, 2004 5:44 PM > To: spr...@li... > Subject: RE: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > Keith, > > > Thanks a lot! > > However, I have found another bug... > The attribute name has to be the same as the class name > > After I change name to theName in Pet class, I got > > Testsuite: org.springframework.validation.BeanValidatorTestSuite > Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.461 sec > > Testcase: testErrorsValidationWorkflow took 0.421 sec > Caused an ERROR > No property 'name' in class [org.springframework.validation.Pet] > org.springframework.beans.FatalBeanException: No property 'name' in cla= ss > [org.springframework.validation.Pet] > at > org.springframework.beans.CachedIntrospectionResults.getPropertyDescripto= r(C > achedIntrospectionResults.java:114) > at > org.springframework.beans.BeanWrapperImpl.getPropertyDescriptor(BeanWrapp= erI > mpl.java:776) > at > org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImp= l.j > ava:453) > at > org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrappe= rIm > pl.java:386) > at > org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(B= ean > WrapperImpl.java:308) > at > org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImp= l.j > ava:440) > at > org.springframework.validation.BindException.rejectValue(BindException.ja= va: > 107) > at > org.springframework.validation.rules.AbstractPropertyValidationRule.invok= eRe > jectValue(AbstractPropertyValidationRule.java:63) > at > org.springframework.validation.support.ValidationResultsErrorsCollector.v= ali > dationErrorOccured(ValidationResultsErrorsCollector.java:44) > at > org.springframework.validation.support.PropertyValidatorImpl.validateProp= ert > yValue(PropertyValidatorImpl.java:98) > at > org.springframework.validation.support.PropertyValidatorImpl.validateCurr= ent > PropertyValue(PropertyValidatorImpl.java:83) > at > org.springframework.validation.support.BeanInfoBeanValidator.processBeanI= nfo > Validators(BeanInfoBeanValidator.java:113) > at > org.springframework.validation.support.BeanInfoBeanValidator.processBeanI= nfo > Validators(BeanInfoBeanValidator.java:117) > at > org.springframework.validation.support.BeanInfoBeanValidator.validateBean= (Be > anInfoBeanValidator.java:51) > at > org.springframework.validation.support.DefaultBeanValidationService.valid= ate > (DefaultBeanValidationService.java:53) > at > org.springframework.validation.support.DefaultBeanValidationService.valid= ate > (DefaultBeanValidationService.java:48) > at > org.springframework.validation.BeanValidatorTestSuite.testErrorsValidatio= nWo > rkflow(BeanValidatorTestSuite.java:76) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl > .java:25) > at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232) > at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) > at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88) > at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) > at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128) > at com.werken.werkz.Goal.fire(Goal.java:639) > at com.werken.werkz.Goal.attain(Goal.java:575) > at com.werken.werkz.Goal.attainPrecursors(Goal.java:488) > at com.werken.werkz.Goal.attain(Goal.java:573) > at > org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:44= 8) > at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348) > at org.apache.maven.cli.App.doMain(App.java:543) > at org.apache.maven.cli.App.main(App.java:1109) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl > .java:25) > at com.werken.forehead.Forehead.run(Forehead.java:551) > at com.werken.forehead.Forehead.main(Forehead.java:581) > > > Thanks, > > Anna > > > > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf= Of > Keith Donald > Sent: Tuesday, March 16, 2004 2:58 PM > To: spr...@li... > Subject: Re: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > Anna, > > There is a indirect relationship between the two. > > The BeanValidatorBuilder instantiates PropertyValidators for a bean's > properties and places them in that beans corresponding BeanInfo. The > DefaultBeanValidationService then looks up those validators by querying the > BeanInfo and subsequently processes them. So there is a level of > indirection there. > > We're basically leveraging the existing javabeans metadata classes as > opposed to rolling our own cache (which simplifies things and seems qui= te > elegant.) > > More specifically, a validated bean will have the following characteristics: > > 1. The BeanInfo.beanDescriptor has the property > BeanValidatorConstants.VALIDATED set to "true". > > 2. For each validated property, it's propertyDescriptor also has the > property BeanValidatorConstants.VALIDATED also set to "true". In addition, > the BeanValidatorConstants.VALIDATOR property stores a reference to the > corresponding PropertyValidator, which encapsulates all the > PropertyValidationRules. > > What the defaultBeanValidationService does is query the BeanInfo of the bean > class when it is asked to validate a bean. If the BeanDescriptor is no= t > marked as "validateable", the service returns, doing nothing. Else it runs > over each property doing the same thing recursively down the object gra= ph, > invoking validate() on any found PropertyValidators. > > One issue that likely needs to be addressed is a result of BeanInfo caching > differences between JDK 1.3 and 1.4. I know under JDK 1.4 BeanInfo > instances are shared by the Introspector (caching is built in.) I believe > under JDK 1.3, however, that is not the case--new BeanInfo copies are > returned on each call to the Introspector. :-( > > Keith > > ----- Original Message ----- > From: "Anna Chen" <ac...@er...> > To: <spr...@li...> > Sent: Tuesday, March 16, 2004 3:09 PM > Subject: RE: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > > Keith, > > > > Could you tell me the relationship between > > DefaultBeanValidationService > and > > beanValidatorBuilder? > > > > I could not find where beanValidatorBuilder get called. > > > > Thanks, > > > > Anna > > > > -----Original Message----- > > From: spr...@li... > > [mailto:spr...@li...]On > > Behalf Of Keith Donald > > Sent: Saturday, March 13, 2004 6:44 PM > > To: spr...@li... > > Subject: Re: [Springframework-developer] declarative rules-based bean > > validator w/ attributes in sandbox > > > > > > Anna, > > > > I've since been updating the unit tests of the declarative validation > stuff, > > so I thought I'd go ahead and attach a working sample that also exist= s > > in the sandbox/test/org/springframework/validation test area. As we > > do more testing, we'll get better samples, too. > > > > The sample below shows 3 bean declarations: the beanValidatorService > > is > the > > main validator interface to the subsystem, and here is using the > > attributesValidatorSource to load on-demand validator information for > beans > > using commons-attributes. The beanValidatorBuilder is an example of > > how > to > > configure validation rules for bean properties declaratively using > > Spring. In this example, the builder is configuring rules for the > > "name.lastName" and "favoriteToy" properties of the Pet bean > > (specifically the key in the propertyValidators map is the > > propertyName, and the value is a set of PropertyValidationRule > > instances.) > > > > -------------- > > > > <bean id=3D"beanValidationService" > > > class=3D"org.springframework.validation.support.DefaultBeanValidationServ= ice"> > > <property name=3D"beanValidatorSource"><ref > > bean=3D"attributesValidatorSource"/></property> > > </bean> > > > > <bean id=3D"attributesValidatorSource" > > class=3D"org.springframework.validation.support.AttributesValidatorSo= urc > > e"/> > > > > <bean id=3D"beanValidatorBuilder" > > class=3D"org.springframework.validation.support.BeanValidatorBuilder"= > > > <constructor-arg index=3D"0"> > > <description>The validated bean type</description> > > <value>org.springframework.validation.Pet</value> > > </constructor-arg> > > <property name=3D"propertyValidators"> > > <map> > > <entry key=3D"name.lastName"> > > <bean class=3D"org.springframework.validation.rules.Require= d"/> > > </entry> > > <entry key=3D"favoriteToy"> > > <set> > > <bean class=3D"org.springframework.validation.rules.Required"/> > > <bean class=3D"org.springframework.validation.rules.MaxLength"> > > <constructor-arg > index=3D"0"><value>25</value></constructor-arg> > > </bean> > > </set> > > </entry> > > </map> > > </property> > > </bean> > > > > Keith > > > > ----- Original Message ----- > > From: "Keith Donald" <kd...@cs...> > > To: <spr...@li...> > > Sent: Thursday, March 11, 2004 12:19 AM > > Subject: Re: [Springframework-developer] declarative rules-based bean > > validator w/ attributes in sandbox > > > > > > > Anna, > > > > > > Thanks... yea, I typed that by hand in the email from memory and I > > > see I made at least one mistake with a closing tag in the first bea= n > > declaration. > > > :-) I'll be sure to correct anything like that when we get some > > samples/docs > > > out. > > > > > > BTW, guys thanks for those commons attributes tips. I haven't had > > > time > to > > > go through their docs in detail and I really appreciate it. I agre= e > > > we should keep the validation rule hierarchy as is. > > > > > > Keith > > > > > > ----- Original Message ----- > > > From: "Anna Chen" <ac...@er...> > > > To: <spr...@li...> > > > Sent: Wednesday, March 10, 2004 4:04 PM > > > Subject: RE: [Springframework-developer] declarative rules-based > > > bean validator w/ attributes in sandbox > > > > > > > > > > Keith > > > > > > > > I don't think that the Spring IoC configuration is a valid one > according > > > to > > > > http://www.springframework.org/dtd/spring-beans.dtd > > > > > > > > > > > > Anna > > > > > > > > -----Original Message----- > > > > From: spr...@li... > > > > [mailto:spr...@li...]On > Behalf > > > > Of Keith Donald > > > > Sent: Wednesday, March 10, 2004 8:10 AM > > > > To: spr...@li... > > > > Subject: Re: [Springframework-developer] declarative rules-based > > > > bean validator w/ attributes in sandbox > > > > > > > > > > > > Correct me if I'm wrong, but I don't think there is. However, I > > > > know > if > > > > you're using Eclipse, the sandbox code (including tests) > > > > automatically > > > gets > > > > incrementally compiled in target/other-classes, which is > > > > automatically > > put > > > > in the classpath. So I have been basically running everything in > > > > the sandbox from Eclipse directly. > > > > > > > > Keith > > > > > > > > ----- Original Message ----- > > > > From: <sam...@ma...> > > > > To: <spr...@li...> > > > > Sent: Wednesday, March 10, 2004 6:42 AM > > > > Subject: RE: [Springframework-developer] declarative rules-based > > > > bean validator w/ attributes in sandbox > > > > > > > > > > > > > Excellent, thanks Keith. On the subject of the sandbox, is ther= e > > > > > a > > build > > > > > directive to buils the sandbox code, or should I just overwrite > > > > > the > > src > > > > with the > > > > > sandbox code and rebuild? > > > > > > > > > > sam > > > > > > > > > > Quoting Keith Donald <kd...@cs...>: > > > > > > > > > > > I checked in a "BeanValidatorBuilder" class in the sandbox > > > > > > under validation.support that allows you to declaratively > > > > > > assign PropertyValidationRules to bean properties via > > > > > > Spring-IoC, through > a > > > > > > scripting environment such as Groovy/Beanshell, or > > > > > > programatically > > in > > > =3D > > > > > > plain > > > > > > java. This is in addition to support for defining validation > rules > > on > > > =3D > > > > > > beans > > > > > > via source markup. > > > > > > > > > > > > Here's an example on how to use it: > > > > > > > > > > > > Spring IoC configuration > > > > > > > > > > > > <bean id=3D3D"validatorBuilder" > > > > > > > class=3D3D"org.springframework.validation.support.ValidatorBuilder"/> > > > > > > <constructor-arg index=3D3D"0"> > > > > > > <description>The validated bean type (class or > > > > > > interface) aka 'root entity'</description> > > > > > > <value>org.springframework.validation.Pet</value> > > > > > > </constructor-arg> > > > > > > <map> > > > > > > <description> > > > > > > A map of property name keys to one or more > > > > > > governing property validation rules. > > > > > > Nested bean property names from the 'root > > > > > > entity' are supported. > > > > > > Rule instances may be reused across > > > > > > properties if desired. > > > > > > </description> > > > > > > <entry key=3D3D"name.lastName"> > > > > > > <value><bean > > > > > > class=3D3D"org.springframework.validation.rules.Required"/></= val > > > > > > ue> > > > > > > </entry> > > > > > > <entry key=3D3D"favoriteToy"> > > > > > > <value> > > > > > > <set> > > > > > > <bean > > > > > > class=3D3D"org.springframework.validation.rules.Required"/> > > > > > > <bean > > > > > > class=3D3D"org.springframework.validation.rules.MaxLength"> > > > > > > =3D09 > > > > > > <constructor-arg>25</constructor-arg> > > > > > > > > > > > > </bean> > > > > > > </set> > > > > > > </value> > > > > > > </entry> > > > > > > </map> > > > > > > </bean> > > > > > > > > > > > > Java > > > > > > > > > > > > BeanValidatorBuilder builder =3D3D new =3D > > > > > > BeanValidatorBuilder(Pet.class); > > > > > > > > > > > > builder.setPropertyValidator("name.lastName", new > > Required()); > > > > > > > > > > > > > > > Set toyRules =3D3D new HashSet(); > > > > > > toyRules.add(new Required()); > > > > > > toyRules.add(new MaxLength(255)); > > > > > > builder.setPropertyValidator("favoriteToy", toyRules)= ; > > > > > > > > > > > > Keith > > > > > > > > > > sam > > > > > http://www.magpiebrain.com/ > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free > > > > > Linux tutorial presented by Daniel Robbins, President and CEO > of > > > > > GenToo technologies. Learn everything from fundamentals to > > > > > system > > > > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > > > > > _______________________________________________ > > > > > Springframework-developer mailing list > > > > > Spr...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > > > > tutorial presented by Daniel Robbins, President and CEO of GenToo > > > > technologies. Learn everything from fundamentals to system > > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&= op=3Dcl > > > > ick > > > > _______________________________________________ > > > > Springframework-developer mailing list > > > > Spr...@li... > > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > > > > tutorial presented by Daniel Robbins, President and CEO of GenToo > > > > technologies. Learn everything from fundamentals to system > > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&= op=3Dcl > > > > ick > > > > _______________________________________________ > > > > Springframework-developer mailing list > > > > Spr...@li... > > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President and CEO > > > of GenToo technologies. Learn everything from fundamentals to syste= m > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op= =3Dclic > > > k > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-develo= per > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3D= click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-develope= r > > > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3D= click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-develope= r > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo > technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo > technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Jonathan H. <jh...@ad...> - 2004-03-17 03:49:53
|
Nice :)
----- Original Message -----=20
From: "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>
To: <spr...@li...>;
<spr...@li...>
Sent: Tuesday, March 16, 2004 7:39 AM
Subject: [Springframework-developer] Re: [Springframework-user] JdbcTempl=
ate
update example
> Will, everyone,
>
> Our current JdbcTemplate does indeed not cover such use cases: It rathe=
r
assumes that each operation will use its own (Prepared)Statement instance.
>
> Therefore, I've added further JdbcTemplate methods that take generic
callback actions:
> - execute(StatementCallback)
> - execute(String sql, PreparedStatementCallback)
> - execute(String sql, CallableStatementCallback)
>
> Each of the callback interfaces has a single "Object
doInStatement(Statement)"-style method, allowing for any number of
operations to be performed on the passed-in statement.
>
> There also overloaded versions that take statement creators:
> - execute(PreparedStatementCreator, PreparedStatementCallback)
> - execute(CallableStatementCreator, CallableStatementCallback)
>
> I've refactored all of JdbcTemplate's existing data access methods to u=
se
those generic execute methods with inner-class callback implementations:
This has removed almost all internal code duplications that were necessar=
y
before.
>
> I believe that this is an important addition: Reusing a statement insta=
nce
for multiple executions with different parameters is a valid and quite
common use case. And cleaning the JdbcTemplate internals is a nice side
effect.
>
> Awaiting your feedback! (I haven't committed that change yet, but inten=
d
to do so before the release this weekend.)
>
> Juergen
>
>
>
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...]On Behalf Of
> Will Jaynes
> Sent: Monday, March 15, 2004 8:10 PM
> To: spr...@li...
> Subject: [Springframework-user] JdbcTemplate update example
>
>
> I'm converting some of my JDBC DAOs to Spring JdbcTempate usage. I'm
> afraid I need an example of reusing a PreparedStatement over a number o=
f
> updates. The update methods for JdbcTemplate all seem to create a
> PreparedStatement, so perhaps I can't use any of them.
>
> The old code looks something like:
>
> public void doAnUpdate(Connection conn, String[] ids) {
> ...
> ps =3D conn.prepareStatement("Update A set B =3D null where id =3D ?");
> for (int i=3D0; i<ids.length; i++)
> ps.setString(id[i]);
> ps.executeUpdate();
> }
> ...
>
> Thanks for any help,
> Will
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc=
lick
> _______________________________________________
> Springframework-user mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
|
|
From: Keith D. <kd...@cs...> - 2004-03-17 00:02:21
|
Anna, Did you recompile the attributes after you changed the property name? I know I quite often forget that step. There is a build.xml file in the = test area with a target that will do this for you. I *hope* that's what it = was, but I will take a look later. Thanks, Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Anna Chen Sent: Tuesday, March 16, 2004 5:44 PM To: spr...@li... Subject: RE: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox Keith, Thanks a lot! However, I have found another bug... The attribute name has to be the same as the class name After I change name to theName in Pet class, I got Testsuite: org.springframework.validation.BeanValidatorTestSuite Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.461 sec Testcase: testErrorsValidationWorkflow took 0.421 sec Caused an ERROR No property 'name' in class [org.springframework.validation.Pet] org.springframework.beans.FatalBeanException: No property 'name' in = class [org.springframework.validation.Pet] at org.springframework.beans.CachedIntrospectionResults.getPropertyDescripto= r(C achedIntrospectionResults.java:114) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptor(BeanWrapp= erI mpl.java:776) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImp= l.j ava:453) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrappe= rIm pl.java:386) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(B= ean WrapperImpl.java:308) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImp= l.j ava:440) at org.springframework.validation.BindException.rejectValue(BindException.ja= va: 107) at org.springframework.validation.rules.AbstractPropertyValidationRule.invok= eRe jectValue(AbstractPropertyValidationRule.java:63) at org.springframework.validation.support.ValidationResultsErrorsCollector.v= ali dationErrorOccured(ValidationResultsErrorsCollector.java:44) at org.springframework.validation.support.PropertyValidatorImpl.validateProp= ert yValue(PropertyValidatorImpl.java:98) at org.springframework.validation.support.PropertyValidatorImpl.validateCurr= ent PropertyValue(PropertyValidatorImpl.java:83) at org.springframework.validation.support.BeanInfoBeanValidator.processBeanI= nfo Validators(BeanInfoBeanValidator.java:113) at org.springframework.validation.support.BeanInfoBeanValidator.processBeanI= nfo Validators(BeanInfoBeanValidator.java:117) at org.springframework.validation.support.BeanInfoBeanValidator.validateBean= (Be anInfoBeanValidator.java:51) at org.springframework.validation.support.DefaultBeanValidationService.valid= ate (DefaultBeanValidationService.java:53) at org.springframework.validation.support.DefaultBeanValidationService.valid= ate (DefaultBeanValidationService.java:48) at org.springframework.validation.BeanValidatorTestSuite.testErrorsValidatio= nWo rkflow(BeanValidatorTestSuite.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl .java:25) at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128) at com.werken.werkz.Goal.fire(Goal.java:639) at com.werken.werkz.Goal.attain(Goal.java:575) at com.werken.werkz.Goal.attainPrecursors(Goal.java:488) at com.werken.werkz.Goal.attain(Goal.java:573) at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)= at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348) at org.apache.maven.cli.App.doMain(App.java:543) at org.apache.maven.cli.App.main(App.java:1109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl .java:25) at com.werken.forehead.Forehead.run(Forehead.java:551) at com.werken.forehead.Forehead.main(Forehead.java:581) Thanks, Anna -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf = Of Keith Donald Sent: Tuesday, March 16, 2004 2:58 PM To: spr...@li... Subject: Re: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox Anna, There is a indirect relationship between the two. The BeanValidatorBuilder instantiates PropertyValidators for a bean's properties and places them in that beans corresponding BeanInfo. The DefaultBeanValidationService then looks up those validators by querying = the BeanInfo and subsequently processes them. So there is a level of indirection there. We're basically leveraging the existing javabeans metadata classes as opposed to rolling our own cache (which simplifies things and seems = quite elegant.) More specifically, a validated bean will have the following = characteristics: 1. The BeanInfo.beanDescriptor has the property BeanValidatorConstants.VALIDATED set to "true". 2. For each validated property, it's propertyDescriptor also has the property BeanValidatorConstants.VALIDATED also set to "true". In = addition, the BeanValidatorConstants.VALIDATOR property stores a reference to the corresponding PropertyValidator, which encapsulates all the PropertyValidationRules. What the defaultBeanValidationService does is query the BeanInfo of the = bean class when it is asked to validate a bean. If the BeanDescriptor is not marked as "validateable", the service returns, doing nothing. Else it = runs over each property doing the same thing recursively down the object = graph, invoking validate() on any found PropertyValidators. One issue that likely needs to be addressed is a result of BeanInfo = caching differences between JDK 1.3 and 1.4. I know under JDK 1.4 BeanInfo instances are shared by the Introspector (caching is built in.) I = believe under JDK 1.3, however, that is not the case--new BeanInfo copies are returned on each call to the Introspector. :-( Keith ----- Original Message ----- From: "Anna Chen" <ac...@er...> To: <spr...@li...> Sent: Tuesday, March 16, 2004 3:09 PM Subject: RE: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox > Keith, > > Could you tell me the relationship between=20 > DefaultBeanValidationService and > beanValidatorBuilder? > > I could not find where beanValidatorBuilder get called. > > Thanks, > > Anna > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On=20 > Behalf Of Keith Donald > Sent: Saturday, March 13, 2004 6:44 PM > To: spr...@li... > Subject: Re: [Springframework-developer] declarative rules-based bean=20 > validator w/ attributes in sandbox > > > Anna, > > I've since been updating the unit tests of the declarative validation stuff, > so I thought I'd go ahead and attach a working sample that also exists = > in the sandbox/test/org/springframework/validation test area. As we=20 > do more testing, we'll get better samples, too. > > The sample below shows 3 bean declarations: the beanValidatorService=20 > is the > main validator interface to the subsystem, and here is using the=20 > attributesValidatorSource to load on-demand validator information for beans > using commons-attributes. The beanValidatorBuilder is an example of=20 > how to > configure validation rules for bean properties declaratively using=20 > Spring. In this example, the builder is configuring rules for the=20 > "name.lastName" and "favoriteToy" properties of the Pet bean=20 > (specifically the key in the propertyValidators map is the=20 > propertyName, and the value is a set of PropertyValidationRule=20 > instances.) > > -------------- > > <bean id=3D"beanValidationService" > class=3D"org.springframework.validation.support.DefaultBeanValidationServ= ice"> > <property name=3D"beanValidatorSource"><ref=20 > bean=3D"attributesValidatorSource"/></property> > </bean> > > <bean id=3D"attributesValidatorSource"=20 > = class=3D"org.springframework.validation.support.AttributesValidatorSourc > e"/> > > <bean id=3D"beanValidatorBuilder"=20 > class=3D"org.springframework.validation.support.BeanValidatorBuilder"> > <constructor-arg index=3D"0"> > <description>The validated bean type</description> > <value>org.springframework.validation.Pet</value> > </constructor-arg> > <property name=3D"propertyValidators"> > <map> > <entry key=3D"name.lastName"> > <bean = class=3D"org.springframework.validation.rules.Required"/> > </entry> > <entry key=3D"favoriteToy"> > <set> > <bean = class=3D"org.springframework.validation.rules.Required"/> > <bean = class=3D"org.springframework.validation.rules.MaxLength"> > <constructor-arg index=3D"0"><value>25</value></constructor-arg> > </bean> > </set> > </entry> > </map> > </property> > </bean> > > Keith > > ----- Original Message ----- > From: "Keith Donald" <kd...@cs...> > To: <spr...@li...> > Sent: Thursday, March 11, 2004 12:19 AM > Subject: Re: [Springframework-developer] declarative rules-based bean=20 > validator w/ attributes in sandbox > > > > Anna, > > > > Thanks... yea, I typed that by hand in the email from memory and I=20 > > see I made at least one mistake with a closing tag in the first bean > declaration. > > :-) I'll be sure to correct anything like that when we get some > samples/docs > > out. > > > > BTW, guys thanks for those commons attributes tips. I haven't had=20 > > time to > > go through their docs in detail and I really appreciate it. I agree = > > we should keep the validation rule hierarchy as is. > > > > Keith > > > > ----- Original Message ----- > > From: "Anna Chen" <ac...@er...> > > To: <spr...@li...> > > Sent: Wednesday, March 10, 2004 4:04 PM > > Subject: RE: [Springframework-developer] declarative rules-based=20 > > bean validator w/ attributes in sandbox > > > > > > > Keith > > > > > > I don't think that the Spring IoC configuration is a valid one according > > to > > > http://www.springframework.org/dtd/spring-beans.dtd > > > > > > > > > Anna > > > > > > -----Original Message----- > > > From: spr...@li... > > > [mailto:spr...@li...]On Behalf > > > Of Keith Donald > > > Sent: Wednesday, March 10, 2004 8:10 AM > > > To: spr...@li... > > > Subject: Re: [Springframework-developer] declarative rules-based=20 > > > bean validator w/ attributes in sandbox > > > > > > > > > Correct me if I'm wrong, but I don't think there is. However, I=20 > > > know if > > > you're using Eclipse, the sandbox code (including tests)=20 > > > automatically > > gets > > > incrementally compiled in target/other-classes, which is=20 > > > automatically > put > > > in the classpath. So I have been basically running everything in=20 > > > the sandbox from Eclipse directly. > > > > > > Keith > > > > > > ----- Original Message ----- > > > From: <sam...@ma...> > > > To: <spr...@li...> > > > Sent: Wednesday, March 10, 2004 6:42 AM > > > Subject: RE: [Springframework-developer] declarative rules-based=20 > > > bean validator w/ attributes in sandbox > > > > > > > > > > Excellent, thanks Keith. On the subject of the sandbox, is there = > > > > a > build > > > > directive to buils the sandbox code, or should I just overwrite=20 > > > > the > src > > > with the > > > > sandbox code and rebuild? > > > > > > > > sam > > > > > > > > Quoting Keith Donald <kd...@cs...>: > > > > > > > > > I checked in a "BeanValidatorBuilder" class in the sandbox=20 > > > > > under validation.support that allows you to declaratively=20 > > > > > assign PropertyValidationRules to bean properties via=20 > > > > > Spring-IoC, through a > > > > > scripting environment such as Groovy/Beanshell, or=20 > > > > > programatically > in > > =3D > > > > > plain > > > > > java. This is in addition to support for defining validation rules > on > > =3D > > > > > beans > > > > > via source markup. > > > > > > > > > > Here's an example on how to use it: > > > > > > > > > > Spring IoC configuration > > > > > > > > > > <bean id=3D3D"validatorBuilder" > > > > > class=3D3D"org.springframework.validation.support.ValidatorBuilder"/> > > > > > <constructor-arg index=3D3D"0"> > > > > > <description>The validated bean type (class or > > > > > interface) aka 'root entity'</description>=20 > > > > > <value>org.springframework.validation.Pet</value> > > > > > </constructor-arg> > > > > > <map> > > > > > <description> > > > > > A map of property name keys to one or more > > > > > governing property validation rules. > > > > > Nested bean property names from the 'root > > > > > entity' are supported. > > > > > Rule instances may be reused across > > > > > properties if desired. > > > > > </description> > > > > > <entry key=3D3D"name.lastName"> > > > > > <value><bean=20 > > > > > = class=3D3D"org.springframework.validation.rules.Required"/></val > > > > > ue> > > > > > </entry> > > > > > <entry key=3D3D"favoriteToy"> > > > > > <value> > > > > > <set> > > > > > <bean > > > > > class=3D3D"org.springframework.validation.rules.Required"/> > > > > > <bean > > > > > class=3D3D"org.springframework.validation.rules.MaxLength"> > > > > > =3D09 > > > > > <constructor-arg>25</constructor-arg> > > > > > > > > > > </bean> > > > > > </set> > > > > > </value> > > > > > </entry> > > > > > </map> > > > > > </bean> > > > > > > > > > > Java > > > > > > > > > > BeanValidatorBuilder builder =3D3D new =3D=20 > > > > > BeanValidatorBuilder(Pet.class); > > > > > > > > > > builder.setPropertyValidator("name.lastName", new > Required()); > > > > > > > > > > > > Set toyRules =3D3D new HashSet(); > > > > > toyRules.add(new Required()); > > > > > toyRules.add(new MaxLength(255)); > > > > > builder.setPropertyValidator("favoriteToy", toyRules); > > > > > > > > > > Keith > > > > > > > > sam > > > > http://www.magpiebrain.com/ > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > > > > Linux tutorial presented by Daniel Robbins, President and CEO of > > > > GenToo technologies. Learn everything from fundamentals to=20 > > > > system > > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > > _______________________________________________ > > > > Springframework-developer mailing list=20 > > > > Spr...@li... > > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system=20 > > > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcl > > > ick > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > = https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system=20 > > > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcl > > > ick > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > = https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO=20 > > of GenToo technologies. Learn everything from fundamentals to system = > > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= c > > k > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > = https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of=20 > GenToo technologies. Learn everything from fundamentals to system=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of=20 > GenToo technologies. Learn everything from fundamentals to system=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of = GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of = GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Cameron B. <ca...@da...> - 2004-03-16 23:35:49
|
I had a copy and paste error on the test????-context.xml files
I ff anyone is reading.. Just remove the bean names for these values :
<value>authenticationService</value>
<value>authorizationService</value>
The behaviour isn't modified by this change.
I checked my context for circular refrences, and there don't appear to =
be
any.
I don't know why the dataSource failed to be constructed when it doesn't
repend on the txInterceptor.
Then exception that I am receiving is :
org.springframework.beans.factory.BeanCreationException: Error creating =
bean
with name 'sessionFactory' defined in classpath resource
[testExtraDummy-context.xml]: Can't resolve reference to bean =
'dataSource'
while setting property 'dataSource'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating =
bean
with name 'dataSource' defined in classpath resource
[testExtraDummy-context.xml]: Initialization method of bean failed; =
nested
exception is org.springframework.beans.factory.BeanCreationException: =
Error
creating bean with name 'txInterceptor' defined in classpath resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'transactionManager' while setting property 'transactionManager'; nested
exception is org.springframework.beans.factory.BeanCreationException: =
Error
creating bean with name 'transactionManager' defined in classpath =
resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'sessionFactory' while setting property 'sessionFactory'; nested =
exception
is =
org.springframework.beans.factory.FactoryBeanCircularReferenceException:
Factory bean 'sessionFactory' returned null object - possible cause: not
fully initialized due to circular bean reference
org.springframework.beans.factory.BeanCreationException: Error creating =
bean
with name 'dataSource' defined in classpath resource
[testExtraDummy-context.xml]: Initialization method of bean failed; =
nested
exception is org.springframework.beans.factory.BeanCreationException: =
Error
creating bean with name 'txInterceptor' defined in classpath resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'transactionManager' while setting property 'transactionManager'; nested
exception is org.springframework.beans.factory.BeanCreationException: =
Error
creating bean with name 'transactionManager' defined in classpath =
resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'sessionFactory' while setting property 'sessionFactory'; nested =
exception
is =
org.springframework.beans.factory.FactoryBeanCircularReferenceException:
Factory bean 'sessionFactory' returned null object - possible cause: not
fully initialized due to circular bean reference
org.springframework.beans.factory.BeanCreationException: Error creating =
bean
with name 'txInterceptor' defined in classpath resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'transactionManager' while setting property 'transactionManager'; nested
exception is org.springframework.beans.factory.BeanCreationException: =
Error
creating bean with name 'transactionManager' defined in classpath =
resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'sessionFactory' while setting property 'sessionFactory'; nested =
exception
is =
org.springframework.beans.factory.FactoryBeanCircularReferenceException:
Factory bean 'sessionFactory' returned null object - possible cause: not
fully initialized due to circular bean reference
org.springframework.beans.factory.BeanCreationException: Error creating =
bean
with name 'transactionManager' defined in classpath resource
[testExtraDummy-context.xml]: Can't resolve reference to bean
'sessionFactory' while setting property 'sessionFactory'; nested =
exception
is =
org.springframework.beans.factory.FactoryBeanCircularReferenceException:
Factory bean 'sessionFactory' returned null object - possible cause: not
fully initialized due to circular bean reference
org.springframework.beans.factory.FactoryBeanCircularReferenceException:
Factory bean 'sessionFactory' returned null object - possible cause: not
fully initialized due to circular bean reference
at
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFo=
rSh
aredInstance(AbstractBeanFactory.java:465)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs=
tra
ctBeanFactory.java:126)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.resolveReference(AbstractAutowireCapableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:579)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:523)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.populateBean(AbstractAutowireCapableBeanFactory.java:377)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.createBean(AbstractAutowireCapableBeanFactory.java:150)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs=
tra
ctBeanFactory.java:148)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.resolveReference(AbstractAutowireCapableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:579)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:523)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.populateBean(AbstractAutowireCapableBeanFactory.java:377)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.createBean(AbstractAutowireCapableBeanFactory.java:150)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs=
tra
ctBeanFactory.java:148)
at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.reso=
lve
InterceptorNames(AbstractAutoProxyCreator.java:240)
at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.post=
Pro
cessAfterInitialization(AbstractAutoProxyCreator.java:188)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFa=
cto
ry.java:111)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.createBean(AbstractAutowireCapableBeanFactory.java:172)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs=
tra
ctBeanFactory.java:148)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.resolveReference(AbstractAutowireCapableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:579)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:523)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.populateBean(AbstractAutowireCapableBeanFactory.java:377)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.createBean(AbstractAutowireCapableBeanFactory.java:150)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs=
tra
ctBeanFactory.java:148)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getB=
ean
sOfType(DefaultListableBeanFactory.java:116)
at
org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAn=
ces
tors(BeanFactoryUtils.java:98)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.find=
Mat
chingBeans(DefaultListableBeanFactory.java:225)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.autowireByType(AbstractAutowireCapableBeanFactory.java:428)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.populateBean(AbstractAutowireCapableBeanFactory.java:370)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact=
ory
.createBean(AbstractAutowireCapableBeanFactory.java:150)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abs=
tra
ctBeanFactory.java:148)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preI=
nst
antiateSingletons(DefaultListableBeanFactory.java:159)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Ab=
str
actApplicationContext.java:270)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init=
>(F
ileSystemXmlApplicationContext.java:32)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>=
(Cl
assPathXmlApplicationContext.java:31)
at DummyTest.testExtraDummy(DummyTest.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes=
tRu
nner.java:410)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn=
er.
java:294)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRun=
ner
.java:182)
=20
> -----Original Message-----
> From: spr...@li...=20
> [mailto:spr...@li...]
> On Behalf Of Ross Mason
> Sent: Wednesday, 17 March 2004 8:39 AM
> To: spr...@li...
> Subject: Re: [Springframework-developer] Container Bean threshold?
>=20
> Hi Cameron,
>=20
> What exception are you getting? We were getting a circular=20
> reference exception... FWIW We found that we did have a=20
> circular reference in our applicationContext but Spring=20
> didn't complain about it until we had had reached a certain=20
> bean threshold. Once we removed the CR the problem never=20
> occurred again.
>=20
> Cheers,
>=20
> Ross
>=20
> Cameron Braid wrote:
> > I have run into a similar problem - a very strange one at that.
> >=20
> > It is somehow linked to the
> >=20
> org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator=20
> > and the=20
> >=20
> org.springframework.transaction.interceptor.TransactionInterce
> ptor and the number of beans in the context.
> >=20
> > Though for me, it wasn't anything like 96 !
> >=20
> > I have attached a dummy test with supporting dummy=20
> hibernate classes=20
> > and mapping.
> >=20
> > All you should need is the hibernate and spring dependencies to run=20
> > this test.
> >=20
> > There are 3 test methods.
> >=20
> > testDummy which passes
> >=20
> > testExtraDummy which fails=20
> > - all it does is add an extra dummy service bean to the=20
> end of the=20
> > context
> >=20
> > testEvenMoreDummiesWithoutAutoProxyCreator which passes
> > - it removed the auto proxy creator and adds some more dummies to=20
> > the end
> >=20
> > I am not sure what conclusion you can draw from this test.. But it=20
> > seems like incorrect behaviour to me.
> >=20
> > And - it is stopping one of my applications from working.
> >=20
> > Thanks
> >=20
> > Cameron
> >=20
> >=20
> >>-----Original Message-----
> >>From: spr...@li...
> >>[mailto:spr...@li...]
> >> On Behalf Of j=FCrgen h=F6ller [werk3AT]
> >>Sent: Saturday, 7 February 2004 3:41 AM
> >>To: spr...@li...
> >>Subject: RE: [Springframework-developer] Container Bean threshold?
> >>
> >>Ross,
> >>
> >>Any news on this front? I can't find anything that could cause such=20
> >>behavior. A stacktrace would be helpful, I guess :-)
> >>
> >>Juergen
> >>
> >>
> >>-----Original Message-----
> >>From: spr...@li...
> >>[mailto:spr...@li...]
> >>On Behalf Of Ross Mason
> >>Sent: Wednesday, February 04, 2004 3:44 AM
> >>To: spr...@li...
> >>Subject: [Springframework-developer] Container Bean threshold?
> >>
> >>
> >>Hi guys,
> >>
> >>I've just found some interesting behaviour in the spring=20
> container. =20
> >>If we have 96 beans in the container everything works fine,=20
> but if we=20
> >>add one more bean, say bean97, the container complains that=20
> there may=20
> >>be a circular reference even though I'm sure there isn't. But if we=20
> >>remove a different (and totally unrelated) bean and add our bean97=20
> >>bean it works fine. It seems the container has a bean threshold of=20
> >>96?!
> >>
> >>Basically, we cannot add any than 96 beans to the container.
> >>
> >>Have you seen this behaviour before?
> >>
> >>--
> >>Cheers,
> >>
> >>Ross
> >>http://blog.rossmason.com
> >>
> >>
> >>
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>The SF.Net email is sponsored by EclipseCon 2004 Premiere=20
> Conference=20
> >>on Open Tools Development and Integration See the breadth=20
> of Eclipse=20
> >>activity. February 3-5 in Anaheim, CA.
> >>http://www.eclipsecon.org/osdn
> >>_______________________________________________
> >>Springframework-developer mailing list=20
> >>Spr...@li...
> >>https://lists.sourceforge.net/lists/listinfo/springframework
> -developer
> >>
> >>
> >>-------------------------------------------------------
> >>The SF.Net email is sponsored by EclipseCon 2004 Premiere=20
> Conference=20
> >>on Open Tools Development and Integration See the breadth=20
> of Eclipse=20
> >>activity. February 3-5 in Anaheim, CA.
> >>http://www.eclipsecon.org/osdn
> >>_______________________________________________
> >>Springframework-developer mailing list=20
> >>Spr...@li...
> >>https://lists.sourceforge.net/lists/listinfo/springframework
> -developer
> >=20
> >=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials Free=20
> Linux tutorial presented by Daniel Robbins, President and CEO=20
> of GenToo technologies. Learn everything from fundamentals to=20
> system =
administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>=20
>=20
|
|
From: Cameron B. <ca...@da...> - 2004-03-16 23:27:11
|
Ross, Yeah, I am receiving a Circular Refrence exception. The code that I had attached to the previos post contains everything = needed to see what is happening (except the jars for = spring/hibernate/hsqldb/junit) I will have a closer look to see if I actually DO have a CR. Thanks Cameron=20 > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of Ross Mason > Sent: Wednesday, 17 March 2004 8:39 AM > To: spr...@li... > Subject: Re: [Springframework-developer] Container Bean threshold? >=20 > Hi Cameron, >=20 > What exception are you getting? We were getting a circular=20 > reference exception... FWIW We found that we did have a=20 > circular reference in our applicationContext but Spring=20 > didn't complain about it until we had had reached a certain=20 > bean threshold. Once we removed the CR the problem never=20 > occurred again. >=20 > Cheers, >=20 > Ross >=20 > Cameron Braid wrote: > > I have run into a similar problem - a very strange one at that. > >=20 > > It is somehow linked to the > >=20 > org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator=20 > > and the=20 > >=20 > org.springframework.transaction.interceptor.TransactionInterce > ptor and the number of beans in the context. > >=20 > > Though for me, it wasn't anything like 96 ! > >=20 > > I have attached a dummy test with supporting dummy=20 > hibernate classes=20 > > and mapping. > >=20 > > All you should need is the hibernate and spring dependencies to run=20 > > this test. > >=20 > > There are 3 test methods. > >=20 > > testDummy which passes > >=20 > > testExtraDummy which fails=20 > > - all it does is add an extra dummy service bean to the=20 > end of the=20 > > context > >=20 > > testEvenMoreDummiesWithoutAutoProxyCreator which passes > > - it removed the auto proxy creator and adds some more dummies to=20 > > the end > >=20 > > I am not sure what conclusion you can draw from this test.. But it=20 > > seems like incorrect behaviour to me. > >=20 > > And - it is stopping one of my applications from working. > >=20 > > Thanks > >=20 > > Cameron > >=20 > >=20 > >>-----Original Message----- > >>From: spr...@li... > >>[mailto:spr...@li...] > >> On Behalf Of j=FCrgen h=F6ller [werk3AT] > >>Sent: Saturday, 7 February 2004 3:41 AM > >>To: spr...@li... > >>Subject: RE: [Springframework-developer] Container Bean threshold? > >> > >>Ross, > >> > >>Any news on this front? I can't find anything that could cause such=20 > >>behavior. A stacktrace would be helpful, I guess :-) > >> > >>Juergen > >> > >> > >>-----Original Message----- > >>From: spr...@li... > >>[mailto:spr...@li...] > >>On Behalf Of Ross Mason > >>Sent: Wednesday, February 04, 2004 3:44 AM > >>To: spr...@li... > >>Subject: [Springframework-developer] Container Bean threshold? > >> > >> > >>Hi guys, > >> > >>I've just found some interesting behaviour in the spring=20 > container. =20 > >>If we have 96 beans in the container everything works fine,=20 > but if we=20 > >>add one more bean, say bean97, the container complains that=20 > there may=20 > >>be a circular reference even though I'm sure there isn't. But if we=20 > >>remove a different (and totally unrelated) bean and add our bean97=20 > >>bean it works fine. It seems the container has a bean threshold of=20 > >>96?! > >> > >>Basically, we cannot add any than 96 beans to the container. > >> > >>Have you seen this behaviour before? > >> > >>-- > >>Cheers, > >> > >>Ross > >>http://blog.rossmason.com > >> > >> > >> > >> > >> > >> > >>------------------------------------------------------- > >>The SF.Net email is sponsored by EclipseCon 2004 Premiere=20 > Conference=20 > >>on Open Tools Development and Integration See the breadth=20 > of Eclipse=20 > >>activity. February 3-5 in Anaheim, CA. > >>http://www.eclipsecon.org/osdn > >>_______________________________________________ > >>Springframework-developer mailing list=20 > >>Spr...@li... > >>https://lists.sourceforge.net/lists/listinfo/springframework > -developer > >> > >> > >>------------------------------------------------------- > >>The SF.Net email is sponsored by EclipseCon 2004 Premiere=20 > Conference=20 > >>on Open Tools Development and Integration See the breadth=20 > of Eclipse=20 > >>activity. February 3-5 in Anaheim, CA. > >>http://www.eclipsecon.org/osdn > >>_______________________________________________ > >>Springframework-developer mailing list=20 > >>Spr...@li... > >>https://lists.sourceforge.net/lists/listinfo/springframework > -developer > >=20 > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > Linux tutorial presented by Daniel Robbins, President and CEO=20 > of GenToo technologies. Learn everything from fundamentals to=20 > system = administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |
|
From: Anna C. <ac...@er...> - 2004-03-16 22:43:52
|
Keith, Thanks a lot! However, I have found another bug... The attribute name has to be the same as the class name After I change name to theName in Pet class, I got Testsuite: org.springframework.validation.BeanValidatorTestSuite Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.461 sec Testcase: testErrorsValidationWorkflow took 0.421 sec Caused an ERROR No property 'name' in class [org.springframework.validation.Pet] org.springframework.beans.FatalBeanException: No property 'name' in class [org.springframework.validation.Pet] at org.springframework.beans.CachedIntrospectionResults.getPropertyDescriptor(C achedIntrospectionResults.java:114) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptor(BeanWrapperI mpl.java:776) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.j ava:453) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperIm pl.java:386) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(Bean WrapperImpl.java:308) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.j ava:440) at org.springframework.validation.BindException.rejectValue(BindException.java: 107) at org.springframework.validation.rules.AbstractPropertyValidationRule.invokeRe jectValue(AbstractPropertyValidationRule.java:63) at org.springframework.validation.support.ValidationResultsErrorsCollector.vali dationErrorOccured(ValidationResultsErrorsCollector.java:44) at org.springframework.validation.support.PropertyValidatorImpl.validatePropert yValue(PropertyValidatorImpl.java:98) at org.springframework.validation.support.PropertyValidatorImpl.validateCurrent PropertyValue(PropertyValidatorImpl.java:83) at org.springframework.validation.support.BeanInfoBeanValidator.processBeanInfo Validators(BeanInfoBeanValidator.java:113) at org.springframework.validation.support.BeanInfoBeanValidator.processBeanInfo Validators(BeanInfoBeanValidator.java:117) at org.springframework.validation.support.BeanInfoBeanValidator.validateBean(Be anInfoBeanValidator.java:51) at org.springframework.validation.support.DefaultBeanValidationService.validate (DefaultBeanValidationService.java:53) at org.springframework.validation.support.DefaultBeanValidationService.validate (DefaultBeanValidationService.java:48) at org.springframework.validation.BeanValidatorTestSuite.testErrorsValidationWo rkflow(BeanValidatorTestSuite.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128) at com.werken.werkz.Goal.fire(Goal.java:639) at com.werken.werkz.Goal.attain(Goal.java:575) at com.werken.werkz.Goal.attainPrecursors(Goal.java:488) at com.werken.werkz.Goal.attain(Goal.java:573) at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448) at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348) at org.apache.maven.cli.App.doMain(App.java:543) at org.apache.maven.cli.App.main(App.java:1109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at com.werken.forehead.Forehead.run(Forehead.java:551) at com.werken.forehead.Forehead.main(Forehead.java:581) Thanks, Anna -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Keith Donald Sent: Tuesday, March 16, 2004 2:58 PM To: spr...@li... Subject: Re: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox Anna, There is a indirect relationship between the two. The BeanValidatorBuilder instantiates PropertyValidators for a bean's properties and places them in that beans corresponding BeanInfo. The DefaultBeanValidationService then looks up those validators by querying the BeanInfo and subsequently processes them. So there is a level of indirection there. We're basically leveraging the existing javabeans metadata classes as opposed to rolling our own cache (which simplifies things and seems quite elegant.) More specifically, a validated bean will have the following characteristics: 1. The BeanInfo.beanDescriptor has the property BeanValidatorConstants.VALIDATED set to "true". 2. For each validated property, it's propertyDescriptor also has the property BeanValidatorConstants.VALIDATED also set to "true". In addition, the BeanValidatorConstants.VALIDATOR property stores a reference to the corresponding PropertyValidator, which encapsulates all the PropertyValidationRules. What the defaultBeanValidationService does is query the BeanInfo of the bean class when it is asked to validate a bean. If the BeanDescriptor is not marked as "validateable", the service returns, doing nothing. Else it runs over each property doing the same thing recursively down the object graph, invoking validate() on any found PropertyValidators. One issue that likely needs to be addressed is a result of BeanInfo caching differences between JDK 1.3 and 1.4. I know under JDK 1.4 BeanInfo instances are shared by the Introspector (caching is built in.) I believe under JDK 1.3, however, that is not the case--new BeanInfo copies are returned on each call to the Introspector. :-( Keith ----- Original Message ----- From: "Anna Chen" <ac...@er...> To: <spr...@li...> Sent: Tuesday, March 16, 2004 3:09 PM Subject: RE: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox > Keith, > > Could you tell me the relationship between DefaultBeanValidationService and > beanValidatorBuilder? > > I could not find where beanValidatorBuilder get called. > > Thanks, > > Anna > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Keith Donald > Sent: Saturday, March 13, 2004 6:44 PM > To: spr...@li... > Subject: Re: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > Anna, > > I've since been updating the unit tests of the declarative validation stuff, > so I thought I'd go ahead and attach a working sample that also exists in > the sandbox/test/org/springframework/validation test area. As we do more > testing, we'll get better samples, too. > > The sample below shows 3 bean declarations: the beanValidatorService is the > main validator interface to the subsystem, and here is using the > attributesValidatorSource to load on-demand validator information for beans > using commons-attributes. The beanValidatorBuilder is an example of how to > configure validation rules for bean properties declaratively using Spring. > In this example, the builder is configuring rules for the "name.lastName" > and "favoriteToy" properties of the Pet bean (specifically the key in the > propertyValidators map is the propertyName, and the value is a set of > PropertyValidationRule instances.) > > -------------- > > <bean id="beanValidationService" > class="org.springframework.validation.support.DefaultBeanValidationService"> > <property name="beanValidatorSource"><ref > bean="attributesValidatorSource"/></property> > </bean> > > <bean id="attributesValidatorSource" > class="org.springframework.validation.support.AttributesValidatorSource"/> > > <bean id="beanValidatorBuilder" > class="org.springframework.validation.support.BeanValidatorBuilder"> > <constructor-arg index="0"> > <description>The validated bean type</description> > <value>org.springframework.validation.Pet</value> > </constructor-arg> > <property name="propertyValidators"> > <map> > <entry key="name.lastName"> > <bean class="org.springframework.validation.rules.Required"/> > </entry> > <entry key="favoriteToy"> > <set> > <bean class="org.springframework.validation.rules.Required"/> > <bean class="org.springframework.validation.rules.MaxLength"> > <constructor-arg index="0"><value>25</value></constructor-arg> > </bean> > </set> > </entry> > </map> > </property> > </bean> > > Keith > > ----- Original Message ----- > From: "Keith Donald" <kd...@cs...> > To: <spr...@li...> > Sent: Thursday, March 11, 2004 12:19 AM > Subject: Re: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > > Anna, > > > > Thanks... yea, I typed that by hand in the email from memory and I see I > > made at least one mistake with a closing tag in the first bean > declaration. > > :-) I'll be sure to correct anything like that when we get some > samples/docs > > out. > > > > BTW, guys thanks for those commons attributes tips. I haven't had time to > > go through their docs in detail and I really appreciate it. I agree we > > should keep the validation rule hierarchy as is. > > > > Keith > > > > ----- Original Message ----- > > From: "Anna Chen" <ac...@er...> > > To: <spr...@li...> > > Sent: Wednesday, March 10, 2004 4:04 PM > > Subject: RE: [Springframework-developer] declarative rules-based bean > > validator w/ attributes in sandbox > > > > > > > Keith > > > > > > I don't think that the Spring IoC configuration is a valid one according > > to > > > http://www.springframework.org/dtd/spring-beans.dtd > > > > > > > > > Anna > > > > > > -----Original Message----- > > > From: spr...@li... > > > [mailto:spr...@li...]On Behalf > > > Of Keith Donald > > > Sent: Wednesday, March 10, 2004 8:10 AM > > > To: spr...@li... > > > Subject: Re: [Springframework-developer] declarative rules-based bean > > > validator w/ attributes in sandbox > > > > > > > > > Correct me if I'm wrong, but I don't think there is. However, I know if > > > you're using Eclipse, the sandbox code (including tests) automatically > > gets > > > incrementally compiled in target/other-classes, which is automatically > put > > > in the classpath. So I have been basically running everything in the > > > sandbox from Eclipse directly. > > > > > > Keith > > > > > > ----- Original Message ----- > > > From: <sam...@ma...> > > > To: <spr...@li...> > > > Sent: Wednesday, March 10, 2004 6:42 AM > > > Subject: RE: [Springframework-developer] declarative rules-based bean > > > validator w/ attributes in sandbox > > > > > > > > > > Excellent, thanks Keith. On the subject of the sandbox, is there a > build > > > > directive to buils the sandbox code, or should I just overwrite the > src > > > with the > > > > sandbox code and rebuild? > > > > > > > > sam > > > > > > > > Quoting Keith Donald <kd...@cs...>: > > > > > > > > > I checked in a "BeanValidatorBuilder" class in the sandbox under > > > > > validation.support that allows you to declaratively assign > > > > > PropertyValidationRules to bean properties via Spring-IoC, through a > > > > > scripting environment such as Groovy/Beanshell, or programatically > in > > = > > > > > plain > > > > > java. This is in addition to support for defining validation rules > on > > = > > > > > beans > > > > > via source markup. > > > > > > > > > > Here's an example on how to use it: > > > > > > > > > > Spring IoC configuration > > > > > > > > > > <bean id=3D"validatorBuilder" > > > > > class=3D"org.springframework.validation.support.ValidatorBuilder"/> > > > > > <constructor-arg index=3D"0"> > > > > > <description>The validated bean type (class or > > > > > interface) aka 'root entity'</description> > > > > > <value>org.springframework.validation.Pet</value> > > > > > </constructor-arg> > > > > > <map> > > > > > <description> > > > > > A map of property name keys to one or more > > > > > governing property validation rules. > > > > > Nested bean property names from the 'root > > > > > entity' are supported. > > > > > Rule instances may be reused across > > > > > properties if desired. > > > > > </description> > > > > > <entry key=3D"name.lastName"> > > > > > <value><bean > > > > > class=3D"org.springframework.validation.rules.Required"/></value> > > > > > </entry> > > > > > <entry key=3D"favoriteToy"> > > > > > <value> > > > > > <set> > > > > > <bean > > > > > class=3D"org.springframework.validation.rules.Required"/> > > > > > <bean > > > > > class=3D"org.springframework.validation.rules.MaxLength"> > > > > > =09 > > > > > <constructor-arg>25</constructor-arg> > > > > > > > > > > </bean> > > > > > </set> > > > > > </value> > > > > > </entry> > > > > > </map> > > > > > </bean> > > > > > > > > > > Java > > > > > > > > > > BeanValidatorBuilder builder =3D new = > > > > > BeanValidatorBuilder(Pet.class); > > > > > > > > > > builder.setPropertyValidator("name.lastName", new > Required()); > > > > > > > > > > > > Set toyRules =3D new HashSet(); > > > > > toyRules.add(new Required()); > > > > > toyRules.add(new MaxLength(255)); > > > > > builder.setPropertyValidator("favoriteToy", toyRules); > > > > > > > > > > Keith > > > > > > > > sam > > > > http://www.magpiebrain.com/ > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > > > GenToo technologies. Learn everything from fundamentals to system > > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > > > _______________________________________________ > > > > Springframework-developer mailing list > > > > Spr...@li... > > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > > GenToo technologies. Learn everything from fundamentals to system > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > > GenToo technologies. Learn everything from fundamentals to system > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Ross M. <ro...@at...> - 2004-03-16 22:38:56
|
Hi Cameron, What exception are you getting? We were getting a circular reference=20 exception... FWIW We found that we did have a circular reference in our=20 applicationContext but Spring didn't complain about it until we had had=20 reached a certain bean threshold. Once we removed the CR the problem=20 never occurred again. Cheers, Ross Cameron Braid wrote: > I have run into a similar problem - a very strange one at that. >=20 > It is somehow linked to the > org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator an= d the > org.springframework.transaction.interceptor.TransactionInterceptor and = the > number of beans in the context. >=20 > Though for me, it wasn't anything like 96 ! >=20 > I have attached a dummy test with supporting dummy hibernate classes an= d > mapping. >=20 > All you should need is the hibernate and spring dependencies to run thi= s > test. >=20 > There are 3 test methods. >=20 > testDummy which passes >=20 > testExtraDummy which fails=20 > - all it does is add an extra dummy service bean to the end of the co= ntext >=20 > testEvenMoreDummiesWithoutAutoProxyCreator which passes > - it removed the auto proxy creator and adds some more dummies to the= end >=20 > I am not sure what conclusion you can draw from this test.. But it seem= s > like incorrect behaviour to me. >=20 > And - it is stopping one of my applications from working. >=20 > Thanks >=20 > Cameron >=20 >=20 >>-----Original Message----- >>From: spr...@li...=20 >>[mailto:spr...@li...] >> On Behalf Of j=FCrgen h=F6ller [werk3AT] >>Sent: Saturday, 7 February 2004 3:41 AM >>To: spr...@li... >>Subject: RE: [Springframework-developer] Container Bean threshold? >> >>Ross, >> >>Any news on this front? I can't find anything that could=20 >>cause such behavior. A stacktrace would be helpful, I guess :-) >> >>Juergen >> >> >>-----Original Message----- >>From: spr...@li... >>[mailto:spr...@li...] >>On Behalf Of Ross Mason >>Sent: Wednesday, February 04, 2004 3:44 AM >>To: spr...@li... >>Subject: [Springframework-developer] Container Bean threshold? >> >> >>Hi guys, >> >>I've just found some interesting behaviour in the spring=20 >>container. If we have 96 beans in the container everything=20 >>works fine, but if we add one more bean, say bean97, the=20 >>container complains that there may be a circular reference=20 >>even though I'm sure there isn't. But if we remove a=20 >>different (and totally unrelated) bean and add our bean97=20 >>bean it works fine. It seems the container has a bean=20 >>threshold of 96?! >> >>Basically, we cannot add any than 96 beans to the container. >> >>Have you seen this behaviour before? >> >>-- >>Cheers, >> >>Ross >>http://blog.rossmason.com >> >> >> >> >> >> >>------------------------------------------------------- >>The SF.Net email is sponsored by EclipseCon 2004 Premiere=20 >>Conference on Open Tools Development and Integration See the=20 >>breadth of Eclipse activity. February 3-5 in Anaheim, CA. >>http://www.eclipsecon.org/osdn >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >>------------------------------------------------------- >>The SF.Net email is sponsored by EclipseCon 2004 Premiere=20 >>Conference on Open Tools Development and Integration See the=20 >>breadth of Eclipse activity. February 3-5 in Anaheim, CA. >>http://www.eclipsecon.org/osdn >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |
|
From: <jue...@we...> - 2004-03-16 22:02:20
|
BTW, a further benefit of the "execute(StatementCallback)", =
"execute(PreparedStatementCallback)" and =
"execute(CallableStatementCallback)" methods is that they are modelled =
analogously to our Hibernate and JDO support, i.e. they are analogous to =
the "HibernateTemplate.execute(HibernateCallback)" and =
"JdoTemplate.execute(JdoCallback)" methods in that they provide a =
generic callback for implementing any kind of operation within a =
passed-in resource.
=20
As a side note, JdbcTemplate is now about 40 lines *shorter* than =
before, despite the introduction of the 5 new "execute" methods - due to =
the internal refactorings that the new methods allow for.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von j=FCrgen h=F6ller [werk3AT]
Gesendet: Di 16.03.2004 20:56
An: spr...@li...
Betreff: Re: [Springframework-developer] JdbcTemplate update example
Thomas,
Do you mind dropping the "update(PreparedStatementCreator[])" method? It =
just seems so arbitrary: We'd need to provide "update" methods with =
multiple SQL statements etc then too, for consistency's sake... And I =
assume you don't mind renaming the "doWithResultSetFromXxx" methods to =
"query"?
Juergen
________________________________
Von: spr...@li... im Auftrag =
von j=FCrgen h=F6ller [werk3AT]
Gesendet: Di 16.03.2004 15:55
An: spr...@li...
Betreff: [Springframework-developer] Re: [Springframework-user] =
JdbcTemplate update example
In the course of this change, I suggest two further minor changes:
- The "doWithResultSetFromXxx" methods should really be named "query", =
just with overloaded ResultSetExtractor arguments. There is no strong =
difference to the other "query" methods that take all sorts of argument =
combinations (particularly since the introduction of "queryForList" =
etc). I don't think that this renaming will cause hassle, as I suspect =
that hardly anyone uses those methods anyway.
- I don't think that the "update" method that takes a =
PreparedStatementCreator array is very helpful: It doesn't use batching =
or reuse Statement instances but just executes the created =
PreparedStatements one-by-one. I suggest to remove that overloaded =
method: Application code should simply invoke =
"update(PreparedStatementCreator)" for each statement. I guess that the =
PreparedStatementCreator array version is rarely used too, and the =
replacement is straightforward.
Juergen
-----Original Message-----
From: j=FCrgen h=F6ller [werk3AT]
Sent: Tuesday, March 16, 2004 3:39 PM
To: 'spr...@li...';
spr...@li...
Subject: Re: [Springframework-user] JdbcTemplate update example
Will, everyone,
Our current JdbcTemplate does indeed not cover such use cases: It rather =
assumes that each operation will use its own (Prepared)Statement =
instance.
Therefore, I've added further JdbcTemplate methods that take generic =
callback actions:
- execute(StatementCallback)
- execute(String sql, PreparedStatementCallback)
- execute(String sql, CallableStatementCallback)
Each of the callback interfaces has a single "Object =
doInStatement(Statement)"-style method, allowing for any number of =
operations to be performed on the passed-in statement.
There also overloaded versions that take statement creators:
- execute(PreparedStatementCreator, PreparedStatementCallback)
- execute(CallableStatementCreator, CallableStatementCallback)
I've refactored all of JdbcTemplate's existing data access methods to =
use those generic execute methods with inner-class callback =
implementations: This has removed almost all internal code duplications =
that were necessary before.
I believe that this is an important addition: Reusing a statement =
instance for multiple executions with different parameters is a valid =
and quite common use case. And cleaning the JdbcTemplate internals is a =
nice side effect.
Awaiting your feedback! (I haven't committed that change yet, but intend =
to do so before the release this weekend.)
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf Of
Will Jaynes
Sent: Monday, March 15, 2004 8:10 PM
To: spr...@li...
Subject: [Springframework-user] JdbcTemplate update example
I'm converting some of my JDBC DAOs to Spring JdbcTempate usage. I'm
afraid I need an example of reusing a PreparedStatement over a number of
updates. The update methods for JdbcTemplate all seem to create a
PreparedStatement, so perhaps I can't use any of them.
The old code looks something like:
public void doAnUpdate(Connection conn, String[] ids) {
...
ps =3D conn.prepareStatement("Update A set B =3D null where id =3D ?");
for (int i=3D0; i<ids.length; i++)
ps.setString(id[i]);
ps.executeUpdate();
}
...
Thanks for any help,
Will
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
_______________________________________________
Springframework-user mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-user
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: <tho...@tr...> - 2004-03-16 21:45:50
|
I'm OK with both these changes.
Thomas
Quoting "jürgen höller [werk3AT]" <jue...@we...>:
> Thomas,
> =20
> Do you mind dropping the "update(PreparedStatementCreator[])" method? It =
> just seems so arbitrary: We'd need to provide "update" methods with =
> multiple SQL statements etc then too, for consistency's sake... And I =
> assume you don't mind renaming the "doWithResultSetFromXxx" methods to =
> "query"?
> =20
> Juergen
> =20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
> von j=FCrgen h=F6ller [werk3AT]
> Gesendet: Di 16.03.2004 15:55
> An: spr...@li...
> Betreff: [Springframework-developer] Re: [Springframework-user] =
> JdbcTemplate update example
>
>
>
> In the course of this change, I suggest two further minor changes:
>
> - The "doWithResultSetFromXxx" methods should really be named "query", =
> just with overloaded ResultSetExtractor arguments. There is no strong =
> difference to the other "query" methods that take all sorts of argument =
> combinations (particularly since the introduction of "queryForList" =
> etc). I don't think that this renaming will cause hassle, as I suspect =
> that hardly anyone uses those methods anyway.
>
> - I don't think that the "update" method that takes a =
> PreparedStatementCreator array is very helpful: It doesn't use batching =
> or reuse Statement instances but just executes the created =
> PreparedStatements one-by-one. I suggest to remove that overloaded =
> method: Application code should simply invoke =
> "update(PreparedStatementCreator)" for each statement. I guess that the =
> PreparedStatementCreator array version is rarely used too, and the =
> replacement is straightforward.
>
> Juergen
>
>
> -----Original Message-----
> From: j=FCrgen h=F6ller [werk3AT]
> Sent: Tuesday, March 16, 2004 3:39 PM
> To: 'spr...@li...';
> spr...@li...
> Subject: Re: [Springframework-user] JdbcTemplate update example
>
>
> Will, everyone,
>
> Our current JdbcTemplate does indeed not cover such use cases: It rather =
> assumes that each operation will use its own (Prepared)Statement =
> instance.
>
> Therefore, I've added further JdbcTemplate methods that take generic =
> callback actions:
> - execute(StatementCallback)
> - execute(String sql, PreparedStatementCallback)
> - execute(String sql, CallableStatementCallback)
>
> Each of the callback interfaces has a single "Object =
> doInStatement(Statement)"-style method, allowing for any number of =
> operations to be performed on the passed-in statement.
>
> There also overloaded versions that take statement creators:
> - execute(PreparedStatementCreator, PreparedStatementCallback)
> - execute(CallableStatementCreator, CallableStatementCallback)
>
> I've refactored all of JdbcTemplate's existing data access methods to =
> use those generic execute methods with inner-class callback =
> implementations: This has removed almost all internal code duplications =
> that were necessary before.
>
> I believe that this is an important addition: Reusing a statement =
> instance for multiple executions with different parameters is a valid =
> and quite common use case. And cleaning the JdbcTemplate internals is a =
> nice side effect.
>
> Awaiting your feedback! (I haven't committed that change yet, but intend =
> to do so before the release this weekend.)
>
> Juergen
>
>
>
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...]On Behalf Of
> Will Jaynes
> Sent: Monday, March 15, 2004 8:10 PM
> To: spr...@li...
> Subject: [Springframework-user] JdbcTemplate update example
>
>
> I'm converting some of my JDBC DAOs to Spring JdbcTempate usage. I'm
> afraid I need an example of reusing a PreparedStatement over a number of
> updates. The update methods for JdbcTemplate all seem to create a
> PreparedStatement, so perhaps I can't use any of them.
>
> The old code looks something like:
>
> public void doAnUpdate(Connection conn, String[] ids) {
> ...
> ps =3D conn.prepareStatement("Update A set B =3D null where id =3D ?");
> for (int i=3D0; i<ids.length; i++)
> ps.setString(id[i]);
> ps.executeUpdate();
> }
> ...
>
> Thanks for any help,
> Will
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
> ck
> _______________________________________________
> Springframework-user mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|
|
From: Rob M. <Rob...@pe...> - 2004-03-16 21:20:16
|
I just wanted to let the group know that the dtd is currently returning from the sourceforge server with a mime type of text/plain rather than application/xml-dtd (see RFC 3023 for further details). Not sure how much influence can be exercised to update the mime types in the server config, but I thought it might be worth a try. I'm not sure, but I suspect it might have something to do with the validation errors I've been seeing. Thanks, Rob |
|
From: Keith D. <kd...@cs...> - 2004-03-16 20:58:22
|
Anna, There is a indirect relationship between the two. The BeanValidatorBuilder instantiates PropertyValidators for a bean's properties and places them in that beans corresponding BeanInfo. The DefaultBeanValidationService then looks up those validators by querying the BeanInfo and subsequently processes them. So there is a level of indirection there. We're basically leveraging the existing javabeans metadata classes as opposed to rolling our own cache (which simplifies things and seems quite elegant.) More specifically, a validated bean will have the following characteristics: 1. The BeanInfo.beanDescriptor has the property BeanValidatorConstants.VALIDATED set to "true". 2. For each validated property, it's propertyDescriptor also has the property BeanValidatorConstants.VALIDATED also set to "true". In addition, the BeanValidatorConstants.VALIDATOR property stores a reference to the corresponding PropertyValidator, which encapsulates all the PropertyValidationRules. What the defaultBeanValidationService does is query the BeanInfo of the bean class when it is asked to validate a bean. If the BeanDescriptor is not marked as "validateable", the service returns, doing nothing. Else it runs over each property doing the same thing recursively down the object graph, invoking validate() on any found PropertyValidators. One issue that likely needs to be addressed is a result of BeanInfo caching differences between JDK 1.3 and 1.4. I know under JDK 1.4 BeanInfo instances are shared by the Introspector (caching is built in.) I believe under JDK 1.3, however, that is not the case--new BeanInfo copies are returned on each call to the Introspector. :-( Keith ----- Original Message ----- From: "Anna Chen" <ac...@er...> To: <spr...@li...> Sent: Tuesday, March 16, 2004 3:09 PM Subject: RE: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox > Keith, > > Could you tell me the relationship between DefaultBeanValidationService and > beanValidatorBuilder? > > I could not find where beanValidatorBuilder get called. > > Thanks, > > Anna > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Keith Donald > Sent: Saturday, March 13, 2004 6:44 PM > To: spr...@li... > Subject: Re: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > Anna, > > I've since been updating the unit tests of the declarative validation stuff, > so I thought I'd go ahead and attach a working sample that also exists in > the sandbox/test/org/springframework/validation test area. As we do more > testing, we'll get better samples, too. > > The sample below shows 3 bean declarations: the beanValidatorService is the > main validator interface to the subsystem, and here is using the > attributesValidatorSource to load on-demand validator information for beans > using commons-attributes. The beanValidatorBuilder is an example of how to > configure validation rules for bean properties declaratively using Spring. > In this example, the builder is configuring rules for the "name.lastName" > and "favoriteToy" properties of the Pet bean (specifically the key in the > propertyValidators map is the propertyName, and the value is a set of > PropertyValidationRule instances.) > > -------------- > > <bean id="beanValidationService" > class="org.springframework.validation.support.DefaultBeanValidationService"> > <property name="beanValidatorSource"><ref > bean="attributesValidatorSource"/></property> > </bean> > > <bean id="attributesValidatorSource" > class="org.springframework.validation.support.AttributesValidatorSource"/> > > <bean id="beanValidatorBuilder" > class="org.springframework.validation.support.BeanValidatorBuilder"> > <constructor-arg index="0"> > <description>The validated bean type</description> > <value>org.springframework.validation.Pet</value> > </constructor-arg> > <property name="propertyValidators"> > <map> > <entry key="name.lastName"> > <bean class="org.springframework.validation.rules.Required"/> > </entry> > <entry key="favoriteToy"> > <set> > <bean class="org.springframework.validation.rules.Required"/> > <bean class="org.springframework.validation.rules.MaxLength"> > <constructor-arg index="0"><value>25</value></constructor-arg> > </bean> > </set> > </entry> > </map> > </property> > </bean> > > Keith > > ----- Original Message ----- > From: "Keith Donald" <kd...@cs...> > To: <spr...@li...> > Sent: Thursday, March 11, 2004 12:19 AM > Subject: Re: [Springframework-developer] declarative rules-based bean > validator w/ attributes in sandbox > > > > Anna, > > > > Thanks... yea, I typed that by hand in the email from memory and I see I > > made at least one mistake with a closing tag in the first bean > declaration. > > :-) I'll be sure to correct anything like that when we get some > samples/docs > > out. > > > > BTW, guys thanks for those commons attributes tips. I haven't had time to > > go through their docs in detail and I really appreciate it. I agree we > > should keep the validation rule hierarchy as is. > > > > Keith > > > > ----- Original Message ----- > > From: "Anna Chen" <ac...@er...> > > To: <spr...@li...> > > Sent: Wednesday, March 10, 2004 4:04 PM > > Subject: RE: [Springframework-developer] declarative rules-based bean > > validator w/ attributes in sandbox > > > > > > > Keith > > > > > > I don't think that the Spring IoC configuration is a valid one according > > to > > > http://www.springframework.org/dtd/spring-beans.dtd > > > > > > > > > Anna > > > > > > -----Original Message----- > > > From: spr...@li... > > > [mailto:spr...@li...]On Behalf > > > Of Keith Donald > > > Sent: Wednesday, March 10, 2004 8:10 AM > > > To: spr...@li... > > > Subject: Re: [Springframework-developer] declarative rules-based bean > > > validator w/ attributes in sandbox > > > > > > > > > Correct me if I'm wrong, but I don't think there is. However, I know if > > > you're using Eclipse, the sandbox code (including tests) automatically > > gets > > > incrementally compiled in target/other-classes, which is automatically > put > > > in the classpath. So I have been basically running everything in the > > > sandbox from Eclipse directly. > > > > > > Keith > > > > > > ----- Original Message ----- > > > From: <sam...@ma...> > > > To: <spr...@li...> > > > Sent: Wednesday, March 10, 2004 6:42 AM > > > Subject: RE: [Springframework-developer] declarative rules-based bean > > > validator w/ attributes in sandbox > > > > > > > > > > Excellent, thanks Keith. On the subject of the sandbox, is there a > build > > > > directive to buils the sandbox code, or should I just overwrite the > src > > > with the > > > > sandbox code and rebuild? > > > > > > > > sam > > > > > > > > Quoting Keith Donald <kd...@cs...>: > > > > > > > > > I checked in a "BeanValidatorBuilder" class in the sandbox under > > > > > validation.support that allows you to declaratively assign > > > > > PropertyValidationRules to bean properties via Spring-IoC, through a > > > > > scripting environment such as Groovy/Beanshell, or programatically > in > > = > > > > > plain > > > > > java. This is in addition to support for defining validation rules > on > > = > > > > > beans > > > > > via source markup. > > > > > > > > > > Here's an example on how to use it: > > > > > > > > > > Spring IoC configuration > > > > > > > > > > <bean id=3D"validatorBuilder" > > > > > class=3D"org.springframework.validation.support.ValidatorBuilder"/> > > > > > <constructor-arg index=3D"0"> > > > > > <description>The validated bean type (class or > > > > > interface) aka 'root entity'</description> > > > > > <value>org.springframework.validation.Pet</value> > > > > > </constructor-arg> > > > > > <map> > > > > > <description> > > > > > A map of property name keys to one or more > > > > > governing property validation rules. > > > > > Nested bean property names from the 'root > > > > > entity' are supported. > > > > > Rule instances may be reused across > > > > > properties if desired. > > > > > </description> > > > > > <entry key=3D"name.lastName"> > > > > > <value><bean > > > > > class=3D"org.springframework.validation.rules.Required"/></value> > > > > > </entry> > > > > > <entry key=3D"favoriteToy"> > > > > > <value> > > > > > <set> > > > > > <bean > > > > > class=3D"org.springframework.validation.rules.Required"/> > > > > > <bean > > > > > class=3D"org.springframework.validation.rules.MaxLength"> > > > > > =09 > > > > > <constructor-arg>25</constructor-arg> > > > > > > > > > > </bean> > > > > > </set> > > > > > </value> > > > > > </entry> > > > > > </map> > > > > > </bean> > > > > > > > > > > Java > > > > > > > > > > BeanValidatorBuilder builder =3D new = > > > > > BeanValidatorBuilder(Pet.class); > > > > > > > > > > builder.setPropertyValidator("name.lastName", new > Required()); > > > > > > > > > > > > Set toyRules =3D new HashSet(); > > > > > toyRules.add(new Required()); > > > > > toyRules.add(new MaxLength(255)); > > > > > builder.setPropertyValidator("favoriteToy", toyRules); > > > > > > > > > > Keith > > > > > > > > sam > > > > http://www.magpiebrain.com/ > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > > > GenToo technologies. Learn everything from fundamentals to system > > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > > > _______________________________________________ > > > > Springframework-developer mailing list > > > > Spr...@li... > > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > > GenToo technologies. Learn everything from fundamentals to system > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > > GenToo technologies. Learn everything from fundamentals to system > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Anna C. <ac...@er...> - 2004-03-16 20:09:26
|
Keith,
Could you tell me the relationship between DefaultBeanValidationService and
beanValidatorBuilder?
I could not find where beanValidatorBuilder get called.
Thanks,
Anna
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Keith Donald
Sent: Saturday, March 13, 2004 6:44 PM
To: spr...@li...
Subject: Re: [Springframework-developer] declarative rules-based bean
validator w/ attributes in sandbox
Anna,
I've since been updating the unit tests of the declarative validation stuff,
so I thought I'd go ahead and attach a working sample that also exists in
the sandbox/test/org/springframework/validation test area. As we do more
testing, we'll get better samples, too.
The sample below shows 3 bean declarations: the beanValidatorService is the
main validator interface to the subsystem, and here is using the
attributesValidatorSource to load on-demand validator information for beans
using commons-attributes. The beanValidatorBuilder is an example of how to
configure validation rules for bean properties declaratively using Spring.
In this example, the builder is configuring rules for the "name.lastName"
and "favoriteToy" properties of the Pet bean (specifically the key in the
propertyValidators map is the propertyName, and the value is a set of
PropertyValidationRule instances.)
--------------
<bean id="beanValidationService"
class="org.springframework.validation.support.DefaultBeanValidationService">
<property name="beanValidatorSource"><ref
bean="attributesValidatorSource"/></property>
</bean>
<bean id="attributesValidatorSource"
class="org.springframework.validation.support.AttributesValidatorSource"/>
<bean id="beanValidatorBuilder"
class="org.springframework.validation.support.BeanValidatorBuilder">
<constructor-arg index="0">
<description>The validated bean type</description>
<value>org.springframework.validation.Pet</value>
</constructor-arg>
<property name="propertyValidators">
<map>
<entry key="name.lastName">
<bean class="org.springframework.validation.rules.Required"/>
</entry>
<entry key="favoriteToy">
<set>
<bean class="org.springframework.validation.rules.Required"/>
<bean class="org.springframework.validation.rules.MaxLength">
<constructor-arg index="0"><value>25</value></constructor-arg>
</bean>
</set>
</entry>
</map>
</property>
</bean>
Keith
----- Original Message -----
From: "Keith Donald" <kd...@cs...>
To: <spr...@li...>
Sent: Thursday, March 11, 2004 12:19 AM
Subject: Re: [Springframework-developer] declarative rules-based bean
validator w/ attributes in sandbox
> Anna,
>
> Thanks... yea, I typed that by hand in the email from memory and I see I
> made at least one mistake with a closing tag in the first bean
declaration.
> :-) I'll be sure to correct anything like that when we get some
samples/docs
> out.
>
> BTW, guys thanks for those commons attributes tips. I haven't had time to
> go through their docs in detail and I really appreciate it. I agree we
> should keep the validation rule hierarchy as is.
>
> Keith
>
> ----- Original Message -----
> From: "Anna Chen" <ac...@er...>
> To: <spr...@li...>
> Sent: Wednesday, March 10, 2004 4:04 PM
> Subject: RE: [Springframework-developer] declarative rules-based bean
> validator w/ attributes in sandbox
>
>
> > Keith
> >
> > I don't think that the Spring IoC configuration is a valid one according
> to
> > http://www.springframework.org/dtd/spring-beans.dtd
> >
> >
> > Anna
> >
> > -----Original Message-----
> > From: spr...@li...
> > [mailto:spr...@li...]On Behalf
> > Of Keith Donald
> > Sent: Wednesday, March 10, 2004 8:10 AM
> > To: spr...@li...
> > Subject: Re: [Springframework-developer] declarative rules-based bean
> > validator w/ attributes in sandbox
> >
> >
> > Correct me if I'm wrong, but I don't think there is. However, I know if
> > you're using Eclipse, the sandbox code (including tests) automatically
> gets
> > incrementally compiled in target/other-classes, which is automatically
put
> > in the classpath. So I have been basically running everything in the
> > sandbox from Eclipse directly.
> >
> > Keith
> >
> > ----- Original Message -----
> > From: <sam...@ma...>
> > To: <spr...@li...>
> > Sent: Wednesday, March 10, 2004 6:42 AM
> > Subject: RE: [Springframework-developer] declarative rules-based bean
> > validator w/ attributes in sandbox
> >
> >
> > > Excellent, thanks Keith. On the subject of the sandbox, is there a
build
> > > directive to buils the sandbox code, or should I just overwrite the
src
> > with the
> > > sandbox code and rebuild?
> > >
> > > sam
> > >
> > > Quoting Keith Donald <kd...@cs...>:
> > >
> > > > I checked in a "BeanValidatorBuilder" class in the sandbox under
> > > > validation.support that allows you to declaratively assign
> > > > PropertyValidationRules to bean properties via Spring-IoC, through a
> > > > scripting environment such as Groovy/Beanshell, or programatically
in
> =
> > > > plain
> > > > java. This is in addition to support for defining validation rules
on
> =
> > > > beans
> > > > via source markup.
> > > >
> > > > Here's an example on how to use it:
> > > >
> > > > Spring IoC configuration
> > > >
> > > > <bean id=3D"validatorBuilder"
> > > > class=3D"org.springframework.validation.support.ValidatorBuilder"/>
> > > > <constructor-arg index=3D"0">
> > > > <description>The validated bean type (class or
> > > > interface) aka 'root entity'</description>
> > > > <value>org.springframework.validation.Pet</value>
> > > > </constructor-arg>
> > > > <map>
> > > > <description>
> > > > A map of property name keys to one or more
> > > > governing property validation rules.
> > > > Nested bean property names from the 'root
> > > > entity' are supported.
> > > > Rule instances may be reused across
> > > > properties if desired.
> > > > </description>
> > > > <entry key=3D"name.lastName">
> > > > <value><bean
> > > > class=3D"org.springframework.validation.rules.Required"/></value>
> > > > </entry>
> > > > <entry key=3D"favoriteToy">
> > > > <value>
> > > > <set>
> > > > <bean
> > > > class=3D"org.springframework.validation.rules.Required"/>
> > > > <bean
> > > > class=3D"org.springframework.validation.rules.MaxLength">
> > > > =09
> > > > <constructor-arg>25</constructor-arg>
> > > >
> > > > </bean>
> > > > </set>
> > > > </value>
> > > > </entry>
> > > > </map>
> > > > </bean>
> > > >
> > > > Java
> > > >
> > > > BeanValidatorBuilder builder =3D new =
> > > > BeanValidatorBuilder(Pet.class);
> > > >
> > > > builder.setPropertyValidator("name.lastName", new
Required());
>
> > > >
> > > > Set toyRules =3D new HashSet();
> > > > toyRules.add(new Required());
> > > > toyRules.add(new MaxLength(255));
> > > > builder.setPropertyValidator("favoriteToy", toyRules);
> > > >
> > > > Keith
> > >
> > > sam
> > > http://www.magpiebrain.com/
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by: IBM Linux Tutorials
> > > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > > GenToo technologies. Learn everything from fundamentals to system
> > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > > _______________________________________________
> > > Springframework-developer mailing list
> > > Spr...@li...
> > > https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|