hi,
(this continues the 2nd part of a message originally posted as "ENTITY
resolving and (separate) problems with Xerces?")
I've investigated further the validation message that seems to be
incorrectly saying that an element has ended unexpectedly.
To recapp I have an element named VARIETY that contains 1 or more VAR
elements which have no content, only attributes. Looking in the
generated source file
VARIETYTypeImpl.java shows that there is a routine
public void leaveElement(java.lang.String ___uri, java.lang.String
___local, java.lang.String ___qname)
throws org.xml.sax.SAXException
which contains a switch
case 13 :
attIdx = context.getAttribute("", "n");
if (attIdx >= 0) {
context.consumeAttribute(attIdx);
context.getCurrentHandler().leaveElement(___uri, ___local, ___qname);
return ;
}
break;
where it looks like its doing something with an attribute "n". As the
VARIETY element doesn't have an attribute "n" I was wondering if this
might be an indication of an error somewhere? (the VAR element does have
a "n" attribute)
thanks,
Andrew
-----Original Message-----
From: Andrew Ferguson
Sent: 06 September 2004 13:38
To: 'users_at_jaxb.dev.java.net'
Subject: RE: Re: ENTITY resolving and (separate) problems with Xerces?
hi,
>> (2) Problems with Xerces (?)
>>
>> When using Xerces as a validating or non-validating parser I'm
>> getting an error message saying
>>
>> "Unexpected end of element {}:VAR"
>
> Do you have the stack trace of the error?
yes -
com.arm.dragonfly.ui.UserVisibleException: XML Parsing Exception
File: Tr(C\N\V\R\product.xml, P(Y:\i2work\test\collect\sourceTwo,
product.xml))
Line: 8
Message: Unexpected end of element {}:VAR
at com.arm.dragonfly.ui.Main.main(Main.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.arm.dragonfly.ui.Launcher.main(Launcher.java:56)
Caused by: com.arm.dragonfly.wh.XMLParsingException: Unexpected end of
element {}:VAR
at
com.arm.dragonfly.wh.jaxb.WXMLUtil$EThrowingHandler.handleEvent(WXMLUtil
.java:41)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.SAXUnmarshallerHandlerImpl.h
andleEvent(SAXUnmarshallerHandlerImpl.java:561)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.AbstractUnmarshallingEventHa
ndlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:140)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.AbstractUnmarshallingEventHa
ndlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:137)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.AbstractUnmarshallingEventHa
ndlerImpl.unexpectedLeaveElement(AbstractUnmarshallingEventHandlerImpl.j
ava:154)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.AbstractUnmarshallingEventHa
ndlerImpl.leaveElement(AbstractUnmarshallingEventHandlerImpl.java:64)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.VARIETYTypeImpl$Unmarshaller.leaveEl
ement(VARIETYTypeImpl.java:440)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.SAXUnmarshallerHandlerImpl.e
ndElement(SAXUnmarshallerHandlerImpl.java:140)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(
AbstractSAXParser.java:585)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emp
tyElement(AbstractXMLDocumentParser.java:221)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement
(XMLDTDValidator.java:820)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canStartElement(XMLDocumentFragmentScannerImpl.java:839)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
ragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:15
63)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFragmentScannerImpl.java:341)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:828)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:758)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
actSAXParser.java:1178)
at
com.arm.dragonfly.wh.jaxb.wxml.impl.runtime.UnmarshallerImpl.unmarshal(U
nmarshallerImpl.java:140)
at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmars
hallerImpl.java:114)
at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmars
hallerImpl.java:97)
at
com.arm.dragonfly.wh.jaxb.JAXBRootCache.fetch(JAXBRootCache.java:135)
at
com.arm.dragonfly.wh.jaxb.JAXBOperations.getComponents(JAXBOperations.ja
va:55)
at
com.arm.dragonfly.wh.DefaultOperations.getComponentsMatching(DefaultOper
ations.java:86)
at com.arm.dragonfly.wh.tool.Collect.execute(Collect.java:110)
at
com.arm.dragonfly.ui.WarehouseTools.handleCommandLine(WarehouseTools.jav
a:153)
at com.arm.dragonfly.ui.Main.mainImpl(Main.java:153)
at com.arm.dragonfly.ui.Main.main(Main.java:58)
... 5 more
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net