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.

Bug 233798 - com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
Summary: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: In...
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 240517 246852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-01 16:01 UTC by aquaglia
Modified: 2014-09-05 14:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 202733


Attachments
stacktrace (2.56 KB, text/plain)
2013-08-01 16:01 UTC, aquaglia
Details
stacktrace (2.56 KB, text/plain)
2013-08-01 17:22 UTC, aquaglia
Details
stacktrace (2.56 KB, text/plain)
2013-08-02 06:07 UTC, aquaglia
Details
surefire xml (16.94 KB, text/xml)
2013-08-21 09:23 UTC, aquaglia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aquaglia 2013-08-01 16:01:51 UTC
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)
Comment 1 aquaglia 2013-08-01 16:01:53 UTC
Created attachment 138141 [details]
stacktrace
Comment 2 aquaglia 2013-08-01 17:22:33 UTC
Created attachment 138144 [details]
stacktrace

java editing
Comment 3 aquaglia 2013-08-02 06:07:44 UTC
Created attachment 138166 [details]
stacktrace

Java editing
Comment 4 Milos Kleint 2013-08-19 11:14:23 UTC
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?
Comment 5 aquaglia 2013-08-21 09:05:10 UTC
It just happened again but I cannot reproduce it consistently.
It pops up once and then goes away.
Comment 6 aquaglia 2013-08-21 09:08:09 UTC
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)
Comment 7 aquaglia 2013-08-21 09:12:13 UTC
It happens only for a specific test method, not for others in the same class.
Comment 8 aquaglia 2013-08-21 09:12:42 UTC
            <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>
Comment 9 aquaglia 2013-08-21 09:15:18 UTC
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>
Comment 10 Milos Kleint 2013-08-21 09:19:03 UTC
please attach the target/surefire*/*.xml files. The exception comes from parsing some of these files. a missing catalog file appears to be irrelevant
Comment 11 aquaglia 2013-08-21 09:23:39 UTC
Created attachment 138980 [details]
surefire xml
Comment 12 aquaglia 2013-08-21 09:23:59 UTC
Yes, you are right, sorry.
I have attached the file.
Comment 13 aquaglia 2013-08-21 12:10:24 UTC
It happens with other unit tests and is a bit annoying.
Comment 14 Milos Kleint 2013-08-21 12:15:11 UTC
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.
Comment 15 Milos Kleint 2013-08-21 12:18:37 UTC
can you please try upgrading your maven-surefire-plugin to 2.16 and retry?
Comment 16 aquaglia 2013-08-22 07:11:28 UTC
Upgrading the maven-surefire-plugin to 2.16 solves the issue, many thanks!
Comment 17 Milos Kleint 2013-08-22 07:45:13 UTC
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.
Comment 18 Milos Kleint 2014-01-16 07:56:07 UTC
*** Bug 240517 has been marked as a duplicate of this bug. ***
Comment 19 Theofanis Oikonomou 2014-09-05 14:07:14 UTC
*** Bug 246852 has been marked as a duplicate of this bug. ***