james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Cole (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] Created: (MIME4J-179) Error Stemming From CharsetUtil class
Date Fri, 20 Aug 2010 11:06:17 GMT
Error Stemming From CharsetUtil class
-------------------------------------

                 Key: MIME4J-179
                 URL: https://issues.apache.org/jira/browse/MIME4J-179
             Project: JAMES Mime4j
          Issue Type: Bug
    Affects Versions: 0.6
         Environment: Windows XP, Java jdk1.5.0_15, Junit 4.6
            Reporter: Richard Cole


Hello.

I am experiencing a issue when running a test the instantiates a MultipartEntity class (org.apache.http.entity.mime).
 When the test is run from within my IDE (idea 8.1.4) there is no issue.  However when the
test is run as part of an automated build from the command line the test fails.  I have tracked
the issue down to the following class org.apache.james.mime4j.util.CharsetUtil.  When run
from the command line I get this error from the test:

junit.framework.AssertionFailedError
    at sun.nio.cs.Surrogate$Parser.parse(Surrogate.java:205)
    at sun.nio.cs.ext.IBM949$Encoder.encodeArrayLoop(IBM949.java:1554)
    at sun.nio.cs.ext.IBM949$Encoder.encodeLoop(IBM949.java:5239)
    at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
    at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:342)
    at java.lang.StringCoding.encode(StringCoding.java:378)
    at java.lang.String.getBytes(String.java:812)
    at com.hsbc.cibm.valservice.workflowserver.server.jobs.JobsSourceTest.foo(JobsSourceTest.java:40
    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:585)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:758)

The interesting point is the from the command line I end up in:

at sun.nio.cs.Surrogate$Parser.parse(Surrogate.java:205)
    at sun.nio.cs.ext.IBM949$Encoder.encodeArrayLoop(IBM949.java:1554)
    at sun.nio.cs.ext.IBM949$Encoder.encodeLoop(IBM949.java:5239)

Where as from idea I end up in sun.nio.cs.ext.MS1252$Encoder

Please let me know if you need anymore information

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message