Do Apache servers not like DocumentBuilderFactory ?

An exciting problem for all java geeks !
Here is a very simple "Hello World" applet initializing a dumy instance of the DocumentBuilderFactory class: (XML DOM parser)
// DBFBugApt.java
import java.applet.Applet ;
import java.awt.* ;
import javax.xml.parsers.*;
public class DBFBugApt extends Applet {
   public void init() {
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); // May fail on some servers !
   public void paint (Graphics g)  {
        g.drawString("Hello world !", 25, 75);
}Here is the listing of the DBFBugApt.html file displaying this applet:
<html>
<head>
<title>DocumentBuilderFactory bug ?</title>
</head>
<body>
<p>DBFBugApt says: (may fail when hosted on some servers !)</p>
<p>
<applet code="DBFBugApt.class" width="250" height="100">
</applet>
</p>
</body>
</html>This applet has been compiled with JDK 1.5.0_01 and deployed here: http://www.culand.ch/dev/DBFBugApt.html
As you can see, it works fine displaying "Hello World !" as expected...
The same DBFBugApt.class and DBFBugApt.html files have then been installed here: http://www.freewebs.com/softquipeut/DBFBugApt.html
And surprise: this alternate deployment fail to initialise ! The applet throws a NoClassDefFoundError error during its initialisation on the following statement: DocumentBuilderFactory.newInstance();Find hereafter the java console log:
java.lang.NoClassDefFoundError: IllegalName: <HTML><title>FreeWebs - Page Not Found</title>
     at java.lang.ClassLoader.preDefineClass(Unknown Source)
     at java.lang.ClassLoader.defineClass(Unknown Source)
     at java.security.SecureClassLoader.defineClass(Unknown Source)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source)
     at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
     at javax.xml.parsers.FactoryFinder.find(Unknown Source)
     at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
     at DBFBugApt.init(DBFBugApt.java:13)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
The question I'm trying to answer for one week without getting any logical explanation is WHY ???
The most remarkable difference between this two hosting web servers is the following:
My personal web site http://www.culand.ch is hosted on a Cobalt web server while www.freewebs.com sites are hosted on Apache servers.
For different reasons, I suspect all Apache web servers not to support hosting applets performing such DocumentBuilderFactory.newInstance() statement.
Or said differently: JRE 1.5.0_01 implementation of the DocumentBuilderFactory class does not support to be invoked by an applet hosted on an Apache server !!!
Is that a bug of the JRE 1.5.0_01 or a misconfiguration of the www.freewebs.com Apache web servers ?
If you have an available Apache Web server, you can help me to decide this by installing this applet on your server and letting me know if it works or not.
DBFBugApt.class, DBFBugApt.html (and the source file DBGBugApt.java too) can all be downloaded from each of the two given web servers.
If this is confirmed to be related to the Apache web servers only, and no misconfiguration of the web server can be found, I will report this as a JRE bug to Sun !
Thank you to help me solving this !
And I'm offering 10 Dollar Duke reward for a solution because I'm tired of this *@!$%! problem...
Thanks again to all of you who will answer to this thread.
P.F. Culand

