-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Illegal Acess Error replicated to minimal case study
PostPosted: Sat Mar 24, 2007 1:06 pm 
Newbie

Joined: Wed Mar 21, 2007 1:12 pm
Posts: 19
Please try to help:

Two classes:

Code:
package mater;
import javax.persistence.*;

public class MainHibernate {

   /**
    * @param args
    */
   public M m = null;

   public MainHibernate(){
      this.m = new M();
   }
   
   public static void main(String[] args) {      
      MainHibernate mainh= new MainHibernate();
      EntityManagerFactory emf =
      Persistence.createEntityManagerFactory("mater_persistence" );//line reported by the exception
//       First unit of work
      EntityManager em = emf.createEntityManager();
      EntityTransaction tx = em.getTransaction();
      tx.begin();
      
      em.persist( mainh.m );

      tx.commit();
      em.close();
   }      
}

Code:
package mater;
import javax.persistence.*;

@Entity
@Table
class M{
   
   @Id @GeneratedValue
   private Long id;

   public M(){}

   public Long getId() {
      return id;
   }

   public void setId(Long id) {
      this.id = id;
   }
}


Output:

Code:
17:00:05,184  INFO Version:148 - Hibernate EntityManager 3.2.1.GA
17:00:05,206  INFO Version:148 - Hibernate Annotations 3.2.1.GA
17:00:05,254  INFO Environment:148 - Hibernate 3.2.2
17:00:05,259  INFO Environment:148 - hibernate.properties not found
17:00:05,261  INFO Environment:148 - Bytecode provider name : cglib
17:00:05,265  INFO Environment:148 - using JDK 1.4 java.sql.Timestamp handling
17:00:06,131  INFO AnnotationBinder:148 - Binding entity from annotated class: mater.M
17:00:06,182  INFO EntityBinder:148 - Bind entity mater.M on table M
17:00:06,572  INFO DriverManagerConnectionProvider:148 - Using Hibernate built-in connection pool (not for production use!)
17:00:06,572  INFO DriverManagerConnectionProvider:148 - Hibernate connection pool size: 20
17:00:06,573  INFO DriverManagerConnectionProvider:148 - autocommit mode: true
17:00:06,581  INFO DriverManagerConnectionProvider:148 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost
17:00:06,582  INFO DriverManagerConnectionProvider:148 - connection properties: {user=ruya, password=****, autocommit=true, release_mode=auto}
17:00:06,833  INFO SettingsFactory:148 - RDBMS: MySQL, version: 5.0.24a-Debian_9-log
17:00:06,833  INFO SettingsFactory:148 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.5 ( $Date: 2007-03-01 00:01:06 +0100 (Thu, 01 Mar 2007) $, $Revision: 6329 $ )
17:00:06,849  INFO Dialect:148 - Using dialect: org.hibernate.dialect.MySQLDialect
17:00:06,854  INFO TransactionFactoryFactory:148 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
17:00:06,856  INFO TransactionManagerLookupFactory:148 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
17:00:06,856  INFO SettingsFactory:148 - Automatic flush during beforeCompletion(): disabled
17:00:06,857  INFO SettingsFactory:148 - Automatic session close at end of transaction: disabled
17:00:06,857  INFO SettingsFactory:148 - JDBC batch size: 15
17:00:06,857  INFO SettingsFactory:148 - JDBC batch updates for versioned data: disabled
17:00:06,859  INFO SettingsFactory:148 - Scrollable result sets: enabled
17:00:06,859  INFO SettingsFactory:148 - JDBC3 getGeneratedKeys(): enabled
17:00:06,860  INFO SettingsFactory:148 - Connection release mode: auto
17:00:06,861  INFO SettingsFactory:148 - Default schema: mater
17:00:06,861  INFO SettingsFactory:148 - Maximum outer join fetch depth: 2
17:00:06,861  INFO SettingsFactory:148 - Default batch fetch size: 1
17:00:06,861  INFO SettingsFactory:148 - Generate SQL with comments: disabled
17:00:06,862  INFO SettingsFactory:148 - Order SQL updates by primary key: disabled
17:00:06,862  INFO SettingsFactory:148 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
17:00:06,864  INFO ASTQueryTranslatorFactory:148 - Using ASTQueryTranslatorFactory
17:00:06,865  INFO SettingsFactory:148 - Query language substitutions: {}
17:00:06,865  INFO SettingsFactory:148 - JPA-QL strict compliance: enabled
17:00:06,866  INFO SettingsFactory:148 - Second-level cache: enabled
17:00:06,866  INFO SettingsFactory:148 - Query cache: disabled
17:00:06,866  INFO SettingsFactory:148 - Cache provider: org.hibernate.cache.NoCacheProvider
17:00:06,868  INFO SettingsFactory:148 - Optimize cache for minimal puts: disabled
17:00:06,868  INFO SettingsFactory:148 - Structured second-level cache entries: disabled
17:00:06,874  INFO SettingsFactory:148 - Statistics: disabled
17:00:06,874  INFO SettingsFactory:148 - Deleted entity synthetic identifier rollback: disabled
17:00:06,875  INFO SettingsFactory:148 - Default entity-mode: pojo
17:00:06,876  INFO SettingsFactory:148 - Named query checking : enabled
17:00:06,921  INFO SessionFactoryImpl:148 - building session factory
Exception in thread "main" java.lang.IllegalAccessError
   at net.sf.cglib.core.ClassEmitter.setTarget(ClassEmitter.java:45)
   at net.sf.cglib.core.ClassEmitter.<init>(ClassEmitter.java:37)
   at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
   at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
   at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
   at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
   at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
   at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
   at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
   at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
   at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
   at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
   at mater.MainHibernate.main(MainHibernate.java:43)



