You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by marc & lan <ma...@free.fr> on 2004/11/21 23:52:17 UTC

[jelly] Embedded test => SAXexception, you two ?

Hello guys.

When Irun JunitTest org.apache.commons.jelly.test.impl.TestEmbedded#testInputStreamAsScript
I get one SAXParser Exception.

I'm alone or there's somebody else ?

Junit are successfull. But there's this exception...

Marc DeXet @ home

Parse Fatal Error at line 1 column 79: Content is not allowed in trailing section.
org.xml.sax.SAXParseException: Content is not allowed in trailing section.
 at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
 at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(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.XMLScanner.reportFatalError(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:275)
 at org.apache.commons.jelly.impl.Embedded.compileScriptAndKeep(Embedded.java:168)
 at org.apache.commons.jelly.impl.Embedded.setScript(Embedded.java:136)
 at org.apache.commons.jelly.test.impl.TestEmbedded.testStringAsScript(TestEmbedded.java:71)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:598)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:354)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:219)
Content is not allowed in trailing section.

Re: [jelly] Embedded test => SAXexception, you two ?

Posted by Paul Libbrecht <pa...@activemath.org>.
Look at the source, it seems to be quite intended !

         //test generation of error
         embedded.setScript(jellyScript + "obnoxious-part");
         status = embedded.execute();
         //test failure of execution
         assertEquals(false, status);

;-)

paul


Le 21 nov. 04, à 23:52, marc & lan a écrit :

> Hello guys.
>
> When Irun JunitTest  
> org.apache.commons.jelly.test.impl.TestEmbedded#testInputStreamAsScript
> I get one SAXParser Exception.
>
> I'm alone or there's somebody else ?
>
> Junit are successfull. But there's this exception...
>
> Marc DeXet @ home
>
> Parse Fatal Error at line 1 column 79: Content is not allowed in  
> trailing section.
> org.xml.sax.SAXParseException: Content is not allowed in trailing  
> section.
>  at  
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkn 
> own Source)
>  at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(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.XMLScanner.reportFatalError(Unknown Source)
>  at  
> org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.di 
> spatch(Unknown Source)
>  at  
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn 
> own Source)
>  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>  at org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:275)
>  at  
> org.apache.commons.jelly.impl.Embedded.compileScriptAndKeep(Embedded.ja 
> va:168)
>  at org.apache.commons.jelly.impl.Embedded.setScript(Embedded.java:136)
>  at  
> org.apache.commons.jelly.test.impl.TestEmbedded.testStringAsScript(Test 
> Embedded.java:71)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
> va:39)
>  at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
> rImpl.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  
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteT 
> estRunner.java:598)
>  at  
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRu 
> nner.java:354)
>  at  
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestR 
> unner.java:219)
> Content is not allowed in trailing section.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org