dev@glassfish.java.net

Re: java.io.UTFDataFormatException: PWC6260

From: Fabian Nirman <fabian.nirman_at_gmail.com>
Date: Wed, 17 Jun 2009 00:36:41 +0300

Hello Wolfram Rittmeyer,
thank you very much for your reply.
please find below full server console output:
The scenario is:
1. When I add "problematic image" and try to load in browser JSP it fails
with error(s) you can find bellow.
you can see on attached "problem.gif" that image placeholder marked by
broken image...
2. I remove this line from jsp
<img src="Images/p.png">
or replace by some other picture, - all works fine.

The problem is that about 50% of pics I have to use are fails in
compilation. I understand that all images are transformed on the server to
java classes, therefore first time acces to jsp, server compilation fails
while loading them.

3. to reproduce it I send you also image, that cause the problem ( also
attached, "p.png" )
My server version is:
Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)

Any help are more than wecome.

CONSOLE/LOG OUTPUT:
java.io.UTFDataFormatException: PWC6260: Invalid byte 1 of 1-byte UTF-8
sequence.
        at
org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:644)
        at org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:519)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.load(XMLEncodingDetector.java:1063)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.skipString(XMLEncodingDetector.java:1014)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.scanXMLDecl(XMLEncodingDetector.java:1272)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:158)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:146)
        at
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:376)
        at
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:210)
        at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:140)
        at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:435)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
        at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw
exception
java.io.UTFDataFormatException: PWC6260: Invalid byte 1 of 1-byte UTF-8
sequence.
        at
org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:644)
        at org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:519)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.load(XMLEncodingDetector.java:1063)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.skipString(XMLEncodingDetector.java:1014)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.scanXMLDecl(XMLEncodingDetector.java:1272)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:158)
        at
org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:146)
        at
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:376)
        at
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:210)
        at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:140)
        at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:435)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
        at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)



-- 
Regards
Fabian Nirman
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Mobile phone: + 972 - 52 66 270 71
Skype: i-SOS-i
http://www.linkedin.com/in/fabiannirman
http://cupofstartup.blogspot.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - -
On Tue, Jun 16, 2009 at 11:33 PM, Wolfram Rittmeyer <
w.rittmeyer_at_jsptutorial.org> wrote:
> Fabian Nirman wrote:
>
>>
>> Hello people,
>> I am new to GlassFish and have problem I can not resolve myself:
>> Looks like image parsing error, when I remove an image - there is no more
>> error ....
>>
>
> According to the stacktrace provided, the problem occurs when GlassFish
> tries to compile a JSP. So - unless you use JSPs for streaming binary data -
> this should not be related to your image.
>
> Do you have more information (say a stripped down version of your JSP with
> which this is reproducable, more logging information and so on)?
>
> --
> Wolfram Rittmeyer
>
>
> Looking for help to solve this problem:
>>   StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp
>> threw exception
>> java.io.UTFDataFormatException: PWC6260:  Invalid byte 1 of 1-byte UTF-8
>> sequence.
>>        at
>> org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:644)
>>        at org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:519)
>>        at
>> org.apache.jasper.xmlparser.XMLEncodingDetector.load(XMLEncodingDetector.java:1063)
>>        at
>> org.apache.jasper.xmlparser.XMLEncodingDetector.skipString(XMLEncodingDetector.java:1014)
>>        at
>> org.apache.jasper.xmlparser.XMLEncodingDetector.scanXMLDecl(XMLEncodingDetector.java:1272)
>>        at
>> org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:158)
>>        at
>> org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:146)
>>        at
>> org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:376)
>>        at
>> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:210)
>>        at
>> org.apache.jasper.compiler.ParserController.parse(ParserController.java:140)
>>        at
>> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
>>        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:435)
>>        at
>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
>>        at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
>>        at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
>>        at
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>        at
>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
>>        at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
>>        at
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
>>        at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
>>        at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
>>        at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
>>        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
>>        at
>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
>>        at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
>>        at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
>>        at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
>>        at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
>>        at
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
>>        at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
>>        at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
>>        at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
>>        at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
>>        at
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
>>        at
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
>>        at
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
>>        at
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
>>        at
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
>>        at
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
>>        at
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
>>        at
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
>>        at
>> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
>>        at
>> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
>>
>>
>> --
>> With best regards
>> Fabian Nirman
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>





problem.gif
(image/gif attachment: problem.gif)

p.png
(image/png attachment: p.png)