[b]Hibernate version:3.1[/b]
[b]Full stack trace of any exception that occurs:[hibernatedoclet] org.xml.sax.SAXParseException: Attribute "lazy" with value "extra" must have a value from the list "true false ".
[hibernatedoclet] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[hibernatedoclet] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribute(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[hibernatedoclet] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[hibernatedoclet] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[hibernatedoclet] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[hibernatedoclet] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[hibernatedoclet] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[hibernatedoclet] at xdoclet.util.XmlValidator.doValidate(XmlValidator.java:271)
[hibernatedoclet] at xdoclet.util.XmlValidator.validate(XmlValidator.java:221)
[hibernatedoclet] at xdoclet.XmlSubTask.engineFinished(XmlSubTask.java:310)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:575)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:802)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:690)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:607)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:249)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:137)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:49)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:105)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatedoclet] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatedoclet] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[hibernatedoclet] D:\_eclipse_wks\myApp\build.xml:289: XDoclet failed.
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:471)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:105)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatedoclet] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatedoclet] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[hibernatedoclet] Caused by: xdoclet.XDocletException: Generated file [file:D:/_eclipse_wks/myApp/build/dao/gen/com/myPackage/model/MyPojo.hbm.xml:line 85] Message=[Attribute "lazy" with value "extra" must have a value from the list "true false ".] is not valid according to its DTD or XML Schema. This might be due to some missing tags in your source.
[hibernatedoclet] at xdoclet.util.XmlValidator.doValidate(XmlValidator.java:277)
[hibernatedoclet] at xdoclet.util.XmlValidator.validate(XmlValidator.java:221)
[hibernatedoclet] at xdoclet.XmlSubTask.engineFinished(XmlSubTask.java:310)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:575)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:802)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:690)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:607)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:249)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:137)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:49)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] ... 12 more
[hibernatedoclet] --- Nested Exception ---
[hibernatedoclet] xdoclet.XDocletException: Generated file [file:D:/_eclipse_wks/myApp/build/dao/gen/com/myPackage/model/MyPojo.hbm.xml:line 85] Message=[Attribute "lazy" with value "extra" must have a value from the list "true false ".] is not valid according to its DTD or XML Schema. This might be due to some missing tags in your source.
[hibernatedoclet] at xdoclet.util.XmlValidator.doValidate(XmlValidator.java:277)
[hibernatedoclet] at xdoclet.util.XmlValidator.validate(XmlValidator.java:221)
[hibernatedoclet] at xdoclet.XmlSubTask.engineFinished(XmlSubTask.java:310)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:575)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:802)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:690)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:607)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:249)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:137)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:49)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:105)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatedoclet] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatedoclet] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[/b]
Hello all.
I have a problem with the automatic xdoclet generation of hbm files. Xdoclet does not recognize the extra option of lazy collection property.
I need that option because the collection is very large and in some cases I only need to get the collection size (sql count() agg function).
I'm working with appfuse, spring and hibernate and I have an Ant build file that automatically generate the hbm based on Pojo's annotation and deploy the application in Tomcat, but I can't work if xdoclet dos not support the extra option.
Anybody could help me with this problem?
thanks in advance.
Posted: Tue Aug 08, 2006 12:17 am Post subject:
Firstly - this should be posted in the tools forum.
Secondly - what version of XDoclet are you using? and it is configured for H3.0, eg, setting the version attribute.
Thirdly - its a good idea to show a small sample of the hbm output and your XDoclet markup.
|