Re: [RomaFramework-dev] Exception while starting blog
Brought to you by:
lvca
|
From: Luca G. <l.g...@pr...> - 2006-05-16 15:45:51
|
Yes, @MinitoringField annotation applies to field and getters. @MonitoringAction, instead, is for methods. So you should disable field/getter/setter for MinitoringField.enabled=3D=3Dfalse and all methods for MinitoringAction.enabled=3D=3Dfalse. bye, Luca Garulli Blogging on: http://zion-city.blogspot.com http://www.RomaFramework.org - The new way to build Java applications http://www.Pro-Netics.com (member of Orixo.com - The XML business allianc= e) http://www.OrienTechnologies.com - Light ODBMS, All in one JDO solution On Tue, May 16, 2006 17:36, Massimiliano Loconte said: > Ok..i tested the monitoring setting one field with the annotation: > @MonitoringField(enabled=3DAnnotationConstants.FALSE) > and works...that attribute is ignored as espected. > > I have a question, do you think i can generalize saying that once I > don't want an attribute to be monitorable i don't want to monitor his > getter and setter methods as well(whether it has any)? > > On 5/16/06, Luca Garulli <l.g...@pr...> wrote: >> Yes, >> the version of "blog2" project you have doesn't declare the >> ComponentFactory. >> >> Add these lines in applicationContext.xml >> >> <bean abstract=3D"false" autowire=3D"default" >> class=3D"org.romaframework.aspect.view.echo2.component.DefaultComponen= tFactory" >> dependency-check=3D"default" id=3D"ComponentFactory" lazy-init=3D"= default" >> singleton=3D"true"> >> </bean> >> >> bye, >> Luca Garulli >> Blogging on: http://zion-city.blogspot.com >> http://www.RomaFramework.org - The new way to build Java applications >> http://www.Pro-Netics.com (member of Orixo.com - The XML business >> alliance) >> http://www.OrienTechnologies.com - Light ODBMS, All in one JDO solutio= n >> >> On Tue, May 16, 2006 16:27, Massimiliano Loconte said: >> > Hi, Luca i've just updated svn an recompiled with ant install, after >> > refreshing in eclipse and starting the blog2 test application i get >> > the following exception: >> > >> > 16:23:30,485 INFO [SocketListener] Started SocketListener on >> 0.0.0.0:8080 >> > 16:23:30,485 WARN [Server] EXCEPTION >> > org.mortbay.util.MultiException[org.springframework.beans.factory.Be= anDefinitionStoreException: >> > Line 134 in XML document from ServletContext resource >> > [/WEB-INF/applicationContext.xml] is invalid; nested exception is >> > org.xml.sax.SAXParseException: Attribute value "ComponentFactory" of >> > type ID must be unique within the document.] >> > at org.mortbay.http.HttpServer.doStart(HttpServer.java:686) >> > at org.mortbay.util.Container.start(Container.java:72) >> > at org.mortbay.jetty.Server.main(Server.java:460) >> > org.springframework.beans.factory.BeanDefinitionStoreException: Line >> > 134 in XML document from ServletContext resource >> > [/WEB-INF/applicationContext.xml] is invalid; nested exception is >> > org.xml.sax.SAXParseException: Attribute value "ComponentFactory" of >> > type ID must be unique within the document. >> > org.xml.sax.SAXParseException: Attribute value "ComponentFactory" of >> > type ID must be unique within the document. >> > at >> > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(U= nknown >> > Source) >> > at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown >> Source) >> > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown >> Source) >> > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown >> Source) >> > at >> > org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribute(Unkn= own >> > Source) >> > at >> > org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndVali= date(Unknown >> > Source) >> > at >> org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown >> > Source) >> > at >> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown >> > Source) >> > at >> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartEleme= nt(Unknown >> > Source) >> > at >> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentConten= tDispatcher.dispatch(Unknown >> > Source) >> > at >> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(U= nknown >> > Source) >> > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown >> Source) >> > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown >> Source) >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> > at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) >> > at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown >> Source) >> > at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) >> > at >> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBe= anDefinitions(XmlBeanDefinitionReader.java:161) >> > at >> > org.springframework.beans.factory.support.AbstractBeanDefinitionRead= er.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125) >> > at >> > org.springframework.beans.factory.support.AbstractBeanDefinitionRead= er.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141) >> > at >> > org.springframework.web.context.support.XmlWebApplicationContext.loa= dBeanDefinitions(XmlWebApplicationContext.java:126) >> > at >> > org.springframework.web.context.support.XmlWebApplicationContext.loa= dBeanDefinitions(XmlWebApplicationContext.java:94) >> > at >> > org.springframework.context.support.AbstractRefreshableApplicationCo= ntext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89) >> > at >> > org.springframework.context.support.AbstractApplicationContext.refre= sh(AbstractApplicationContext.java:268) >> > at >> > org.springframework.web.context.support.AbstractRefreshableWebApplic= ationContext.refresh(AbstractRefreshableWebApplicationContext.java:134) >> > at >> > org.springframework.web.context.ContextLoader.createWebApplicationCo= ntext(ContextLoader.java:230) >> > at >> > org.springframework.web.context.ContextLoader.initWebApplicationCont= ext(ContextLoader.java:156) >> > at >> > org.springframework.web.context.ContextLoaderListener.contextInitial= ized(ContextLoaderListener.java:48) >> > at >> > org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicati= onContext.java:495) >> > at org.mortbay.util.Container.start(Container.java:72) >> > at org.mortbay.http.HttpServer.doStart(HttpServer.java:708) >> > at org.mortbay.util.Container.start(Container.java:72) >> > at org.mortbay.jetty.Server.main(Server.java:460) >> > >> > >> > Maybe something wrong in a xml file? >> > >> > Massimiliano Loconte. |