This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This bug was originally marked as duplicate of bug 187824, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE Dev (Build 201307252300) VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b17 OS: Windows 7 User Comments: aquaglia: Running JUnit Tests Stacktrace: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence. at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:687) at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:557) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1426) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2754) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
Created attachment 138141 [details] stacktrace
Created attachment 138144 [details] stacktrace java editing
Created attachment 138166 [details] stacktrace Java editing
can you create a sample project demonstrating the problem or at least attach the target/surefire*/*.xml files with the output of surefire plugin that we attempt to parse but fail. any specific maven-surefire-plugin configuration in your project?
It just happened again but I cannot reproduce it consistently. It pops up once and then goes away.
Correction: I do reproduce it consistently. It happens a few seconds after running the JUnit test. com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence. at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:687) at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:408) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1426) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2805) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:846) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:775) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:628) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789) [catch] at org.netbeans.modules.maven.junit.JUnitOutputListenerProvider.generateTest(JUnitOutputListenerProvider.java:374) at org.netbeans.modules.maven.junit.JUnitOutputListenerProvider.sequenceEnd(JUnitOutputListenerProvider.java:315) at org.netbeans.modules.maven.junit.JUnitOutputListenerProvider.sequenceFail(JUnitOutputListenerProvider.java:355) at org.netbeans.modules.maven.execute.AbstractOutputHandler.processFail(AbstractOutputHandler.java:247) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.processExecEvent(CommandLineOutputHandler.java:441) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.access$300(CommandLineOutputHandler.java:90) at org.netbeans.modules.maven.execute.CommandLineOutputHandler$Output.run(CommandLineOutputHandler.java:275) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
It happens only for a specific test method, not for others in the same class.
<plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <executions> </executions> <configuration> <catalog>src/main/resources/jaxb/catalog.xml</catalog> <catalogResolver>org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver</catalogResolver> <forceRegenerate>true</forceRegenerate> <generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory> <verbose>true</verbose> </configuration> </plugin>
I think the problem is that the configuration points to a file that does not exist in the project: <catalog>src/main/resources/jaxb/catalog.xml</catalog>
please attach the target/surefire*/*.xml files. The exception comes from parsing some of these files. a missing catalog file appears to be irrelevant
Created attachment 138980 [details] surefire xml
Yes, you are right, sorry. I have attached the file.
It happens with other unit tests and is a bit annoying.
it appears that the text ""Regadíos horizonte 2008", "Descripción Servicio Regadíos..."" is not in UTF-8 (as the surefire xml header claims to be. That's where the error originates. most likely a duplicate of issue https://jira.codehaus.org/browse/SUREFIRE-1007 in surefire plugin.
can you please try upgrading your maven-surefire-plugin to 2.16 and retry?
Upgrading the maven-surefire-plugin to 2.16 solves the issue, many thanks!
ok, great. closing as wontfix as the problem is not primarily in netbeans.org codebase. We already catch the exception but I believe it's ok to show the report exception dialog here. At least additional users can find the problem and solution we found.
*** Bug 240517 has been marked as a duplicate of this bug. ***
*** Bug 246852 has been marked as a duplicate of this bug. ***