#17 I looks like EntityResolver is not consulted at all

v1.03
closed-fixed
Yuval Oren
7
2004-07-11
2003-03-20
Petr Kuzel
No

I tried to use Picollo as default "fast non-validating
SAX parser" but it proved to be very slow due to
network access caused by ignoring installed entity
resolver.

See following thread for details
<http://xml.netbeans.org/servlets/ReadMsg?msgId=486767&listName=dev>.

I have not studied Piccolo sources it's just client
experience.

"Folder recognizer" daemon prio=1 tid=0x0x88ab288
nid=0x13b runnable [52fea000..52feb830]
at
java.net.SocketInputStream.socketRead0(Native Method)
at
java.net.SocketInputStream.read(SocketInputStream.java:129)
at
java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:277)
- locked <0x4446d740> (a
java.io.BufferedInputStream)
at
java.io.FilterInputStream.read(FilterInputStream.java:111)
at
com.bluecast.xml.XMLStreamReader.fillByteBuffer(Unknown
Source)
at
com.bluecast.xml.XMLStreamReader.reset(Unknown Source)
at
com.bluecast.xml.XMLStreamReader.<init>(Unknown Source)
at
com.bluecast.xml.XMLStreamReader.<init>(Unknown Source)
at
com.bluecast.xml.EntityManager$Entry.open(Unknown Source)
at
com.bluecast.xml.PiccoloLexer.pushEntity(Unknown Source)
at
com.bluecast.xml.PiccoloLexer.pushEntity(Unknown Source)
at
com.bluecast.xml.PiccoloLexer.pushEntity(Unknown Source)
at com.bluecast.xml.Piccolo.yyparse(Unknown Source)
at com.bluecast.xml.Piccolo.parse(Unknown Source)
at
org.openide.filesystems.DefaultAttributes$InnerParser.parseXML(DefaultAttributes.java:1054)
at
org.openide.filesystems.DefaultAttributes$Table.readFromXML(DefaultAttributes.java:852)
at
org.openide.filesystems.DefaultAttributes.loadTable(DefaultAttributes.java:580)
at
org.openide.filesystems.DefaultAttributes.load(DefaultAttributes.java:538)
at
org.openide.filesystems.DefaultAttributes.loadTable(DefaultAttributes.java:517)
at
org.openide.filesystems.DefaultAttributes.readAttribute(DefaultAttributes.java:279)
- locked <0x44cf57a0> (a
org.openide.filesystems.LocalFileSystem$InnerAttrs)
at
org.openide.filesystems.LocalFileSystem$InnerAttrs.readAttribute(LocalFileSystem.java:600)
at
org.openide.filesystems.AbstractFileObject.getAttribute(AbstractFileObject.java:264)
at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:712)
at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:682)
at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:710)
at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:682)
at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:611)
at
org.openide.loaders.DataLoaderPool.getPreferredLoader(DataLoaderPool.java:422)
at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:346)
at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:320)
at
org.openide.loaders.DataObject.find(DataObject.java:447)
at
org.openide.loaders.DataFolder.findFolder(DataFolder.java:509)
at
org.netbeans.modules.projects.ProjectDataObject.getFilesFolder(ProjectDataObject.java:283)
at
org.netbeans.modules.projects.ProjectDataObject$C.<init>(ProjectDataObject.java:390)
at
org.netbeans.modules.projects.ProjectDataObject.<init>(ProjectDataObject.java:190)
at
org.netbeans.modules.projects.ProjectDataLoader.handleFindDataObject(ProjectDataLoader.java:58)
at
org.openide.loaders.DataLoader.findDataObject(DataLoader.java:233)
at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:348)
at
org.openide.loaders.FolderList.createBoth(FolderList.java:653)
at
org.openide.loaders.FolderList.getObjects(FolderList.java:464)
at
org.openide.loaders.FolderList.access$200(FolderList.java:50)
at
org.openide.loaders.FolderList$ListTask.run(FolderList.java:829)
at org.openide.util.Task.run(Task.java:136)
at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:668)

Discussion

  • Petr Kuzel
    Petr Kuzel
    2003-03-20

    • priority: 5 --> 7
     
  • Petr Kuzel
    Petr Kuzel
    2003-03-20

    Logged In: YES
    user_id=386690

    Following code contructs Piccolo instance:

    getParser(false);

    where getParser looks like:

    private Parser getParser(boolean validate) throws
    SAXException, ParserConfigurationException,
    FactoryConfigurationError {
    Parser parser;
    SAXParserFactory factory =
    SAXParserFactory.newInstance ();
    factory.setValidating (validate);
    factory.setNamespaceAware(false);

    parser = factory.newSAXParser ().getParser ();

    if (parser == null) {
    throw new InternalError
    (NbBundle.getMessage(DefaultAttributes.class,"EXC_UnreachableCode"));
    }
    // create document handler and register it
    //parser.setEntityResolver(entityRes);

    parser.setEntityResolver(this);
    parser.setDocumentHandler(this);//before new
    InnerParser() - now this
    parser.setErrorHandler(this);

    return parser;
    }

     
  • Petr Kuzel
    Petr Kuzel
    2003-03-20

    Logged In: YES
    user_id=386690

    this EntityResolver looks like:

    public InputSource resolveEntity(java.lang.String
    pid,java.lang.String sid) throws SAXException {
    if (pid != null && pid.equals(publicId))
    return new
    InputSource(getClass().getClassLoader().getResource(DTD_PATH).toExternalForm());

    return new InputSource (sid);
    }

    so may be the pid is somehow broken.

     
  • Yuval Oren
    Yuval Oren
    2004-07-11

    • assigned_to: nobody --> yuvalo
    • status: open --> closed-fixed
     
  • Yuval Oren
    Yuval Oren
    2004-07-11

    Logged In: YES
    user_id=479054

    This bug has been fixed in the latest release. If you find it's
    still a problem, please re-open or submit a new bug.