|
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
|