The issue is not with the type of server, but with
the specific configuration of the freewebs server.
The DBF tries to load a file
"META-INF/services/javax.xml.parsers.DocumentBuilderFa
ctory" from the classpath, which, in this case, is
the directory on your server. The freewebs server
does not return a HTTP 404 error for a non-existing
resource like a proper little webserver, but instead
returns a HTTP 200 and a (human-readable) error page,
which the DBF tries to parse, resulting in the error.
Note that this is NOT Apache default behaviour, any
server can be configured thus, although it violates
the HTTP protocol.
2 possible solutions:
- configure the freewebs server properly
- pack your app into a jar fileSince the first solution is not in my hand I opted for the 2nd one:
It seems not to work, but I may have done something wrong in packing my applet into a jar file... (not very experimented in that).
So here is what I did:
I made the jar file by executing the following batch file:
set JavaDir=C:\Program Files\Java\Jdk1.5.0_01\
set ClassPath=.;%JavaDir%lib\classes.zip;%JavaDir%lib\
"%JavaDir%bin\jar" cvf DBFBugApt.jar DBFBugApt.classI modified the DBFBugApt.html file by adding an archive attribute to the applet tag that way:
<html>
<head>
<title>DocumentBuilderFactory bug ?</title>
</head>
<body>
<p>DBFBugApt says: (may fail when hosted on some servers !)</p>
<p>
<applet archive="DBFBugApt.jar" code="DBFBugApt.class" width="250" height="100">
</applet>
</p>
</body>
</html>I deleted the old DBFBugApt.class
I first tried to display the new html file from my local directory with the MSIE browser... It worked.
I uploaded the new jar and html files on the working Cobalt server on my personal web site: http://www.culand.ch/dev/DBFBugApt.html and deleted the old class file. Then I tested it... It worked.
Finally I uploaded them the same way on the freewebs server (http://www.freewebs.com/softquipeut/DBFBugApt.html) and deleted the old class file too. Then I tested it... DOES NOT WORK !
The loading of the applet is much slower than before and in hangs notinited like before... The console log is the following: (exactly the same than before)
java.lang.NoClassDefFoundError: IllegalName: <HTML><title>FreeWebs - Page Not Found</title>
     at java.lang.ClassLoader.preDefineClass(Unknown Source)
     at java.lang.ClassLoader.defineClass(Unknown Source)
     at java.security.SecureClassLoader.defineClass(Unknown Source)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source)
     at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
     at javax.xml.parsers.FactoryFinder.find(Unknown Source)
     at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
     at DBFBugApt.init(DBFBugApt.java:13)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)Did I make something wrong ?
Why do you thing that packing the applet into a jar file would solve the problem ?
Any suggestion ?
It is driving me to despear...!
Thanks for your help, the thread stays open.
P.F. Culand