persistence.xml

Code:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
   version="1.0">

   <persistence-unit name="mater_persistence">
       <!--
       <provider value="org.hibernate.ejb.HibernatePersistence"/>
       -->
       
        <properties>
          <!-- Scan for annotated classes and Hibernate mapping XML files -->
          <property name="hibernate.archive.autodetection" value="class, hbm"/>

          <!-- SQL stdout logging
          <property name="hibernate.show_sql" value="true"/>
          <property name="hibernate.format_sql" value="true"/>
          <property name="use_sql_comments" value="true"/>
          -->

      <!--<property name="hibernate.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>-->
      <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
      <property name="hibernate.connection.password" value="*******"/>
      <property name="hibernate.connection.url" value="jdbc:mysql://localhost"/>
      <property name="hibernate.connection.username" value="ruya"/>
      <property name="hibernate.default_schema" value="mater"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      </properties>
   </persistence-unit>
</persistence>



In the build path there all the jars from the hibernate distribution, including all those from the lib directories.
I can't understande what is going on here...

Thanks in advance,
Rui


Top
 Profile  
 
 Post subject: DEBUG information
PostPosted: Sat Mar 24, 2007 2:28 pm 
Newbie

Joined: Wed Mar 21, 2007 1:12 pm
Posts: 19
Hi all,
Maybe the debug information can give more help:

Code:
18:19:53,952  INFO Version:148 - Hibernate EntityManager 3.2.1.GA
18:19:53,976  INFO Version:148 - Hibernate Annotations 3.2.1.GA
18:19:54,035  INFO Environment:148 - Hibernate 3.2.2
18:19:54,046  INFO Environment:148 - hibernate.properties not found
18:19:54,048  INFO Environment:148 - Bytecode provider name : cglib
18:19:54,053  INFO Environment:148 - using JDK 1.4 java.sql.Timestamp handling
18:19:54,171 DEBUG Ejb3Configuration:132 - Look up for persistence unit: mater_persistence
18:19:54,172 DEBUG Ejb3Configuration:115 - Analyse of persistence.xml: file:/home/ruya/MATerWS/RepastMATer/bin/META-INF/persistence.xml
18:19:54,563 DEBUG DTDEntityResolver:132 - trying to resolve system-id [http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd]
18:19:54,563 DEBUG EJB3DTDEntityResolver:132 - recognized EJB3 ORM namespace; attempting to resolve on classpath under org/hibernate/ejb
18:19:54,564 DEBUG EJB3DTDEntityResolver:132 - located [http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd] in classpath
18:19:54,700 DEBUG PersistenceXmlLoader:115 - Persistent Unit name from persistence.xml: mater_persistence
18:19:54,704 DEBUG Ejb3Configuration:115 - PersistenceMetadata [
   name: mater_persistence
   jtaDataSource: null
   nonJtaDataSource: null
   transactionType: RESOURCE_LOCAL
   provider: org.hibernate.ejb.HibernatePersistence
   classes[
   ]
   packages[
   ]
   mappingFiles[
   ]
   jarFiles[
   ]
   hbmfiles: 0
   properties[
      hibernate.default_schema: mater
      hibernate.connection.driver_class: com.mysql.jdbc.Driver
      hibernate.dialect: org.hibernate.dialect.MySQL5InnoDBDialect
      hibernate.cache.use_second_level_cache: false
      hibernate.connection.username: ruya
      hibernate.session_factory_name: java:hibernate/HibernateFactory
      hibernate.hbm2ddl.auto: create-drop
      hibernate.archive.autodetection: class
      hibernate.connection.url: jdbc:mysql://localhost
      hibernate.connection.password: rui8299
   ]]
