org.hibernate.MappingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When generating from an existing database, I perform the following. 1. Output Directory: DataAccess\src 2. Check Reverse engineer from JDBC Connection 3. Define Package com.llic.business 4. Check generate domain code 4.1 (optional, check EJB3/JSR-220 Annotations. This fails checked and unchecked. 5. Check Generate Mappings Stack Trace [code] !ENTRY org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-03-04 14:43:22.858 !MESSAGE Error under artifact generation !STACK 0 org.hibernate.MappingException: duplicate import: com.llic.business.Userauth at org.hibernate.cfg.Mappings.addImport(Mappings.java:99) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:180) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:123) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105) !SUBENTRY 1 org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-03-04 14:43:22.858 !MESSAGE duplicate import: com.llic.business.Userauth !STACK 0 org.hibernate.MappingException: duplicate import: com.llic.business.Userauth at org.hibernate.cfg.Mappings.addImport(Mappings.java:99) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:180) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:123) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105) !SUBENTRY 2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-03-04 14:43:22.858 !MESSAGE duplicate import: com.llic.business.Userauth !STACK 0 org.hibernate.MappingException: duplicate import: com.llic.business.Userauth at org.hibernate.cfg.Mappings.addImport(Mappings.java:99) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:180) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:123) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105) [/code]
    via by Todd Nine,
  • When generating from an existing database, I perform the following. 1. Output Directory: DataAccess\src 2. Check Reverse engineer from JDBC Connection 3. Define Package com.llic.business 4. Check generate domain code 4.1 (optional, check EJB3/JSR-220 Annotations. This fails checked and unchecked. 5. Check Generate Mappings Stack Trace [code] !ENTRY org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-03-04 14:43:22.858 !MESSAGE Error under artifact generation !STACK 0 org.hibernate.MappingException: duplicate import: com.llic.business.Userauth at org.hibernate.cfg.Mappings.addImport(Mappings.java:99) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:180) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:123) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105) !SUBENTRY 1 org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-03-04 14:43:22.858 !MESSAGE duplicate import: com.llic.business.Userauth !STACK 0 org.hibernate.MappingException: duplicate import: com.llic.business.Userauth at org.hibernate.cfg.Mappings.addImport(Mappings.java:99) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:180) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:123) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105) !SUBENTRY 2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-03-04 14:43:22.858 !MESSAGE duplicate import: com.llic.business.Userauth !STACK 0 org.hibernate.MappingException: duplicate import: com.llic.business.Userauth at org.hibernate.cfg.Mappings.addImport(Mappings.java:99) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:180) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:123) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105) [/code]
    via by Todd Nine,
  • Error reading resource: hbm.xml file
    via by S.R.K.Vivek Raju,
    • org.hibernate.MappingException: duplicate import: com.plumtree.analytics.core.persist.BaseCustomEventFact$$BeanGeneratorByCGLIB$$6a896b0d at org.hibernate.cfg.Mappings.addImport(Mappings.java:105) at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:541) at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:488) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:234) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:152) at org.hibernate.cfg.Configuration.add(Configuration.java:362) at org.hibernate.cfg.Configuration.addXML(Configuration.java:317) at com.plumtree.analytics.core.HibernateUtil.loadEventMappings(HibernateUtil.java:796) at com.plumtree.analytics.core.HibernateUtil.loadEventMappings(HibernateUtil.java:652) at com.plumtree.analytics.core.HibernateUtil.refreshCustomEvents(HibernateUtil.java:496) at com.plumtree.analytics.ui.common.AnalyticsInitServlet.init(AnalyticsInitServlet.java:104) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.plumtree.container.Bootstrap.start(Bootstrap.java:531) at com.plumtree.container.Bootstrap.main(Bootstrap.java:254) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:238) at java.lang.Thread.run(Thread.java:595)
    No Bugmate found.