org.xml.sax.SAXException: Parsing Fatal Error
Line: -1
URI: null
Message: Premature end of file.
at org.dozer.loader.xml.XMLParserFactory$DozerDefaultHandler.fatalError(XMLParserFactory.java:97)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.dozer.loader.xml.MappingFileReader.read(MappingFileReader.java:60)
at org.dozer.loader.CustomMappingsLoader.loadFromFiles(CustomMappingsLoader.java:103)
at org.dozer.loader.CustomMappingsLoader.load(CustomMappingsLoader.java:56)
at org.dozer.DozerBeanMapper.loadCustomMappings(DozerBeanMapper.java:210)
at org.dozer.DozerBeanMapper.getMappingProcessor(DozerBeanMapper.java:185)
at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:111)
at com.hope.stm.service.impl.balance.BalanceDetailServiceImpl.findBalanceDetail(BalanceDetailServiceImpl.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy4.findBalanceDetail(Unknown Source)
at com.hope.stm.service.balance.TestBalanceDetailService.testfindBalanceDetail(TestBalanceDetailService.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
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.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
2011-10-19 17:41:25,932 [com.hope.stm.service.balance.TestBalanceDetailService]-[DEBUG] Rolled back transaction after execution of test [testfindBalanceDetail].
5 个解决方案
#1
test.xml配置文件写错了,格式不对,找找这个文件对照正确的改吧
#2
把test.xml贴出来看看
#3
xml配置出错了。lz,把xml贴出来,不然解决不了你的问题啊。
#4
xml里有<xml>标记没?
#5
多谢各位,问题已经解决了。
#1
test.xml配置文件写错了,格式不对,找找这个文件对照正确的改吧
#2
把test.xml贴出来看看
#3
xml配置出错了。lz,把xml贴出来,不然解决不了你的问题啊。
#4
xml里有<xml>标记没?
#5
多谢各位,问题已经解决了。