Error in reverse generating entity class from database table using hibernate
14:46:04,104 ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(31) The content of element type "hibernate-reverse-engineering" must match "(schema-selection*,type-mapping?,table-filter*,table*)".
14:46:04,107 ERROR org.hibernate.cfg.reveng.OverrideRepository - Could not configure overrides from file: E:\zxworkspace\src\main\resources\reveng.xml
org.hibernate.MappingException: invalid override definition
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRepository.java:143)
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepository.java:110)
at org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration.loadRevengFile(JDBCComponentConfiguration.java:86)
at org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration.doConfiguration(JDBCComponentConfiguration.java:40)
at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:56)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.configureExporter(HibernateExporterMojo.java:200)
at org.codehaus.mojo.hibernate3.exporter.Hbm2JavaGeneratorMojo.configureExporter(Hbm2JavaGeneratorMojo.java:64)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExporterMojo.java:273)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:152)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 33; The content of element type "hibernate-reverse-engineering" must match "(schema-selection*,type-mapping?,table-filter*,table*)".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRepository.java:142)
... 29 more
My reason for reporting an error: I used to have two classes with entity classes, and then I was still generating them. After that, I deleted the configuration of these two reverse generated classes, and only configured those that had not been generated
I didn’t confirm whether there was a problem with the class before or my configuration. I checked my configuration many times, but I didn’t find any problem. I’ll follow up if I encounter it next time.
Read More:
- How to Fix error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarE
- nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property
- org.springframework.orm . hibernate3. Hibernatequeryexception: XXX is not mapped solution
- [Solved] No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no propert
- Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign
- Type definition error – one of the causes of type definition errors is WM in Oracle_ Concat function usage
- Override the equals method and override the toString method
- Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
- Error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- @Solution to override error
- solve org.apache.ibatis . binding.BindingException : invalid bound statement (not found)
- The solution of Hibernate query returning all null lists
- Error: no override found for ‘vtkRayCastImageDisplayHelper’.
- The solution of multiple markers at this line @ override
- How to call stored procedure in Hibernate
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.dao.UserDao
- Solution to error reporting in Java @ override
- Error: no override found for ‘vtkPolyDataMapper’.
- [PCL + QT + vs] no override found for ‘vtkrenderwindow’ error resolution