|
Help, I am having a problem getting a JAVA applet to run in an IE4 brower. I get "Unexpected CCSID returned from getBestAS400CCSID=37" when I try to fill in an AS400Text object. I tried to simplify the code as much as possible... here's the little Applet: package TestAS400; import java.awt.*; import java.awt.event.*; import java.applet.*; import com.ibm.as400.access.*; public class SimpleAS400 extends Applet { boolean isStandalone = false; AS400 theAS400; public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } public SimpleAS400() { } public void init() { this.setSize(400,300); try { Trace.setTraceDiagnosticOn(true); Trace.setTraceInformationOn(true); Trace.setTraceWarningOn(true); Trace.setTraceErrorOn(true); Trace.setTraceDatastreamOn(true); Trace.setTraceOn(true); theAS400 = new AS400("AMWUSACS"); AS400Text testingText = new AS400Text(10); byte [] theconverted = testingText.toBytes("NickVrtis"); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); } Trace.setTraceOn(false); System.out.println("Version 1"); } public void start() {} public void stop() {} public void destroy() {} public String getAppletInfo() { return "Applet Information"; } public String[][] getParameterInfo() { return null; } } It works fine in the ILE. It never even accesses the AS/400 (I do not even get the logon screen), but that is to be expected. When I run it from the following HTML page: <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>Sample to test the AS/400 Text</TITLE> </HEAD> <BODY> TestAS400.SimpleTest will appear below in a Java enabled browser.<BR> <APPLET CODEBASE = "." CODE = "TestAS400.SimpleAS400.class" NAME = "TestTheAS400" WIDTH = 400 HEIGHT = 300 HSPACE = 0 VSPACE = 0 ALIGN = middle ARCHIVE = "SimpleAS400.jar,jt400.jar" > </APPLET></BODY></HTML> It does not work. I get the following from the Java Console log: Version 4 Release 2 Modification level 0.5 Fri Mar 17 13:07:33 EST 2000 Detected os.name : Windows 95 Fri Mar 17 13:07:33 EST 2000 Constructing AS400 object Fri Mar 17 13:07:33 EST 2000 Initializing server table Fri Mar 17 13:07:33 EST 2000 System name is 'AMWUSACS' Fri Mar 17 13:07:33 EST 2000 User ID is: '' Fri Mar 17 13:07:33 EST 2000 Unexpected CCSID returned from getBestGuessAS400Ccsid: 37 java.io.UnsupportedEncodingException at com/ibm/as400/access/ConvTable.getTableNoSwapChars at com/ibm/as400/access/ConvTable.getTable at com/ibm/as400/access/Converter.<init> at com/ibm/as400/access/Converter.getConverter at com/ibm/as400/access/Converter.getConverter at com/ibm/as400/access/AS400Text.<init> at TestAS400/SimpleAS400.init at com/ms/applet/AppletPanel.securedCall0 at com/ms/applet/AppletPanel.securedCall at com/ms/applet/AppletPanel.processSentEvent at com/ms/applet/AppletPanel.processSentEvent at com/ms/applet/AppletPanel.run at java/lang/Thread.run An unknown problem has occurred. com.ibm.as400.access.InternalErrorException: An unknown problem has occurred. at com/ibm/as400/access/InternalErrorException.<init> at com/ibm/as400/access/Converter.getConverter at com/ibm/as400/access/AS400Text.<init> at TestAS400/SimpleAS400.init at com/ms/applet/AppletPanel.securedCall0 at com/ms/applet/AppletPanel.securedCall at com/ms/applet/AppletPanel.processSentEvent at com/ms/applet/AppletPanel.processSentEvent at com/ms/applet/AppletPanel.run at java/lang/Thread.run Version 1 Some further debug info is that I put a few println's in to read the System Properties. The user.language and user.region are available within the ILE, but I get a java security exception when I run it from the browser. Any suggestions would be helpful... Nick +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.