Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6382549

DSMLv2 search response service provider can't read the file that it writes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P2 P2
    • None
    • 1.2.1
    • core-libs

      1. Download the DSML v2.0 service providers from http://java.sun.com/developer/earlyAccess/jndi/

      2. Following the Echo example to get a snapshot of the tutorial.xml directory data; save it to another file, say echo.xml.

      3. Replace tutorial.xml by echo.xml (i.e. cp echo.xml tutorial.xml).

      4. Run the Echo example again, but it now throws exception:

      javax.xml.transform.TransformerException: org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create or change an object in a way which is incorrect with regard to namespaces.
              at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:469)
              at com.sun.jndi.dsmlv2.util.DsmlIoUtil.readTree(DsmlIoUtil.java:93)
              at com.sun.jndi.dsmlv2.response.DsmlResponseCtxFactory.getInitialContext(DsmlResponseCtxFactory.java:78)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
              at javax.naming.InitialContext.init(InitialContext.java:219)
              at javax.naming.InitialContext.<init>(InitialContext.java:175)
              at Echo.main(Echo.java:17)
      Caused by: org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create or change an object in a way which is incorrect with regard to namespaces.
              at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
              at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
              at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
              ... 7 more
      ---------
      org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create or change an object in a way which is incorrect with regard to namespaces.
              at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
              at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
              at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
              at com.sun.jndi.dsmlv2.util.DsmlIoUtil.readTree(DsmlIoUtil.java:93)
              at com.sun.jndi.dsmlv2.response.DsmlResponseCtxFactory.getInitialContext(DsmlResponseCtxFactory.java:78)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
              at javax.naming.InitialContext.init(InitialContext.java:219)
              at javax.naming.InitialContext.<init>(InitialContext.java:175)
              at Echo.main(Echo.java:17)
      ---------
      org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create or change an object in a way which is incorrect with regard to namespaces.
              at org.apache.crimson.tree.ElementNode2.checkArguments(ElementNode2.java:213)
              at org.apache.crimson.tree.XmlDocument.createElementNS(XmlDocument.java:844)
              at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:306)
              at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
              at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1672)
              at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
              at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
              at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
              at com.sun.jndi.dsmlv2.util.DsmlIoUtil.readTree(DsmlIoUtil.java:93)
              at com.sun.jndi.dsmlv2.response.DsmlResponseCtxFactory.getInitialContext(DsmlResponseCtxFactory.java:78)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
              at javax.naming.InitialContext.init(InitialContext.java:219)
              at javax.naming.InitialContext.<init>(InitialContext.java:175)
              at Echo.main(Echo.java:17)
      Exception in thread "main" javax.naming.ConfigurationException: DSML document missing; supply file in java.naming.provider.url property or supply DOM tree in com.sun.jndi.dsmlv2.batchResponse property.
              at com.sun.jndi.dsmlv2.response.DsmlResponseCtxFactory.getInitialContext(DsmlResponseCtxFactory.java:86)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
              at javax.naming.InitialContext.init(InitialContext.java:219)
              at javax.naming.InitialContext.<init>(InitialContext.java:175)
              at Echo.main(Echo.java:17)

      This is reproduced using JDK 1.4.2_09, but the exception could be different depending on which version of JAX* components (i.e. different versions of JDK) are used.

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: