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.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)
    No Bugmate found.