users@jaxb.java.net

UnmarshallException, unexpected attributes, inconsistent generate d classes across namespaces.

From: Poccachard, Ian AG <ian.poccachard_at_rolls-royce.com>
Date: Fri, 5 Dec 2003 16:24:57 -0000

Hi Guys..

I have two schemas A and B each in their own namespace that both
extend a third schema C also in its own name space.

I run the jaxb ant task on each schema A and B separately. In each
case the local classes are generated for elements in schema A and B
as well as all the classes for elements defined in the common schema C.
I would expect the two copies of the C schema defined jaxb classes to
be the same and also identical to the classes generated from schema C
on its own. This is not the case

I paid the XXXTypeImpl.Unmarshaller's enterAttribute(java.lang.String
___uri, ...)
method particular attention across the generated classes and will gladly
ellaborate later in this thread if needs be.


Help much appreciated, this one has really got us pulling out hair.. *smile*

Best Regards

Ian


Question:
---------

Is this a known problem?

Is it related in some way to the the bug mentioned
back in April 2003 - I am using JAXB RI 1.0.2
https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgId=11453?

if not I can hack a cut down set of my schema files that recreates
this 'bug' for you.

More Info:
----------------

I am running from jwsdp-1.3, and my Ant task was run from outside my
Netbeans IDE (you will see that crimson is implicated later).
jaxb-xjc.jar manifest starts.

Manifest-Version: 1.0
Sealed: true
Implementation-Version: 1.0.2
Specification-Title: Java Architecture for XML Binding
Specification-Version: 1.0
Ant-Version: Apache Ant 1.5.2
Implementation-Title: JAXB Reference Implementation
Main-Class: com.sun.tools.xjc.Driver
Extension-Name: com.sun.tools.xjc
Created-By: 1.4.1_02-b06 (Sun Microsystems Inc.)


when I try to unmarshall a correct xml file
(albeit from within my IDE's JVM hence crimson)
I get the following error.

DefaultValidationEventHandler: [FATAL_ERROR]: Unexpected attribute {}:id
     Location: line 3 of
file:/Q:/PerformanceKeySystem/modules/build/antUtilities/oc.oc
javax.xml.bind.UnmarshalException: Unexpected attribute {}:id
        at
com.rr.gks.core.xmlmap.impl.runtime.SAXUnmarshallerHandlerImpl.handleEvent(S
AXUnmarshallerHandlerImpl.java:551)
        at
com.rr.gks.core.xmlmap.impl.runtime.AbstractUnmarshallingEventHandlerImpl.re
portError(AbstractUnmarshallingEventHandlerImpl.java:148)
        at
com.rr.gks.core.xmlmap.impl.runtime.AbstractUnmarshallingEventHandlerImpl.re
portError(AbstractUnmarshallingEventHandlerImpl.java:145)
        at
com.rr.gks.core.xmlmap.impl.runtime.AbstractUnmarshallingEventHandlerImpl.un
expectedEnterAttribute(AbstractUnmarshallingEventHandlerImpl.java:165)
        at
com.rr.gks.core.xmlmap.impl.runtime.AbstractUnmarshallingEventHandlerImpl.en
terAttribute(AbstractUnmarshallingEventHandlerImpl.java:98)
        at
com.rr.gks.core.xmlmap.impl.SetPIImpl$Unmarshaller.enterAttribute(SetPIImpl.
java:197)
        at
com.rr.gks.core.xmlmap.impl.runtime.AbstractUnmarshallingEventHandlerImpl.sp
awnHandlerFromEnterAttribute(AbstractUnmarshallingEventHandlerImpl.java:294)
        at
com.rr.pks.modules.ocviewer.xmlmap.impl.OcSetPIImpl$Unmarshaller.enterAttrib
ute(Unknown Source)
        at
com.rr.gks.core.xmlmap.impl.runtime.SAXUnmarshallerHandlerImpl.consumeAttrib
ute(SAXUnmarshallerHandlerImpl.java:445)
        at
com.rr.pks.modules.ocviewer.xmlmap.impl.OcSetPIImpl$Unmarshaller.enterElemen
t(Unknown Source)
        at
com.rr.pks.modules.ocviewer.xmlmap.impl.OcSetElementImpl$Unmarshaller.enterE
lement(Unknown Source)
        at
com.rr.gks.core.xmlmap.impl.runtime.SAXUnmarshallerHandlerImpl.startElement(
SAXUnmarshallerHandlerImpl.java:134)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1635)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at
com.rr.gks.core.xmlmap.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerI
mpl.java:142)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshall
erImpl.java:131)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshall
erImpl.java:136)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshall
erImpl.java:145)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshall
erImpl.java:163)



The data contained in, or attached to, this e-mail, may contain confidential
information. If you have received it in error you should notify the sender
immediately by reply e-mail, delete the message from your system and contact
+44(0)1332 242424 (the Rolls-Royce IT Security Director) if you need
assistance. Please do not copy it for any purpose, or disclose its contents
to any other person.

An e-mail response to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.

(c) 2003 Rolls-Royce plc

Registered office: 65 Buckingham Gate, London SW1E 6AT
Company number: 1003142. Registered in England.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net