Issue Details (XML | Word | Printable)

Key: XMLBEANS-293
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Daniel Harvey
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
XMLBeans

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

Created: 15/Oct/06 01:27 PM   Updated: 04/Nov/09 04:07 AM
Return to search
Component/s: XmlObject
Affects Version/s: Version 2.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Linux elvandar 2.6.15-27-686 #1 SMP PREEMPT Sat Sep 16 02:13:27 UTC 2006 i686 GNU/Linux
java version "1.4.2_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_12-b03)
Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)


 Description  « Hide
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!

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Wing Yew Poon added a comment - 26/Oct/09 06:33 PM
Daniel, I know it has been a long time since you opened this bug, but if you could attach the reproducer (schemas, test program, specific steps), that would help in resolving this bug.
 

Daniel Harvey added a comment - 04/Nov/09 04:07 AM
Will do, I'm quite busy for the next week but will get a full test case submitted.