Similar Messages

  • Can't see LAN Apache servers.

    With any and all computers on the router, I can see any Apache servers around the LAN, but when iPhone is on WI-FI it cannot see any of them. I get a "Server stopped responding" error. I can see the one server (port mapped in the router) from outside using Edge, but not "inside the loop".
    Is this related to a fix for the early network flip-out at Duke University? Any known way to fix this? I'd like to test some web sites to see how they look on the phone during development.
    Dave.

    Well, I managed to get it working... I reset the router to wide open and it worked, and when I went back to password protection, it still worked... I don't remember now which way I set it, but my router has 2 passwords available... One that allows LAN access and one that only passes Internet through... I "may" have used the Internet only passwords when I first set up the phones. Not sure, but I'm going OK now.

  • Data Servers Enabled Servers not visible

    Hi,
    We seem to be having a problem with xMII at the moment.  Enabled servers within Data Servers are not visible.  The windows is completely blank.  After unchecking Show Only Enabled Server we get the following error as below and no connectors are visible.  The version of xMII being used is 11.5.  Any pointers on how to solve this.
    Thanks,
    Vanshi
    Error. The server encountered an unexpected condition which prevented it from fulfilling the request.
    java.lang.NullPointerException
    at pagecompile._Admin._Server_xjsp._jspService(_Server_xjsp.java:138)
    at com.newatlanta.servletexec.JspHttpJspPage.service(JspHttpJspPage.java:41)
    at com.newatlanta.servletexec.JspServlet.service(JspServlet.java:1036)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.newatlanta.servletexec.SERequestDispatcher.forwardServlet(SERequestDispatcher.java:638)
    at com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatcher.java:236)
    at com.newatlanta.servletexec.SERequestDispatcher.internalForward(SERequestDispatcher.java:283)
    at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:96)
    at com.lighthammer.cms.system.CMSFilter.doFilter(Unknown Source)
    at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:60)
    at com.newatlanta.servletexec.ApplicationInfo.filterApplRequest(ApplicationInfo.java:2159)
    at com.newatlanta.servletexec.ApplicationInfo.processApplRequest(ApplicationInfo.java:1823)
    at com.newatlanta.servletexec.ServerHostInfo.processApplRequest(ServerHostInfo.java:937)
    at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java:1091)
    at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java:973)
    at com.newatlanta.servletexec.ServletExecService.processServletRequest(ServletExecService.java:167)
    at com.newatlanta.servletexec.ServletExecService.Run(ServletExecService.java:204)
    at com.newatlanta.servletexec.HttpServerRequest.run(HttpServerRequest.java:487)

    Give these URL's a try:
    /Lighthammer/Illuminator?Service=SystemInfo&Mode=ServerList
    /Lighthammer/Illuminator?Service=SystemInfo&Mode=ServerList&Mask=Disabled
    They should essentially give you the list of active and disabled data servers (much like the jsp page is trying to do)
    It is possible you managed to get an invalid name in the system and that's causing the error.
    You could also look carefully into the Server.xml file in the Conf directory.
    A ServletExec restart will also cause the system to re-read the file and log out trace information about the data server in the cms.log file (you'll see Loading Servers... and then you should see them one at a time).

  • Apache can not find file.

    I am working on this JSP web page in netbeans which uses the Apache
    distribution which comes with the ide. My problem is that whenever a
    user uploads a file via my web site then goes to view it Apache can
    not find the file and returned a 404 error. However it can find all
    other files in that directory and after I restart Apache it can find
    all files now. Why?

    From your problem description, it sounds like you are uploading the file somewhere under the exploded web application and then provide a direct link to the uploaded file. This may or may n ot work depending on the app server and the configuration you are using. Which app server are you using?

  • Admin_client.jar does not like -deploymentPlan switch

    I 'm trying to deploy an app via admin client using the following command line:
    java -jar $ORACLE_HOME/j2ee/home/admin_client.jar deployer:oc4j:opmn://$2.llnl.gov:6003/OpticsLoop oc4jadmin -deploy -file app.war -deploymentName $app -deploymentPlan plan.dat
    It does not like the -deploymentPlan switch. Error is:
    Admin command usage error: Unknown -deploy switch: plan.dat
    It will deploy other apps that don't use the -deploymentPlan. With this app I need the plan so I can disable apache commons logging library that conflicts with the log4j packaged with my app.
    JDK5 and Oc4J 10.1.3.3. Problem seen on Windows as well as on Linux.

    hi vamsee
    I was able to deploy an application, using the "-deploymentPlan" switch, like this:
    D:\oracle\oc4j_101330>java -jar j2ee/home/admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin welcome -deploy -file d:\temp\DPThread638837App.ear
    -deploymentName DPThread638837App -deploymentPlan d:\temp\DPThread638837App-localhost-plan.datIf I change the path for the deployment plan to something that does not exist, I get the message "... Unable to find deployment plan ..." :
    D:\oracle\oc4j_101330>java -jar j2ee/home/admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin welcome -deploy -file d:\temp\DPThread638837App.ear
    -deploymentName DPThread638837App -deploymentPlan d:\temp\unknown.dat
    Deploy error: Deploy error: Unable to find deployment plan d:\temp\unknown.dat.I don't know why it doesn't work for you.
    success
    Jan Vervecken

  • I use keynote 5.1 and am bombarded with popups asking me to update to KN 6.  I tried 6 after upgrading to Maverick. Do not like it.

    I use keynote 5.1 and love it.  I tried Keynote 6 and do not like it.
    My problem is that I am bombarded by popups asking me to
    update to Keynote 6
    This reduce my work speed to a snails pace.
    Would be most delighted to find a solution to the problem.
    Thanks

    Is there a sim in the iPhone?
    Has the iPhone been jailbroken or modified to work with other
    than the original wireless provider?
    If you can get that far, what does it say when you look at
    Settings=>General=>About=>Carrier?

  • I have upgrade ios 6 to ios7 on my iphone 5.  I do NOT like it.  I want to come back to the previosu version.  why is it so complicated.  Why can I not find the instruction strait from apple? This is the worst possible upgrade ever.

    I have upgrade ios 6 to ios7 on my iphone 5.  I do NOT like it at all.   I want to come back to the previous version.  why is it so complicated? Why can I not find the instruction strait from apple? This is the worst possible upgrade ever.  It make me think of when ericsson got sold to Sony....drastic PC change.
    I would like to have simple instruction on how to downgrade.
    It feel like a change that I did not ask for , ok I push the upgrade buttom, but really this is the worst update aver!
    HELP!

    iPhone User Guide (For iOS 7 Software)Sep 20, 2013 - 23 MB

  • I really do not like the new Photos app.  My iPhoto app is disabled in Finder.  How can I go back to iPhoto?

    My system just updated to OS X 10.10.3 and now Photos has replaced iPhoto.  My iPhoto has been disabled in Finder.  I really DO NOT like Photos.  Photos are no longer organized into "Events" and my Events labels are gone.  I also am not able to share photos via e-mail.  I tried to update iPhoto through the App Store, but got the message that it is not available in the US.  Then I got a message that said it was temporarily not available.  How can I get iPhoto back?

    now Photos has replaced iPhoto.  My iPhoto has been disabled in Finder.
    No, Photos did not replace iPhoto. It did not disable iPhoto. You updated to 10.10.3 before updating iPhoto to version that was compatible with Yosemite. That is why your older version is disabled.

  • How do i get my old itunes back? I upgraded new version and do not like it

    Please can someone help me.... I did a software update and it changed my itunes and i do not like it, can i get my old version back?
    Or can i access free music again? As i could listen to the radio before???? I cannot find it in the new version.

    It's been awhile since I've done something like this, but if I memory serves me, I believe you use the System Restore function to return your computer to the state it was in prior to installing iTunes 11.
    That should take it back to the last version of iTunes you'd installed. Of course, any other changes you've made to your system since then (e.g. other programs installed, etc.) will also be changed back.
    Not to sound like a jerk for referring you to Google like so many people online tend to do--but--I think there are instructions for the process of reverting to a previous version available online. I've done it in the past with IE 8 vs IE 9.

  • I just updated my iTunes and I do not like the newer version.....can I go back to the earlier version??  This new version does not have the iTunes DJ nor does is show at the bottom as in the earlier version how many songs and the size of my library.

    I just updated my iTunes on 12-7-2012 and I do not like the newer version.....can I go back to the earlier version??  This new version does not have the iTunes DJ nor does is show at the bottom as in the earlier version how many songs and the size of my library.

    To do this in iMovie 11. use the SHARE menu. Share your project using the Share menu and choose Export Using QuickTime.
    In the Dialog box that comes up, choose Sound to AIFF, or one of the other sound options. This will create a file that you can drag into iTubes.

  • DO NOT LIKE THE Firefox 30 OR 29 version !

    The latest version of FF 30 became so unpopular, at least, I really feel repugnant !
    1. the border among different tabs are not clear, even worse the unselcted tab titles are not easy to read as they are displayed not apparently as previous FF versions, such as FF28.
    In stead, the Mozilla website offered hundreds of colorful skins, weird buttons for us !!! Sorry, I really do not get it. I REALLY DO NO KNOW why you developers offer those useless skins for us !
    2. The most favourite function of the status bar is lost, and could not appear again !!!
    My habit is using upper tool bar for the management of tabs, the status bar for the management of webpages.
    In stead, the Mozilla website only told us, based on the safety consideration, it is not safe to use status bar, it is for our users safe concern.
    Let me tell you the REAL REASON I chose FIREFOX:
    Concise, Fast, Designable.
    Not because it can change skin color !!!
    I have read some other users complain about the stupid and disgusting FF 30 version. And one of your developer claimed that you developers have discussed and changed those features of FF seriously. And in the name of safety, you developers did those.
    OK, let me tell you what I think :
    1. The customer's feeling is always the MOST IMPORTANT THING for a product !!!
    You developer did not give us a choice, and just "think for us" and removed those feactures in the latest version, and offered us a bunch of rubbish skins for us to make fun and hope us would enjoy your new product.
    2. If you developers think you CAN CHANGE our customers using habits and TEACH us what is good and what is right, I would tell you I prefer to change to some other kinds of browser.
    3. Do you guys really think it is necessary to update so FAST ?!
    The main success for the FF is because it is designable as the add-on feature. Countless add-on were released for various users to meet their needs, that is REAL REAL big advantages than the IE. At that time, I started to use FF.
    But your developers should aware: We are playing browser and add-on to enjoy internet, NOT browser playing us !!!
    We have fun by using FF + addon, NOT like fix compatible problems everyday about the FF + addon for fun !!!
    So, I really really hope you developers would think about this problem seriously !!!
    At present, in order to prevent from I was confused by the your new releasing version of FF which is quite different from the old version. I have uninstallled the FF, and downloaded the old version (FF 28) which I was used to.
    Your developers may say that is not good, that is not safe, and that is ...
    Stop, I just DO NOT CARE !!! If one day I really find a problem with FF browser, I just uninstall it and try some other browsers, I WILL NOT CHANGE MY HABIT TO MEET YOUR EXPECTATION !!!
    THANKS & GOOD LUCK

    Thanks for everybodys kind and patient reply~~
    Recently, I have been busy with some urgent business. But my most favorite browser FF auto updated and some of the most important add-on could not be used as the compatible problem. And when I took a whole day to fix it and found the problem. I found I could not accept and get used to the new version, as it looks different, works different.
    I have to change my mind and habit to meet the new version of FF.
    Especially the new tab design, really made me annoying to read. And only countless weird and colorful themes are provided, maybe they are beautiful, but for me it only made the dispaly chaos.
    Anyway, thanks again for all of your reply and advices.
    And I still think a classic browser should always be:
    1. concise, easy to read and operate,
    2. designable for everyone to enjoy their work
    Of course, for the young or artist, they may prefer to more colorful, but that should be the theme change problem.

  • HT201210 I have updated my iphone 5 to new ios 7 and I did not like it so I like to restore back to old ios 6.1.4, please let me know what to do

    I have updated my iphone 5 to new ios 7 and I did not like it so I like to restore back to old ios 6.1.4.
    please let me know how to restore to ios 6.1.4.

    Downgrading is not supported.
    If you do not like iOS 7 (as I don't), leave Apple feedback: http://apple.com/feedback/iphone.html

  • What is wrong with my site that it is not like I've created?

    what is wrong with my site that it is not like I've created? The button will automatically be bigger. http://www.tomisha.com/muse

  • My password no longer works and I have tried everything to change it.I cannot use my Thunderbird and had to go to Gmail...which I do not like.

    My Verizon broadband was always crashing (some software issue that has been resolved) and after that my Thunderbird email stopped working saying I needed a password. I have tried everything in every option and still cannot change the password and log in. It has been a month since I have been able to use Thunderbird. I got a gmail account which I do not like at all. I don't like the format. I have not tried to get my mail from Thunderbird to gmail since I am already having enough problems.
    I have even tried to uninstall Thunderbird and simply get a new one and start over but it always shows up my old one and thus I have the same password problem. My old version is never uninstalled properly which I find strange...even with a restart after the uninstall.
    Any help would be much appreciated so that I can use Thunderbird.
    Angela

    No idea what "tried everything" means.
    Here is how you troubleshoot a password problem.
    Go to your email providers web mail page and verify that you have a working username and password by logging into your account there. If you cannot log in there, look for the link to reset your password. Your email password is administered with your email provider.
    Once you have a working password you need to remove any stored passwords in Thunderbird and replace with the new, working password.
    From the menu bar select''' Tools-Options-Security-Passwords-Stored Passwords'''
    Remove the passwords for the problem account. Close Thunderbird and restart it. You will be asked for a password. Enter the new password.
    No menu bar with Tools? Press the '''alt '''key.
    FYI: Thunderbird settings are stored in a different file from the program. Removing the program and reinstalling just keeps you busy for a little while and rarely fixes anything. As you have seen the old settings are picked up when Thunderbird is reinstalled.

  • I made some changes to my header, I did not like the results, so I changed them back and now I cannot edit the content of the page.  It is all grayed out..

    I was making some changes to my header file.  I did not like the results of the changes, so I changed them back.  When I did make the change back, I lost the ability to edit the page.

    Unfortunately, a picture of the code is not useful.
    The best way for us to help is if you put a copy of your problem page on a server and post a link for us.
    (rename it to avoid disrupting your live site)
    A less desirable method is to copy & paste your code in a post in the the web forum (not by email)
    https://forums.adobe.com/thread/1615559

Maybe you are looking for