Thanks dennisbyme,
well, i'm trying to load only one class, so to isolate the error, what is strage is that, having two sessionfactoryS, my program do the same (configure hib) twice.. what i mean is that the first time it works.. the second it doesn't!
I'll past the log.. entire! Thanks for the help given me, i relly need to fix it :)
Code:
25-set-2005 14.03.45 org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0.5
25-set-2005 14.03.45 org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
25-set-2005 14.03.45 org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
25-set-2005 14.03.45 org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
25-set-2005 14.03.45 org.hibernate.cfg.Configuration addClass
INFO: Mapping resource: Pet.hbm.xml
25-set-2005 14.03.45 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: Pet -> PET
25-set-2005 14.03.45 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing extends queue
25-set-2005 14.03.45 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing collection mappings
25-set-2005 14.03.45 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing association property references
25-set-2005 14.03.45 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
25-set-2005 14.03.46 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
25-set-2005 14.03.46 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
25-set-2005 14.03.46 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
25-set-2005 14.03.46 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/e1
25-set-2005 14.03.46 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=root, password=****}
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 4.1.13a-Debian_3-log
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.10 ( $Date: 2005/05/19 15:52:23 $, $Revision: 1.1.2.2 $ )
25-set-2005 14.03.46 org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQLDialect
25-set-2005 14.03.46 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
25-set-2005 14.03.46 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: null
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
25-set-2005 14.03.46 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
25-set-2005 14.03.46 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
25-set-2005 14.03.46 org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
25-set-2005 14.03.46 net.sf.ehcache.config.Configurator configure
AVVERTENZA: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/root/workspace/JaMigator/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
25-set-2005 14.03.46 org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
25-set-2005 14.03.46 org.hibernate.impl.SessionFactoryImpl checkNamedQueries
INFO: Checking 0 named queries
25-set-2005 14.03.47 org.hibernate.cfg.Configuration addClass
INFO: Mapping resource: it/demarch/EE/test/Pet.hbm.xml
25-set-2005 14.03.47 org.hibernate.cfg.Configuration add
GRAVE: Could not compile the mapping document
org.hibernate.MappingException: duplicate import: it.demarch.EE.test.Pet
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.addInputStream(Configuration.java:400)
at org.hibernate.cfg.Configuration.addClass(Configuration.java:468)
at onfigure(Hiberonfiguration.java:32)
at iigrate(Migtor.java:24)
at igrate(Metrator.java:23)
attionPerformed(Migtion.java:19)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Exception: [Error reading resource: Pet.hbm.xml][org.hibernate.MappingException: duplicate import: Pet]25-set-2005 14.03.47 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing extends queue
25-set-2005 14.03.47 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing collection mappings
25-set-2005 14.03.47 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing association property references
25-set-2005 14.03.47 org.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
25-set-2005 14.03.47 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
25-set-2005 14.03.47 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
25-set-2005 14.03.47 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
25-set-2005 14.03.47 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/e2
25-set-2005 14.03.47 org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=root, password=****}
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 4.1.13a-Debian_3-log
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.10 ( $Date: 2005/05/19 15:52:23 $, $Revision: 1.1.2.2 $ )
25-set-2005 14.03.47 org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQLDialect
25-set-2005 14.03.47 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
25-set-2005 14.03.47 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: null
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
25-set-2005 14.03.47 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
25-set-2005 14.03.47 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
25-set-2005 14.03.47 org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
25-set-2005 14.03.47 org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
25-set-2005 14.03.47 org.hibernate.impl.SessionFactoryImpl checkNamedQueries
INFO: Checking 0 named queries
ImpossibleMigrationException: Impossible to carry out the migration.
at or.migrate(Metrator.java:25)
at actionPerformed(Migrction.java:19)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)