É o seguinte estou com um projeto no netbeans e esta funcionado beleza, ai quando vou usar no eclipse da um erro. É tudo igual mesmas bibliotecas e tal.
Erro:
[color=red]
6 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.4-Final
87 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.4-Final
95 [main] INFO org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.hbm2dll.auto=create, hibernate.pool_size=2, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.dialect=org.hibernate.dialect.MySQLDialect, hibernate.format_sql=true, hibernate.connection.username=root, hibernate.connection.url=jdbc:mysql://localhost/hibernateanotations, hibernate.bytecode.use_reflection_optimizer=false, hibernate.show_sql=true, hibernate.connection.password=****}
100 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
113 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
361 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
421 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
655 [main] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: Pessoa
Exception in thread “main” java.lang.NoClassDefFoundError: javax/persistence/Cacheable
at org.hibernate.cfg.AnnotationBinder.determineCacheSettings(AnnotationBinder.java:953)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:596)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:636)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:359)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:838)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at CreateTables.main(CreateTables.java:13)
Caused by: java.lang.ClassNotFoundException: javax.persistence.Cacheable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 8 more
[/color]