- From: Wayne Johnson <wjohnson@mqsoftware.com>
- Date: Thu, 19 Jun 2003 17:22:27 -0500
- To: <www-jigsaw@w3.org>
Turns out our problem is that we were using the CvsDAV stuff and our CLASSPATH had a typo in the path to jigedit.jar. Seems Windows isn't concerned with things like case... :{s>
This was further complicated by the fact that the code in org.w3c.tools.resources.serialization.xml.XMLReader.startElement() was placing an UnknownResource onto resourceStack, which was then being added to a resourcearray Vector in resourceSetStack, and then in endElement(), an attempt to do a CopyInto of the Vector containing the UnknownResource into the ResourceFrame array caused an ArrayStorageException. Gee, that's a mouthful.
Maybe some annotated code fragements...
public void startElement(String name, AttributeList attributes)
throws SAXException
{
String iname = name.intern();
if (iname == iRESOURCE_TAG) {
String resourceclass = attributes.getValue(CLASS_ATTR);
try {
Class c = Class.forName(resourceclass);
resourceStack.push(c.newInstance());
} catch (Exception ex) { // Generates ClassNotFoundException
UnknownResource unknown = new UnknownResource();
resourceStack.push(unknown); // Here the UnknownResource gets created
}
Then in:
public void endElement(String name)
throws SAXException
{
...
Vector vframes = (Vector) resourceSetStack.pop();
ResourceFrame frames[] = new ResourceFrame[vframes.size()];
vframes.copyInto(frames); // attempt to copy UnknownResource into ResourceFrame array. Boom.
Why you can't copy the UnknownResource into the frames array, I don't quite understand, just that Java doesn't like it.
I don't have a proper fix for this, but I'm pretty sure there is a better way to handle the exception.
> -----Original Message-----
> From: Wayne Johnson
> Sent: Thursday, June 19, 2003 9:29 AM
> To: www-jigsaw@w3.org
> Subject: Problem with root.xml on AIX
>
>
>
> We've tried to run Jigsaw 2.2.2 on AIX but we're getting a
> problem in (I think) processing the file root.xml.
>
> At first we were just getting the error:
> Unknown error while starting http-server: null
> *** FATAL Error:
> No servers launched !
> I tracked down this rather cryptic message and added a
> printStackTrace() to it and we're seeing:
> Unknown error while starting http-server: null
> java.lang.ArrayStoreException
> at java.lang.System.arraycopy(Native Method)
> at java.util.Vector.copyInto(Vector.java:167)
> at
> org.w3c.tools.resources.serialization.xml.XMLReader.endElement
> (XMLReader.java:119)
> at com.jclark.xml.sax.Driver.endElement(Driver.java)
> at
> com.jclark.xml.parse.EntityParser.parseContent(EntityParser.java)
> at
> com.jclark.xml.parse.EntityParser.parseDocumentEntity(EntityPa
> rser.java)
> at
> com.jclark.xml.parse.DocumentParser.parse(DocumentParser.java)
> at
> com.jclark.xml.parse.base.ParserImpl.parseDocument(ParserImpl.java)
> at com.jclark.xml.sax.Driver.parse(Driver.java)
> at
> org.w3c.tools.resources.serialization.xml.XMLReader.parse(XMLR
> eader.java:200)
> at
> org.w3c.tools.resources.serialization.xml.XMLReader.readResour
> ces(XMLReader.java:214)
> at
> org.w3c.tools.resources.serialization.xml.XMLSerializer.readRe
> sources(XMLSerializer.java:142)
> at
> org.w3c.tools.resources.store.ResourceStoreImpl.loadResources(
> ResourceStoreImpl.java:475)
> at
> org.w3c.tools.resources.store.ResourceStoreImpl.lookupResource
> (ResourceStoreImpl.java:212)
> at
> org.w3c.tools.resources.store.NewReference.lock(NewStoreEntry.java:75)
> at
> org.w3c.tools.resources.store.NewStoreEntry.loadResource(NewSt
> oreEntry.java:284)
> at
> org.w3c.tools.resources.store.ResourceStoreManager.loadRootRes
> ource(ResourceStoreManager.java:992)
> at org.w3c.jigsaw.http.httpd.loadRoot(httpd.java:852)
> at org.w3c.jigsaw.http.httpd.changeRoot(httpd.java:859)
> at
> org.w3c.jigsaw.http.httpd.initializeRootResource(httpd.java:888)
> at org.w3c.jigsaw.http.httpd.start(httpd.java:2032)
> at
> org.w3c.jigsaw.daemon.ServerHandlerManager.<init>(ServerHandle
> rManager.java(Compiled Code))
> at
> org.w3c.jigsaw.daemon.ServerHandlerManager.main(ServerHandlerM
> anager.java:501)
> at org.w3c.jigsaw.Main.main(Main.java:15)
> *** FATAL Error:
> No servers launched !
> This same jigsaw implementation is working on Windows. I
> checked the root.xml file, and it appears normal, and is in
> UNIX format (should it still be DOS format?). Except for the
> UNIX translation, root.xml is copied from the Windows version.
>
> Anyone seen this before? Any suggestions?
>
> TIA,
>
>
>
>
Received on Thursday, 19 June 2003 18:22:29 UTC