Re: [Httpunit-develop] CharToByteUTF-8 exception
Brought to you by:
russgold
From: Russell G. <rus...@ac...> - 2001-01-26 14:36:39
|
At 9:18 PM -0500 1/25/01, Ken MacLeod wrote: >I'm receiving the following character conversion error using HttpTool, >I suspect it's a version or configuration problem, but I'm new enough >to Java to not be able to spot it, I'm hoping someone will know right >off. > >1) testFrontPage(testx.ConsoleToolHttpTest) >java.lang.IllegalArgumentException: sun.io.CharToByteUTF-8 > at sun.io.CharToByteConverter.getConverterClass(CharToByteConverter= =2Ejava:87) > at sun.io.CharToByteConverter.getConverter(CharToByteConverter.java= :117) > at java.lang.String.getBytes(String.java:534) > at com.meterware.httpunit.ReceivedPage.getDOM(ReceivedPage.java:62) > at com.meterware.httpunit.ReceivedPage.<init>(ReceivedPage.java:44) > at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.j= ava:414) > at com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:39= 7) > at com.meterware.httpunit.WebResponse.getFrameNames(WebResponse.jav= a:160) > at com.meterware.httpunit.WebClient.updateFrames(WebClient.java:269= ) > at com.meterware.httpunit.WebClient.getResponse(WebClient.java:73) > at com.meterware.httpunit.WebClient.getResponse(WebClient.java:53) > at testx.ConsoleToolHttpTest.testFrontPage(ConsoleToolHttpTest.java= :14) > >I'm running MacOS X Server 1.2, java 1.1.6, httpunit 1.2.1, and >jtidy 04aug2000r6. > >If the problem is an older version of Java (a very good possibility), >there's very little I can do about that right now. I could maybe run >the tests using a different java environment (different from my >development environment), but I would prefer another workaround if >that were the case. I cannot say that I see it right off, but I have not tried running HttpUnit= on MacOS X Server. Naturally this is not made easier by the fact that it is= in the sun.io classes, for which AFAIK the source is not available... The expression that is at the heart of this is: pageText.getBytes( "UTF-8" ) I am wondering if there is a bug in your JDK's handling of UTF character= conversion. Unfortunately, while I know MacOS 8, I don't know anything= about MacOS X Server, which seems to be entirely different. If I were you,= I *would* try a different Java environment, if only to see if that is the= problem. If not, perhaps we can track it down a different way. ------------------------------------------------------------------------ Russell Gold | "... society is tradition and order rus...@ac... | and reverence, not a series of cheap | bargains between selfish interests." http://httpunit.sourceforge.net | - Poul Anderson, "Iron" |