Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-293

Stacktrace printed to System.err when instantiating elements from on-the-fly compiled schemas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Version 2.2
    • None
    • XmlObject
    • None

    Description

      I have compiled a SchemaTypeSystem using one of the XmlBeans.compileXsd() methods. The schema being compiled contains elements which extend elements which have been pre-compiled (and therefore have JARs in the classpath).

      When attempting to parse and then instantiate an XML instance, the following exception is printed to System.err:

      java.lang.NoSuchMethodException: idelve.schemas.ogc.gml212.impl.AbstractFeatureTypeImpl.<init>(org.apache.xmlbeans.SchemaType, boolean)
      at java.lang.Class.getConstructor0(Class.java:1937)
      at java.lang.Class.getDeclaredConstructor(Class.java:1301)
      at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getJavaImplConstructor2(SchemaTypeImpl.java:1748)
      at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedSubclass(SchemaTypeImpl.java:1885)
      at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1874)
      at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1021)
      at org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:893)
      at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
      at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1652)
      at org.apache.xmlbeans.impl.store.Cur.getUser(Cur.java:2654)
      at org.apache.xmlbeans.impl.store.Cur.getObject(Cur.java:2647)
      at org.apache.xmlbeans.impl.store.Cursor._getObject(Cursor.java:995)
      at org.apache.xmlbeans.impl.store.Cursor.getObject(Cursor.java:2904)
      at test.featureCollection(test.java:411)
      at test.main(test.java:500)

      The program works, but is hampered by excessive output to System.err.

      The constructor containing the second boolean does not exist.

      I've review the XmlBeans source code but have been able to determine if:

      (a) The problem is simply that the stack trace is printed, or

      (b) That the missing constructor is actally a problem in itself.

      The class SchemaTypeImpl does not contain excessive documentation, and I've not been able to determine this for myself, but I believe that this should not occur. For now, I have commented out the stacktrace at line 1752 of src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java .

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            danielharvey Daniel Harvey
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: