|
|
|
open_source_junkie
|
Sorry to be posting so much. But when I change the applicationContext.xml to use transactionManager as described in SpringLive as below, I get SaxParseException errors for all the tests. I looked in the spring
<bean id="userManager" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"><ref local="transactionManager"/> </property> <property name="target"><ref local="userManagerTarget"/> </property> <property name="transactionAttributes"> <props> <prop key="save*">PROPAGATION_REQUIRED</prop> <prop key="remove*">PROPAGATION_REQUIRED</prop> <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> </props> </property> </bean> <bean id="userManagerTarget" class="org.appfuse.service.impl.UserManagerImpl"> <property name="userDAO"><ref local="userDAO"/></property> </bean> testSave(org.appfuse.web.UserActionTest) Time elapsed: 0.078 sec <<< ERROR! org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 42 i n XML document from file [C:\niru\equinox-struts2-hibernate-1.7.1\target\test-cl asses\WEB-INF\applicationContext.xml] is invalid; nested exception is org.xml.sa x.SAXParseException: cvc-id.1: There is no ID/IDREF binding for IDREF 'transacti onManager'. Caused by: org.xml.sax.SAXParseException: cvc-id.1: There is no ID/IDREF binding for IDREF 'transactionManager'. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un known 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.xs.XMLSchemaValidator$XSIErrorReporter.reportE rror(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknow n Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Sourc e) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow n Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known 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 org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocum ent(DefaultDocumentLoader.java:76) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB eanDefinitions(XmlBeanDefinitionReader.java:388) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:340) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:317) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:167) at org.springframework.context.support.AbstractXmlApplicationContext.loa dBeanDefinitions(AbstractXmlApplicationContext.java:113) at org.springframework.context.support.AbstractXmlApplicationContext.loa dBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationCon text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94) at org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:292) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:92) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:77) at org.springframework.test.AbstractSingleSpringContextTests.loadContext Locations(AbstractSingleSpringContextTests.java:182) at org.springframework.test.AbstractSingleSpringContextTests.loadContext (AbstractSingleSpringContextTests.java:152) at org.springframework.test.AbstractSpringContextTests.getContext(Abstra ctSpringContextTests.java:105) at org.springframework.test.AbstractSingleSpringContextTests.setUp(Abstr actSingleSpringContextTests.java:83) at junit.framework.TestCase.runBare(TestCase.java:125) at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestC ase.java:69) 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav a:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes tSet(AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab stractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su refireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:818) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:818) testRemove(org.appfuse.web.UserActionTest) Time elapsed: 0.078 sec <<< ERROR! org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 42 i n XML document from file [C:\niru\equinox-struts2-hibernate-1.7.1\target\test-cl asses\WEB-INF\applicationContext.xml] is invalid; nested exception is org.xml.sa x.SAXParseException: cvc-id.1: There is no ID/IDREF binding for IDREF 'transacti onManager'. Caused by: org.xml.sax.SAXParseException: cvc-id.1: There is no ID/IDREF binding for IDREF 'transactionManager'. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un known 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.xs.XMLSchemaValidator$XSIErrorReporter.reportE rror(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknow n Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Sourc e) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow n Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known 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 org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocum ent(DefaultDocumentLoader.java:76) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB eanDefinitions(XmlBeanDefinitionReader.java:388) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:340) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:317) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:167) at org.springframework.context.support.AbstractXmlApplicationContext.loa dBeanDefinitions(AbstractXmlApplicationContext.java:113) at org.springframework.context.support.AbstractXmlApplicationContext.loa dBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationCon text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94) at org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:292) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:92) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:77) at org.springframework.test.AbstractSingleSpringContextTests.loadContext Locations(AbstractSingleSpringContextTests.java:182) at org.springframework.test.AbstractSingleSpringContextTests.loadContext (AbstractSingleSpringContextTests.java:152) at org.springframework.test.AbstractSpringContextTests.getContext(Abstra ctSpringContextTests.java:105) at org.springframework.test.AbstractSingleSpringContextTests.setUp(Abstr actSingleSpringContextTests.java:83) at junit.framework.TestCase.runBare(TestCase.java:125) at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestC ase.java:69) 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav a:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes tSet(AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab stractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su refireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:818) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:818) Results : Tests in error: testGetUsers(org.appfuse.service.UserManagerTest) testGetUsers(org.appfuse.dao.UserDaoTest) testSaveUser(org.appfuse.dao.UserDaoTest) testAddAndRemoveUser(org.appfuse.dao.UserDaoTest) testSearch(org.appfuse.web.UserActionTest) testEdit(org.appfuse.web.UserActionTest) testSave(org.appfuse.web.UserActionTest) testRemove(org.appfuse.web.UserActionTest) |
||||||||||||||||
|
mraible
|
As I mentioned in my previous e-mail - Equinox 1.0 (Spring Live) is not compatible with 1.7.1. If you use 1.0, you shouldn't have any issues.
Matt On 3/27/07,
nmall <[hidden email]> wrote:
-- http://raibledesigns.com |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |