tags:

views:

233

answers:

2

Hi All,

I am facing a weird problem in Testing server while using applet (using embed tag) in my ASP.NET MVC application Applet works fine locally in both browsers IE and Firefox but when deployed to Testing server its throwing below exception for Firefox only (IE works fine).

Please help me out in this

basic: exception: javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; not found.
java.lang.RuntimeException: javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; not found
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; not found
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:772)
    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:696)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
    at org.apache.log4j.Logger.getLogger(Logger.java:105)
        Exception: java.lang.RuntimeException: javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; not found
Ignored exception: java.lang.RuntimeException: javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; not found
basic: Starting applet teardown
basic: Finished applet teardown
+1  A: 

Apparently log4j tries to access some XML configuration file and cannot find them where it expects them.

PhiLho
Thanks for reply PhiLho, I have 2 questions , same code is working locally for FireFox why the IE is not throwing this exception ? My head is spinning for this issue
prakash
A: 

The problem is actually that the DTD cannot be found. This can be caused by access restrictions in the security box the applet is running in. IE is probably more flexible in this or has it actually in the client side cache.

That said, this indicates that the log4j XML configuration file is declared with a HTML doctype. Why is it there? It's a XML file, get rid of the HTML doctype. Just a XML declaration with eventually a log4j.dtd is enough.

BalusC