
Hey all, I've got some problems, and I was wondering if any of you had encountered something similar before (and have a solution). I've got to use an applet from another website (http://www.phylosoft.org/atv/examples/apaf.html). I've copied the jar-file to our webserver, but it isn't working. Apparently there is something wrong with the localization of the SAXParser. I find this highly weird, because normally the server should not be able to dictate the client were to find class-files. To test this, i just wrote a test-case applet which does 1 thing: execute SAXParserFactory.newInstance(); This class was then packed in a jar, and placed on our webserver. I then tested this with the appletviewer utility of sun: U:\workspace\PLAZA\src>appletviewer -J-Djaxp.debug=1 applet.html ATVapplet: URL of tree to load: "http://bioinformatics.psb.ugent.be/readwrite/plaza_tmp/tests/trees/apaf.xml" [Your Java version: 1.6.0] trying to detect output measurements filename to load: /readwrite/plaza_tmp/tests/trees/apaf.xml JAXP: find factoryId =javax.xml.parsers.SAXParserFactory JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory using ClassLoader: sun.applet.AppletClassLoader@14a9972 JAXP: found in resource, value=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> java.lang.NoClassDefFoundError: IllegalName: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476) at java.lang.ClassLoader.defineClass(ClassLoader.java:614) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:178) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:115) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:294) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:221) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128) at test.TestApplet.init(TestApplet.java:49) at sun.applet.AppletPanel.run(AppletPanel.java:417) at java.lang.Thread.run(Thread.java:619) So, when we look at this website : http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.htm... we see that this newInstance()-method does a shitload of things.Not really understandable in my opinion. The thing is though, apparently this SAXParserFactory tries to interpret html-headers as ClassNames.... :-( Anyway, I still dont understand how executing the SAXParserFactory can be dependent on the server... I though applets were client-side only :s I've done some googeling, but haven't found out yet what is exactly causing this. Anyone has an idea? Michiel -- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.ugent.be http://www.psb.ugent.be ==================================================================

Just thought i would post the cause and "solution" to my problems: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506467 and because the plaza-website was running in debug-mode, it was generating custom 404-pages which were then parsed by the SAXParserFactory :-( *sigh* So in the future, i'll turn of debug mode before and after i try things Michiel Michiel Van Bel wrote:
Hey all, I've got some problems, and I was wondering if any of you had encountered something similar before (and have a solution).
I've got to use an applet from another website (http://www.phylosoft.org/atv/examples/apaf.html). I've copied the jar-file to our webserver, but it isn't working. Apparently there is something wrong with the localization of the SAXParser. I find this highly weird, because normally the server should not be able to dictate the client were to find class-files.
To test this, i just wrote a test-case applet which does 1 thing: execute SAXParserFactory.newInstance(); This class was then packed in a jar, and placed on our webserver. I then tested this with the appletviewer utility of sun:
U:\workspace\PLAZA\src>appletviewer -J-Djaxp.debug=1 applet.html ATVapplet: URL of tree to load: "http://bioinformatics.psb.ugent.be/readwrite/plaza_tmp/tests/trees/apaf.xml"
[Your Java version: 1.6.0] trying to detect output measurements filename to load: /readwrite/plaza_tmp/tests/trees/apaf.xml JAXP: find factoryId =javax.xml.parsers.SAXParserFactory JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory using ClassLoader: sun.applet.AppletClassLoader@14a9972 JAXP: found in resource, value=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> java.lang.NoClassDefFoundError: IllegalName: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476) at java.lang.ClassLoader.defineClass(ClassLoader.java:614) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:178) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:115) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:294)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:221) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128) at test.TestApplet.init(TestApplet.java:49) at sun.applet.AppletPanel.run(AppletPanel.java:417) at java.lang.Thread.run(Thread.java:619)
So, when we look at this website : http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.htm...
we see that this newInstance()-method does a shitload of things.Not really understandable in my opinion. The thing is though, apparently this SAXParserFactory tries to interpret html-headers as ClassNames.... :-( Anyway, I still dont understand how executing the SAXParserFactory can be dependent on the server... I though applets were client-side only :s I've done some googeling, but haven't found out yet what is exactly causing this. Anyone has an idea?
Michiel
-- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.ugent.be http://www.psb.ugent.be ==================================================================

Yes, that's the solution. Turn off debug when you want to fix something ;) On Thu, 20 Nov 2008, Michiel Van Bel wrote:
Just thought i would post the cause and "solution" to my problems:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506467
and because the plaza-website was running in debug-mode, it was generating custom 404-pages which were then parsed by the SAXParserFactory :-( *sigh* So in the future, i'll turn of debug mode before and after i try things
Michiel
Michiel Van Bel wrote:
Hey all, I've got some problems, and I was wondering if any of you had encountered something similar before (and have a solution).
I've got to use an applet from another website (http://www.phylosoft.org/atv/examples/apaf.html). I've copied the jar-file to our webserver, but it isn't working. Apparently there is something wrong with the localization of the SAXParser. I find this highly weird, because normally the server should not be able to dictate the client were to find class-files.
To test this, i just wrote a test-case applet which does 1 thing: execute SAXParserFactory.newInstance(); This class was then packed in a jar, and placed on our webserver. I then tested this with the appletviewer utility of sun:
U:\workspace\PLAZA\src>appletviewer -J-Djaxp.debug=1 applet.html ATVapplet: URL of tree to load: "http://bioinformatics.psb.ugent.be/readwrite/plaza_tmp/tests/trees/apaf.xml"
[Your Java version: 1.6.0] trying to detect output measurements filename to load: /readwrite/plaza_tmp/tests/trees/apaf.xml JAXP: find factoryId =javax.xml.parsers.SAXParserFactory JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory using ClassLoader: sun.applet.AppletClassLoader@14a9972 JAXP: found in resource, value=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> java.lang.NoClassDefFoundError: IllegalName: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476) at java.lang.ClassLoader.defineClass(ClassLoader.java:614) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:178) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:115) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:294)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:221) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128) at test.TestApplet.init(TestApplet.java:49) at sun.applet.AppletPanel.run(AppletPanel.java:417) at java.lang.Thread.run(Thread.java:619)
So, when we look at this website : http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.htm...
we see that this newInstance()-method does a shitload of things.Not really understandable in my opinion. The thing is though, apparently this SAXParserFactory tries to interpret html-headers as ClassNames.... :-( Anyway, I still dont understand how executing the SAXParserFactory can be dependent on the server... I though applets were client-side only :s I've done some googeling, but haven't found out yet what is exactly causing this. Anyone has an idea?
Michiel
--
participants (2)
-
Kenny Billiau
-
Michiel Van Bel