Problems with crimson-1.1.3 and Netscape 4.79 VM
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jonas_Rathert
Posted On:   Thursday, December 13, 2001 08:15 AM

Hi! I want to write an applet that parses and writes a XML file. Unfortuantely, this applet has to run in a browser without any Java plug-in, thus, I'm stuck to Java 1.1. The applet I wrote does a very simple thing: it parses a file with a handler that prints the files content to stdout (the handler-code is stolen from the JAXP Tutorial , I slightly modified the href="http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/work/Echo12.java">Echo12.java example). Thus, I expected to see the output in the Java Console of the browser. Here's an excerpt of the code (without the exception handling): // Crea   More>>

Hi!



I want to write an applet that parses and writes a XML file.
Unfortuantely, this applet has to run in a browser without
any Java plug-in, thus, I'm stuck to Java 1.1.



The applet I wrote does a very simple thing: it parses a file
with a handler that prints the files content to stdout (the handler-code is
stolen from the
JAXP Tutorial , I slightly modified the
href="http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/work/Echo12.java">Echo12.java

example). Thus, I expected to see the output in the Java Console of the browser.



Here's an excerpt of the code (without the exception handling):

			
// Create a JAXP SAXParserFactory and configure it
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setValidating(true);

// Get a SAXParser and the encapsulated SAX XMLReader
XMLReader xmlReader = spf.newSAXParser().getXMLReader();

// AppletHandler is my simple "write to stdout"-handler
xmlReader.setContentHandler(new AppletHandler(this));

// url is a String that was passed as an argument
xmlReader.parse(url);


Then I did the following:




  1. I installed Tomcat 3.2.4 and created a directory
    $TOMCAT_HOME/webapps/ROOT/dt . (Actually, I used Tomcat
    because the whole thing will be integrated in a JSP/Servlet application.)

  2. I put the applet class file, the current crimson.jar and
    am index.html file (where the applet gets loaded, togehter
    with the crimson.jar file) into that directory.

  3. I put the files , ,
    slideshow3.dtd and xhtml.dtd from the
    JAXP
    Tutorial into the same directory.

  4. I started Tomcat, started Netscape 4.79 and opened the the URL
    "http://localhost:8080/dt/". The applet appears, and I gave it the
    URL "http://localhost:8080/dt/slideSample10.xml" as the URL that
    should be parsed.


Unfortunately, this does not work. Instead of having the
.xml-file completely been printed in the Java Console, I see the
following (I marked "expected" output with "***" here):



			
*** Netscape Communications Corporation -- Java 1.1.5
*** Type '?' for options.
*** Symantec Java! ByteCode Compiler Version 210.065
*** Copyright (C) 1996-97 Symantec Corporation
*** have factory
*** have parser
*** have reader
*** LOCATOR
*** SYS ID: http://localhost:8080/dt/slidesample.xml

*** START DOCUMENT
*** <?xml version='1.0' encoding='us-ascii'?>
Jit Pass6 error
CodeGenStruct format error in class org/apache/crimson/parser/Parser2 method maybeComment offset b70222
flags=9200 opcode=30 modrm=1e opcode2=46 sib=2
Clength=0 deltaESP=0 operand0flag=0 operand1flag=0
operand0=0 operand1=0 depends=0 modifies=0
Continue execution ?
Jit Pass6 Failure!
org/apache/crimson/parser/Parser2 maybeComment (Z)Z
An internal JIT error has occurred. Please report this with .class to
jit-bugs@itools.symantec.com

External parameter entity "%[dtd];" has characters after markup.


I already heard that the "...maybeComment (Z)Z"-error is only a warning
(that occours with JDK 1.1) and can be ignored. But I do not understand
the "External parameter entity ..." error. No single xml or dtd file
does contain the [dtd] entity definiton. I played around with the
files and deleted some comments and references, but the error more or
less remains, sometimes the entity parameter is different.



The biggest problem I have (because it confuses me) is that


  • the applet does work with MS Internet Explorer 5 (MS JVM Release
    5.0.0.3802), Mozilla 0.9.6 (with Java plug-in 1.3.1) and even Netscape
    4.79 with Java plug-in and

  • the whole thing written as an application and run with the Sun JDK
    1.1.8 (on W2k) does work.



Now I have the suspicion that the Netscape 4.79 VM does not work
correctly with the current crimson release. Did anybody of you
make a similar experience and/or has some ideas how to work around
this problem? Of course, if there is another JAXP implementation
besides crimson that works, that would be ok, but it should be small,
since we do not want our clients to load several MBs of Java code...



Thanks in advance!


Jonas

   <<Less
About | Sitemap | Contact