org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id".

Hibernate JIRA | sudhir srinivasan | 1 decade ago
  1. 0

    I am trying to use hbm2java with middlegen generated hbm.xml files This is my build file task foor hgm2java. <target name="hbm2java" depends="middlegen" description="Generate .java from .hbm files."> <echo>running a search</echo> <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="hbm2java.class.path" > <arg value="--output=${build.classes.dir}"/> <arg value="--config=${basedir}/hbm2java.xml"/> <arg value="${build.dir}/gen-src/airline/hibernate/Channel.hbm.xml"/> </java> </target> Here is the file generated by middlegen . <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="airline.hibernate.Channel" table="channels" > <!-- simple properties --> <id generator-class="assigned" name="channelId" type="int" column="channel_id" not-null="true" length="3" > <property name="description" type="java.lang.String" column="description" length="255" > <property name="hits" type="int" column="hits" length="1" > <property name="lastUpdated" type="java.sql.Timestamp" column="last_updated" length="19" > <property name="site" type="java.lang.String" column="site" length="255" > <property name="creator" type="java.lang.String" column="creator" length="255" > <property name="publisher" type="java.lang.String" column="publisher" length="255" > <!-- associations --> </class> </hibernate-mapping> here is error [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "generator-class" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(68) [java] org.xml.sax.SAXParseException: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] org.jdom.JDOMException: Error on line 68 of document file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536)

    Hibernate JIRA | 1 decade ago | sudhir srinivasan
    org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id".
  2. 0

    I am trying to use hbm2java with middlegen generated hbm.xml files This is my build file task foor hgm2java. <target name="hbm2java" depends="middlegen" description="Generate .java from .hbm files."> <echo>running a search</echo> <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="hbm2java.class.path" > <arg value="--output=${build.classes.dir}"/> <arg value="--config=${basedir}/hbm2java.xml"/> <arg value="${build.dir}/gen-src/airline/hibernate/Channel.hbm.xml"/> </java> </target> Here is the file generated by middlegen . <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="airline.hibernate.Channel" table="channels" > <!-- simple properties --> <id generator-class="assigned" name="channelId" type="int" column="channel_id" not-null="true" length="3" > <property name="description" type="java.lang.String" column="description" length="255" > <property name="hits" type="int" column="hits" length="1" > <property name="lastUpdated" type="java.sql.Timestamp" column="last_updated" length="19" > <property name="site" type="java.lang.String" column="site" length="255" > <property name="creator" type="java.lang.String" column="creator" length="255" > <property name="publisher" type="java.lang.String" column="publisher" length="255" > <!-- associations --> </class> </hibernate-mapping> here is error [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "generator-class" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(68) [java] org.xml.sax.SAXParseException: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] org.jdom.JDOMException: Error on line 68 of document file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536)

    Hibernate JIRA | 1 decade ago | sudhir srinivasan
    org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id".
  3. 0

    GitHub comment 41#35286915

    GitHub | 3 years ago | aura-automation
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'teamcity-agent-plugin'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IntelliJ have not safe project write algoritm

    YouTrack | 1 decade ago
    org.xml.sax.SAXParseException: Premature end of file.
  6. 0

    Handle plugin loading errors more gracefully

    YouTrack | 7 years ago
    org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'requrements'. One of '{requirements, deployment}' is expected.

  1. rp 1 times, last 3 weeks ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.xml.sax.SAXParseException

    Attribute "not-null" must be declared for element type "id".

    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException()
  2. Xerces2-j
    AbstractSAXParser.parse
    1. org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    2. org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    3. org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    4. org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    5. org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)
    6. org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
    7. org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    8. org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    9. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    10. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    11. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    12. org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    13. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    14. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    14 frames
  3. jOpenDocument
    SAXBuilder.build
    1. org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
    2. org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
    3. org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
    3 frames
  4. net.sf.hibernate
    CodeGenerator.main
    1. net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93)
    1 frame
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:324)
    4 frames
  6. Ant
    Project.executeTargets
    1. org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208)
    2. org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150)
    3. org.apache.tools.ant.taskdefs.Java.run(Java.java:443)
    4. org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163)
    5. org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
    6. org.apache.tools.ant.Task.perform(Task.java:341)
    7. org.apache.tools.ant.Target.execute(Target.java:309)
    8. org.apache.tools.ant.Target.performTasks(Target.java:336)
    9. org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    10. org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    10 frames
  7. org.eclipse.ant
    InternalAntRunner.run
    1. org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
    2. org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
    2 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:324)
    4 frames
  9. Ant Build Tool Core
    AntRunner.run
    1. org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
    1 frame
  10. org.eclipse.ui
    AntLaunchDelegate$1.run
    1. org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
    1 frame
  11. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:536)
    1 frame