[kaffe] Problem with Strings/Xml Parsing while trying to run an embedded Jetty

Rafael Teixeira monoman at gmail.com
Fri Oct 14 09:56:10 PDT 2005


I've compiled kaffe-1.1.6, on my P3 1GHz Fedora Core 3 machine.
One pertinent environment var is:

LANG=en_US.UTF-8


I'm trying to run a single jar that embeds Jetty. It runs fine with
Sun's J2SE 5.0 JDK in the same machine.

I first experienced problems with my classes/packages containing
accented (non-ASCII) letters in their names. I've renamed them to
accent-less versions to be able go further.

Anyway the EclipseOnJDK5-compiled code have problem with accented
letters when printing them to the console only in kaffe:

java -jar inteligenciafiscal.jar
Software Básico do Módulo Fiscal de Segurança
Versão: 01.00.00

usr/bin/kaffe -jar ../../../java/inteligenciafiscal/inteligenciafiscal.jar
Software B\uffffsico do M\uffffdulo Fiscal de Seguran
Vers\uffffo: 01.00.00

Also when Jetty is trying to read the configuration xmls, DTD aren't
being correctly loaded in the sax validator:

INFO: Version Jetty/5.1.x

org.xml.sax.SAXParseException: Element type 'web-app' was not declared
   at gnu.xml.pipeline.ValidationConsumer.error (ValidationConsumer.java:433)
   at gnu.xml.pipeline.ValidationConsumer.startElement
(ValidationConsumer.java:1010)
   at gnu.xml.aelfred2.SAXDriver.startElement (SAXDriver.java:1104)
   at gnu.xml.aelfred2.XmlParser.parseElement (XmlParser.java:1387)
   at gnu.xml.aelfred2.XmlParser.parseDocument (XmlParser.java:578)
   at gnu.xml.aelfred2.XmlParser.doParse (XmlParser.java:463)
   at gnu.xml.aelfred2.SAXDriver.parse (SAXDriver.java:364)
   at gnu.xml.aelfred2.XmlReader.parse (XmlReader.java:365)
   at javax.xml.parsers.SAXParser.parse (SAXParser.java:273)
   at org.mortbay.xml.XmlParser.parse (XmlParser.java:216)
   at org.mortbay.xml.XmlParser.parse (XmlParser.java:234)
   at org.mortbay.jetty.servlet.XMLConfiguration.configureDefaults
(XMLConfiguration.java:158)
   at org.mortbay.jetty.servlet.WebApplicationContext.configureDefaults
(WebApplicationContext.java:414)
   at org.mortbay.jetty.servlet.WebApplicationContext.doStart
(WebApplicationContext.java:463)
   at org.mortbay.util.Container.start (Container.java:72)
   at org.mortbay.http.HttpServer.doStart (HttpServer.java:753)
   at org.mortbay.util.Container.start (Container.java:72)
   at br.com.handsonnet.nexus.aplicacao.ModuloFiscal.InicializaServi\uffffosREST
(ModuloFiscal.java:275)
   at br.com.handsonnet.nexus.aplicacao.ModuloFiscal._Iniciar
(ModuloFiscal.java:173)
   at br.com.handsonnet.nexus.aplicacao.ModuloFiscal.main (ModuloFiscal.java:45)
   at java.lang.reflect.Method.invoke0 (Method.java)
   at java.lang.reflect.Method.invoke (Method.java:255)
   at kaffe.jar.ExecJarName.main (ExecJarName.java:64)
   at kaffe.jar.ExecJar.main (ExecJar.java:57)

I've looked at kaffevm/string.c and it surely doesn't look like
dealing with encodings correctly. Also some diagnostic messages I've
put on some places point to problems with code that try to force
String instances to be interned to be able to compare strings using ==
instead of equals() (as the gnu.xml.pipeline.ValidationConsumer does)

Can somebody help me?


--
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes.
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!




More information about the kaffe mailing list