18:19:54,708 DEBUG Ejb3Configuration:132 - Detect class: true; detect hbm: false
18:19:54,715 DEBUG JarVisitor:132 - Searching mapped entities in jar/par: file:/home/ruya/MATerWS/RepastMATer/bin
18:19:54,718 DEBUG JarVisitor:132 - Filtering: mater.paths.PathFinderI
18:19:54,748 DEBUG JarVisitor:132 - Filtering: mater.paths.PathFinder
18:19:54,766 DEBUG JarVisitor:132 - Filtering: mater.paths.PathFinder$PathNode
18:19:54,767 DEBUG JarVisitor:132 - Filtering: mater.paths.PathFinder$NodeComp
18:19:54,768 DEBUG JarVisitor:132 - Filtering: mater.agents.Patch
18:19:54,771 DEBUG JarVisitor:132 - Filtering: mater.agents.MaterAgent
18:19:54,775 DEBUG JarVisitor:132 - Filtering: mater.agents.MaterAgent$CityManager
18:19:54,777 DEBUG JarVisitor:132 - Filtering: mater.agents.MaterAgent$CityManager$CityScoreComp
18:19:54,778 DEBUG JarVisitor:132 - Filtering: mater.agents.DefaultPatch
18:19:54,779 DEBUG JarVisitor:132 - Filtering: mater.agents.DefaultCity
18:19:54,780 DEBUG JarVisitor:132 - Filtering: mater.agents.DefaultAgent
18:19:54,781 DEBUG JarVisitor:132 - Filtering: mater.agents.City$PatchCapacityComparator
18:19:54,782 DEBUG JarVisitor:132 - Filtering: mater.agents.City
18:19:54,786 DEBUG JarVisitor:132 - Filtering: mater.agents.City$PatchCapacitySoftComparator
18:19:54,787 DEBUG JarVisitor:132 - Filtering: mater.agents.AgentFactory
18:19:54,788 DEBUG JarVisitor:132 - Filtering: mater.agents.AgentAbstractFactory
18:19:54,789 DEBUG JarVisitor:132 - Filtering: mater.Profiler
18:19:54,790 DEBUG JarVisitor:132 - Filtering: mater.MyOrderedVector
18:19:54,791 DEBUG JarVisitor:132 - Filtering: mater.MaterSpace
18:19:54,792 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$CityGrowth
18:19:54,792 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$CityNumberPlotter
18:19:54,793 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$CityNumObjDataSource
18:19:54,795 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$SnapShooter
18:19:54,795 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$Plotter
18:19:54,796 DEBUG JarVisitor:132 - Filtering: mater.MaterModel
18:19:54,809 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$ObjDataSource
18:19:54,832 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$FrameCleanup
18:19:54,833 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$FrameCapture
18:19:54,834 DEBUG JarVisitor:132 - Filtering: mater.MaterModel$CityRecorder
18:19:54,834 DEBUG JarVisitor:132 - Filtering: mater.MaterDisplay
18:19:54,835 DEBUG JarVisitor:132 - Filtering: mater.MainHibernate
18:19:54,836 DEBUG JarVisitor:132 - Filtering: mater.Main
18:19:54,837 DEBUG JarVisitor:132 - Filtering: mater.M
18:19:54,848 DEBUG JarVisitor:132 - Java element filter matched for mater.M
18:19:54,849 DEBUG JarVisitor:132 - Filtering: mater.FileManager
18:19:54,851 DEBUG JarVisitor:132 - Filtering: mater.Definitions
18:19:54,852 DEBUG JarVisitor:132 - Filtering: MATer.Profiler
18:19:54,854 DEBUG JarVisitor:132 - Filtering: MATer.PathFinder$PathNode
18:19:54,857 DEBUG JarVisitor:132 - Filtering: MATer.PathFinder
18:19:54,908 DEBUG JarVisitor:132 - Filtering: MATer.PathFinder$NodeComp
18:19:54,909 DEBUG JarVisitor:132 - Filtering: MATer.Patch
18:19:54,911 DEBUG JarVisitor:132 - Filtering: MATer.MyOrderedVector
18:19:54,911 DEBUG JarVisitor:132 - Filtering: MATer.MaterSpace
18:19:54,911 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$SnapShooter
18:19:54,912 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$CityNumberPlotter
18:19:54,913 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$FrameCleanup
18:19:54,913 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$FrameCapture
18:19:54,916 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$Plotter
18:19:54,920 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel
18:19:54,925 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$CityGrowth
18:19:54,927 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$ObjDataSource
18:19:54,927 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$CityNumObjDataSource
18:19:54,927 DEBUG JarVisitor:132 - Filtering: MATer.MaterModel$CityRecorder
18:19:54,928 DEBUG JarVisitor:132 - Filtering: MATer.MaterDisplay
18:19:54,928 DEBUG JarVisitor:132 - Filtering: MATer.MaterAgent
18:19:54,930 DEBUG JarVisitor:132 - Filtering: MATer.MaterAgent$CityManager
18:19:54,931 DEBUG JarVisitor:132 - Filtering: MATer.MaterAgent$CityManager$CityScoreComp
18:19:54,931 DEBUG JarVisitor:132 - Filtering: MATer.FileManager
18:19:54,932 DEBUG JarVisitor:132 - Filtering: MATer.Definitions
18:19:54,934 DEBUG JarVisitor:132 - Filtering: MATer.City$PatchCapacitySoftComparator
18:19:54,935 DEBUG JarVisitor:132 - Filtering: MATer.City
18:19:54,936 DEBUG JarVisitor:132 - Filtering: MATer.City$PatchCapacityComparator
18:19:54,937 DEBUG Ejb3Configuration:132 - Detect class: true; detect hbm: false
18:19:54,937 DEBUG Ejb3Configuration:132 - Creating Factory: mater_persistence
18:19:54,946 DEBUG AnnotationConfiguration:132 - Execute first pass mapping processing
18:19:55,060 DEBUG AnnotationConfiguration:132 - Process hbm files
18:19:55,060 DEBUG AnnotationConfiguration:132 - Process annotated classes
18:19:55,064  INFO AnnotationBinder:148 - Binding entity from annotated class: mater.M
18:19:55,089 DEBUG Ejb3Column:132 - Binding column DTYPE unique false
18:19:55,105 DEBUG EntityBinder:132 - Import with entity name=M
18:19:55,112  INFO EntityBinder:148 - Bind entity mater.M on table M
18:19:55,123 DEBUG AnnotationBinder:132 - Processing mater.M property annotation
18:19:55,132 DEBUG AnnotationBinder:132 - Processing mater.M field annotation
18:19:55,142 DEBUG AnnotationBinder:132 - Processing annotations of mater.M.id
18:19:55,145 DEBUG Ejb3Column:132 - Binding column id unique false
18:19:55,146 DEBUG AnnotationBinder:132 - id is an id
18:19:55,149 DEBUG SimpleValueBinder:132 - building SimpleValue for id
18:19:55,152 DEBUG PropertyBinder:132 - Building property id
18:19:55,155 DEBUG PropertyBinder:115 - Cascading id with null
18:19:55,155 DEBUG AnnotationBinder:132 - Bind @Id on id
18:19:55,157 DEBUG AnnotationConfiguration:132 - processing manytoone fk mappings
18:19:55,160 DEBUG Configuration:132 - processing extends queue
18:19:55,161 DEBUG Configuration:132 - processing collection mappings
18:19:55,161 DEBUG Configuration:132 - processing native query and ResultSetMapping mappings
18:19:55,161 DEBUG Configuration:132 - processing association property references
18:19:55,161 DEBUG Configuration:132 - processing foreign key constraints
18:19:55,177 DEBUG ClassValidator:115 - ResourceBundle ValidatorMessages not found in thread context classloader
18:19:55,182 DEBUG ClassValidator:132 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
18:19:55,207 DEBUG NamingHelper:132 - Not Ejb3Configuration to JNDI, no JNDI name configured
18:19:55,209 DEBUG Configuration:132 - Preparing to build session factory with filters : {}
18:19:55,209 DEBUG AnnotationConfiguration:132 - Execute first pass mapping processing
18:19:55,209 DEBUG AnnotationConfiguration:132 - Process hbm files
18:19:55,209 DEBUG AnnotationConfiguration:132 - Process annotated classes
18:19:55,209 DEBUG AnnotationConfiguration:132 - processing manytoone fk mappings
18:19:55,210 DEBUG Configuration:132 - processing extends queue
18:19:55,210 DEBUG Configuration:132 - processing collection mappings
18:19:55,211 DEBUG Configuration:132 - processing native query and ResultSetMapping mappings
18:19:55,211 DEBUG Configuration:132 - processing association property references
18:19:55,211 DEBUG Configuration:132 - processing foreign key constraints
18:19:55,211 DEBUG ClassValidator:115 - ResourceBundle ValidatorMessages not found in thread context classloader
18:19:55,212 DEBUG ClassValidator:132 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
18:19:55,297  INFO DriverManagerConnectionProvider:148 - Using Hibernate built-in connection pool (not for production use!)
18:19:55,298  INFO DriverManagerConnectionProvider:148 - Hibernate connection pool size: 20
18:19:55,298  INFO DriverManagerConnectionProvider:148 - autocommit mode: true
18:19:55,308  INFO DriverManagerConnectionProvider:148 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost
18:19:55,309  INFO DriverManagerConnectionProvider:148 - connection properties: {user=ruya, password=rui8299, autocommit=true, release_mode=auto}
18:19:55,309 DEBUG DriverManagerConnectionProvider:115 - total checked-out connections: 0
18:19:55,309 DEBUG DriverManagerConnectionProvider:132 - opening new JDBC connection
18:19:55,576 DEBUG DriverManagerConnectionProvider:132 - created connection to: jdbc:mysql://localhost, Isolation Level: 4
18:19:55,577  INFO SettingsFactory:148 - RDBMS: MySQL, version: 5.0.24a-Debian_9-log
18:19:55,577  INFO SettingsFactory:148 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.5 ( $Date: 2007-03-01 00:01:06 +0100 (Thu, 01 Mar 2007) $, $Revision: 6329 $ )
18:19:55,578 DEBUG DriverManagerConnectionProvider:115 - returning connection to pool, pool size: 1
18:19:55,593  INFO Dialect:148 - Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
18:19:55,598  INFO TransactionFactoryFactory:148 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
18:19:55,599  INFO TransactionManagerLookupFactory:148 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
18:19:55,599  INFO SettingsFactory:148 - Automatic flush during beforeCompletion(): disabled
18:19:55,600  INFO SettingsFactory:148 - Automatic session close at end of transaction: disabled
18:19:55,600  INFO SettingsFactory:148 - JDBC batch size: 15
18:19:55,600  INFO SettingsFactory:148 - JDBC batch updates for versioned data: disabled
18:19:55,601  INFO SettingsFactory:148 - Scrollable result sets: enabled
18:19:55,601 DEBUG SettingsFactory:132 - Wrap result sets: disabled
18:19:55,601  INFO SettingsFactory:148 - JDBC3 getGeneratedKeys(): enabled
18:19:55,601  INFO SettingsFactory:148 - Connection release mode: auto
18:19:55,604  INFO SettingsFactory:148 - Default schema: mater
18:19:55,604  INFO SettingsFactory:148 - Maximum outer join fetch depth: 2
18:19:55,604  INFO SettingsFactory:148 - Default batch fetch size: 1
18:19:55,604  INFO SettingsFactory:148 - Generate SQL with comments: disabled
18:19:55,604  INFO SettingsFactory:148 - Order SQL updates by primary key: disabled
18:19:55,605  INFO SettingsFactory:148 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
18:19:55,607  INFO ASTQueryTranslatorFactory:148 - Using ASTQueryTranslatorFactory
18:19:55,607  INFO SettingsFactory:148 - Query language substitutions: {}
18:19:55,607  INFO SettingsFactory:148 - JPA-QL strict compliance: enabled
18:19:55,607  INFO SettingsFactory:148 - Second-level cache: disabled
18:19:55,608  INFO SettingsFactory:148 - Query cache: disabled
18:19:55,608  INFO SettingsFactory:148 - Optimize cache for minimal puts: disabled
18:19:55,608  INFO SettingsFactory:148 - Structured second-level cache entries: disabled
18:19:55,609 DEBUG SQLExceptionConverterFactory:115 - Using dialect defined converter
18:19:55,614  INFO SettingsFactory:148 - Statistics: disabled
18:19:55,614  INFO SettingsFactory:148 - Deleted entity synthetic identifier rollback: disabled
18:19:55,615  INFO SettingsFactory:148 - Default entity-mode: pojo
18:19:55,615  INFO SettingsFactory:148 - Named query checking : enabled
18:19:55,639 DEBUG ClassValidator:115 - ResourceBundle ValidatorMessages not found in thread context classloader
18:19:55,639 DEBUG ClassValidator:132 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
18:19:55,650  INFO SessionFactoryImpl:148 - building session factory
18:19:55,651 DEBUG SessionFactoryImpl:132 - Session factory constructed with filter configurations : {}
18:19:55,652 DEBUG SessionFactoryImpl:132 - instantiating session factory with properties: {java.runtime.name=Java(TM) SE Runtime Environment, hibernate.connection.password=rui8299, sun.boot.library.path=/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386, hibernate.default_schema=mater, java.vm.version=1.6.0-b105, hibernate.connection.username=ruya, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=AU, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/home/ruya/MATerWS/RepastMATer, java.runtime.version=1.6.0-b105, hibernate.ejb.discard_pc_on_close=false, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.endorsed.dirs=/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/endorsed, os.arch=i386, hibernate.connection.autocommit=true, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Linux, hibernate.cache.use_second_level_cache=false, sun.jnu.encoding=UTF-8, java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.00, java.specification.name=Java Platform API Specification, java.class.version=50.0, sun.management.compiler=HotSpot Client Compiler, hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory, os.version=2.6.17-11-386, user.home=/home/ruya, user.timezone=Europe/Lisbon, java.awt.printerjob=sun.print.PSPrinterJob, hibernate.connection.release_mode=auto, java.specification.version=1.6, file.encoding=UTF-8, hibernate.connection.driver_class=com.mysql.jdbc.Driver, java.class.path=(...) user.name=ruya, hibernate.bytecode.use_reflection_optimizer=false, hibernate.use_identifier_rollback=false, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=/usr/lib/jvm/java-6-sun-1.6.0.00/jre, hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect, hibernate.connection.url=jdbc:mysql://localhost, java.specification.vendor=Sun Microsystems Inc., user.language=en, java.vm.info=mixed mode, sharing, java.version=1.6.0, hibernate.transaction.flush_before_completion=false, java.ext.dirs=/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/classes, java.vendor=Sun Microsystems Inc., hibernate.archive.autodetection=class, file.separator=/, hibernate.session_factory_name=java:hibernate/HibernateFactory, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, hibernate.hbm2ddl.auto=create-drop, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, hibernate.query.jpaql_strict_compliance=true, sun.cpu.isalist=}
Exception in thread "main" java.lang.IllegalAccessError
   at net.sf.cglib.core.ClassEmitter.setTarget(ClassEmitter.java:45)
   at net.sf.cglib.core.ClassEmitter.<init>(ClassEmitter.java:37)
   at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
   at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
   at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
   at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
   at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
   at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
   at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
   at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
   at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
   at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
   at mater.MainHibernate.main(MainHibernate.java:44)



However, I can't see anything wrong in the debugg information

Thanks,
Rui


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 26, 2007 6:29 pm 
Newbie

Joined: Wed Mar 21, 2007 1:12 pm
Posts: 19
Problem not solved.
A fresh and clean project folder with everything built from the beggining solved the problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.