Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GBK Encoding Not Supported in Websphere

Status
Not open for further replies.

f1shiva

Programmer
Jun 2, 2004
1
US
Hi Guys,
Am encountering "TransformerException: Invalid encoding name 'GBK'.", when i try to use GBK as my XML encoding <BR>
in Websphere Application Server. Version is 4.0. Sun Solaris 5.9 is the OS. JDK 1.3
i have configure the file.encoding ="GBK" for the JVM. also in my servlet response
am setting the charset as GBK in the content type.
if the change the encoding as GB2312 in the XML it works fine. But Still i maintain GBK in the other places like File.Encoding="GBK" and charset in the Servlet response as GBK.
Am creating the XML on the fly and using XSL Transformer am creating the HTML Page.
Please find the Exception Below.

javax.xml.transform.TransformerException: Invalid encoding name "GBK".
at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:671)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:647)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1054)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1032)
at aiu.core.switchingservlet.SwitchingServlet.performTask(SwitchingServlet.java:894)
at aiu.core.switchingservlet.SwitchingServlet.doGet(SwitchingServlet.java:597)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:317)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:477)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:351)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:144)
 
Having said that actually, this doc :


seems to say that GBK is supported in an extension file i18n.jar - have you got that file in your JAVA_HOME directory ?

Even if it is there, you may get support for the java.lang classes, but not in IO packages and those reliant on IO such as servlet packages.
Also, the error message seems to indicate that GBK is not supported.

Maybe you should upgrade your J2EE server and SDK versions ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top