Skip to Content.
Sympa Menu

perfsonar-dev - [kan@cica.es: [pS-dev] Re: bug found and fixed: converting XML to DOM]

Subject: perfsonar development work

List archive

[: [pS-dev] Re: bug found and fixed: converting XML to DOM]


Chronological Thread 
  • From: ulisses <>
  • To:
  • Subject: [: [pS-dev] Re: bug found and fixed: converting XML to DOM]
  • Date: Wed, 18 Oct 2006 16:45:01 +0200
  • Resent-date: Thu, 19 Oct 2006 20:00:50 +0200
  • Resent-date: Thu, 19 Oct 2006 20:00:50 +0200
  • Resent-from:
  • Resent-message-id: <>
  • Resent-to:

Hi I forward this e-mail from Cándido since he could not yet subscribe to the
list

regards

Ulisses

----- Forwarded message from Cándido Rodríguez Montes
<>
-----

Cc:
,
Nicolas Simar
<>,
Andreas Hanemann
<>,
Martin Swany
<>,
Jason Zurawski
<>
From: Cándido Rodríguez Montes
<>
Date: Wed, 18 Oct 2006 10:43:48 +0200
To: ulisses
<>

Hi all!
Well, as you can see I've found two main bugs in NMWG classes:
1. The import declaration isn't done properly. We cannot import all
classes of a package, instead we have to import specific classes. For
example:
- Before patch in org.ggf.ns.nmwg.base.v2_0.Subject.java:
import java.util.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
- After patch:
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Vector;

import org.xml.sax.ContentHandler;
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.NamespaceSupport;
The main problem is that a lot of classes has the same name in NMWG
classes and "org.xml.sax" classes, such as
org.ggf.ns.nmwg.base.v2_0.Element. So the JVM cannot guess which
class it has to choose. You could read more about this in [1] in
section "A Word about Source Code Incompatibilities".
2.- There are some classes, which extend Element, that their
constructor declaration isn't done properly, because they don't set
all needed attributes for creating DOM objects. In
org.ggf.ns.nmwg.topology.l3.v3_0.Link.java it cannot set the
following attribute:
localName = "link";
Also, I'm worried about two things. First, I've only fixed bugs for
getting the DOM object of the topology, but I've seen that more
classes of the NMWG has those both problems. So, we could get
unexpected errors in the future. And second, I've had the
'java.lang.OutOfMemoryError: Java Heap Space' exception and I had to
change the maximum memory of my Tomcat. I think we have to study with
more attention it because the topology service response is not a very
big response. Has anyone had the same problem? I'm running a MacOSX
10.4.

Cheers!

[1] http://www.eclipse.org/eclipse/development/java-api-evolution.html

PD: I'm trying to subscribe to perfsonar-dev, but I haven't got any
confirmation for it. Anyone can help me? ;)


El 18/10/2006, a las 8:39, ulisses escribió:

>Hi all
>
>Cándido (Cica/RedIRIS) has found the problem that I was
>experiencing from many time ago when converting
>the topology service output to DOM.
>
>I attach the patch that Cándido made to fix it. Please take
>a look at it.
>
>Cándido also noticed that the method for generating the
>ASCII version of the XML document is different that the one
>when converting TO DOM. As far as I understnand, this means
>that service developers can't be sure if the XML document
>is being generated correctly when delivering it to the
>perfsonar framework, and hence the debugging is much more
>difficult.
>
>It's a luck Cándido helped with his expertise. Thanks Cándido.
>
>regards
>
> Ulisses
><ggfBugs.patch>


----- End forwarded message -----


  • [: [pS-dev] Re: bug found and fixed: converting XML to DOM], ulisses, 10/19/2006

Archive powered by MHonArc 2.6.16.

Top of Page