I have developed JEE 6 enterprise application with 2 web modules and EJB3 exposed as web service.
Application deployed successfully on the glassfish v3.0.1 and when viewing the WSDL everything is okay.
But when I invoked the built in web service tester, and invokeing an operation I got the following error:
javax.xml.transform.transformerexception:org.apache.xerces.impl.io.malformedbytesequenceexception:invalid byte 2 of 2-byte utf-8 sequence
So how do I enable the UTF-8 in the "test web service" page? Right now the result is returning UTF-8, but the page is not UTF-8 so it cannot display the result.
The solution as the following:
- From left menu choose configuration
- Expand server-config
- Click on JVM settings.
- Click on JVM options tab.
- Add -Dfile.encoding=UTF8 to JVM options.
- Save changes.
- Restart application server.
After restarting try to test again and everything should works fine.
Very helpful thank you.
ReplyDeleteThank you very much!!!
ReplyDeleteI had a same problem and worked now, thank you!!!
ReplyDeletebest comment. Thank you very much
ReplyDelete