Hi, did you solve the problem? I tried the same and got the same error...
thx for any reply
output:
Code:
16:56:25,867 INFO Version:15 - Hibernate Annotations 3.4.0.CR2
16:56:25,889 INFO Environment:543 - Hibernate 3.3.0.GA
16:56:25,894 INFO Environment:576 - hibernate.properties not found
16:56:25,901 INFO Environment:709 - Bytecode provider name : javassist
16:56:25,909 INFO Environment:627 - using JDK 1.4 java.sql.Timestamp handling
16:56:26,007 INFO Version:14 - Hibernate Commons Annotations 3.1.0.CR2
16:56:26,011 INFO Configuration:1460 - configuring from resource: /hibernate.cfg.xml
16:56:26,012 INFO Configuration:1437 - Configuration resource: /hibernate.cfg.xml
16:56:26,146 INFO Configuration:1575 - Configured SessionFactory: null
16:56:26,147 DEBUG InitSessionFactory:41 - add class - cfg.addAnnotatedClass(Terrarium.class);
16:56:26,166 INFO HibernateSearchEventListenerRegister:53 - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
16:56:26,271 INFO AnnotationConfiguration:369 - Hibernate Validator not found: ignoring
16:56:26,278 INFO DriverManagerConnectionProvider:64 - Using Hibernate built-in connection pool (not for production use!)
16:56:26,278 INFO DriverManagerConnectionProvider:65 - Hibernate connection pool size: 20
16:56:26,281 INFO DriverManagerConnectionProvider:68 - autocommit mode: false
16:56:26,301 INFO DriverManagerConnectionProvider:103 - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/testdb
16:56:26,302 INFO DriverManagerConnectionProvider:109 - connection properties: {user=testuser, password=****}
16:56:26,449 INFO SettingsFactory:116 - RDBMS: PostgreSQL, version: 8.3.3
16:56:26,450 INFO SettingsFactory:117 - JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.3 JDBC3 with SSL (build 603)
16:56:26,468 INFO Dialect:175 - Using dialect: org.hibernate.dialect.PostgreSQLDialect
16:56:26,533 INFO TransactionFactoryFactory:62 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
16:56:26,536 INFO TransactionManagerLookupFactory:80 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:56:26,536 INFO SettingsFactory:170 - Automatic flush during beforeCompletion(): disabled
16:56:26,540 INFO SettingsFactory:174 - Automatic session close at end of transaction: disabled
16:56:26,541 INFO SettingsFactory:181 - JDBC batch size: 15
16:56:26,542 INFO SettingsFactory:184 - JDBC batch updates for versioned data: disabled
16:56:26,543 INFO SettingsFactory:189 - Scrollable result sets: enabled
16:56:26,543 INFO SettingsFactory:197 - JDBC3 getGeneratedKeys(): disabled
16:56:26,544 INFO SettingsFactory:205 - Connection release mode: auto
16:56:26,545 INFO SettingsFactory:232 - Default batch fetch size: 1
16:56:26,546 INFO SettingsFactory:236 - Generate SQL with comments: disabled
16:56:26,546 INFO SettingsFactory:240 - Order SQL updates by primary key: disabled
16:56:26,546 INFO SettingsFactory:244 - Order SQL inserts for batching: disabled
16:56:26,547 INFO SettingsFactory:420 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:56:26,555 INFO ASTQueryTranslatorFactory:47 - Using ASTQueryTranslatorFactory
16:56:26,556 INFO SettingsFactory:252 - Query language substitutions: {}
16:56:26,557 INFO SettingsFactory:257 - JPA-QL strict compliance: disabled
16:56:26,557 INFO SettingsFactory:262 - Second-level cache: enabled
16:56:26,557 INFO SettingsFactory:266 - Query cache: disabled
16:56:26,562 INFO SettingsFactory:405 - Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
16:56:26,562 INFO RegionFactoryCacheProviderBridge:61 - Cache provider: org.hibernate.cache.EhCacheProvider
16:56:26,569 INFO SettingsFactory:276 - Optimize cache for minimal puts: disabled
16:56:26,569 INFO SettingsFactory:285 - Structured second-level cache entries: disabled
16:56:26,580 INFO SettingsFactory:314 - Statistics: disabled
16:56:26,580 INFO SettingsFactory:318 - Deleted entity synthetic identifier rollback: disabled
16:56:26,582 INFO SettingsFactory:333 - Default entity-mode: pojo
16:56:26,582 INFO SettingsFactory:337 - Named query checking : enabled
16:56:26,707 INFO SessionFactoryImpl:187 - building session factory
16:56:26,739 DEBUG CacheManager:239 - Configuring ehcache from classpath.
16:56:26,745 WARN ConfigurationFactory:127 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/adi/workspace/jars/hibernate/ehcache-1.2.3.jar!/ehcache-failsafe.xml
16:56:26,746 DEBUG ConfigurationFactory:87 - Configuring ehcache from URL: jar:file:/home/adi/workspace/jars/hibernate/ehcache-1.2.3.jar!/ehcache-failsafe.xml
16:56:26,747 DEBUG ConfigurationFactory:139 - Configuring ehcache from InputStream
16:56:26,773 DEBUG DiskStoreConfiguration:65 - Disk Store Path: /tmp
16:56:26,789 DEBUG ConfigurationHelper:208 - No CacheManagerEventListenerFactory class specified. Skipping...
16:56:26,790 DEBUG ConfigurationHelper:183 - No CachePeerListenerFactoryConfiguration specified. Not configuring a CacheManagerPeerListener.
16:56:26,790 DEBUG ConfigurationHelper:159 - No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider.
16:56:26,802 DEBUG ConfigurationHelper:135 - No BootstrapCacheLoaderFactory class specified. Skipping...
16:56:26,812 INFO SessionFactoryObjectFactory:105 - Not binding factory to JNDI, no JNDI name configured
16:56:26,854 INFO SchemaExport:226 - Running hbm2ddl schema export
16:56:26,855 INFO SchemaExport:251 - exporting generated schema to database
16:56:26,873 INFO SchemaExport:268 - schema export complete
Exception in thread "main" org.hibernate.MappingException: Unknown entity: de.budisantoso.test.Terrarium
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:580)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1365)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)
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:597)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
at $Proxy5.save(Unknown Source)
at de.budisantoso.test.RunHibernateTest.createTerrarium(RunHibernateTest.java:40)
at de.budisantoso.test.RunHibernateTest.main(RunHibernateTest.java:21