H3 pb with collection-id idbag subtag
-------------------------------------
Key: XDT-1660
URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1660
Project: XDoclet
Type: Bug
Components: Hibernate Module
Versions: 1.3
Environment: Java EE 5, AppFuse, Hibernate 3.0, Windows 2000 / XP
Reporter: Fantz DEGRIGNY
Assigned to: xdoclet-devel (Use for new issues)
Hello,
I have to define an Hibernate 3 idbag mapping using XDoclet. (I'm using the
AppFuse starter).
As the XDoclet 1.2 does not suply this tag.
I have download the XDoclet 1.3 sources snapshot and compiled these sources.
Ok, now, my XDoclet version supports the idbag tag.
And then I ran into a funny problem with the 'collection-id' sub-tag. Let me
describe it :
This is my mapping declaration :
/**
* @hibernate.idbag name="elemList" fetch="select" cascade="all-delete-orphan"
* table="ACCES_PRESTA" inverse="false"
* @hibernate.collection-id column="ELEMS_ID" generator="sequence" type="long"
* @hibernate.key column="ELEM_USER_ID"
* @hibernate.composite-element class="com.foo.model.Elements"
*/
public List getElemList() {
return this.elemList;
}
I ran XDoclet and obtained the following error :
org.xml.sax.SAXParseException: The content of element type "collection-id" is
incomplete, it must match "(meta*,column*,generator)".
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at xdoclet.util.XmlValidator.doValidate(XmlValidator.java:271)
at xdoclet.util.XmlValidator.validate(XmlValidator.java:221)
...
As it described in the previous error message, I removed the "type" attribute
(which it seems strangely to be not allowed within the collection-ig tag),
but I get the following error (which is a contradiction with the first one)
org.xml.sax.SAXParseException: Attribute "type" is required and must be
specified for element type "collection-id".
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at xdoclet.util.XmlValidator.doValidate(XmlValidator.java:271)
at xdoclet.util.XmlValidator.validate(XmlValidator.java:221)
...
So, I'm a little confused and I suppose this is a bug.
--
Frantz
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel