-->
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.  [ 14 posts ] 
Author Message
 Post subject: error using hibernate 3 final release : NoClassDefFoundError
PostPosted: Mon Apr 11, 2005 5:57 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
Hello,

I have just change an application to use the new final release of H3. But the initialisation of H3 throw an error.

The code :
cfg = new Configuration();
sessionFactory = cfg.buildSessionFactory(); -> error here

The stack trace :
java.lang.NoClassDefFoundError
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)

Every thing was working with H2.1, and also with H3RC1. (I follow the migration guide). But the final H3 crash.

It seems that I need some unknown libraries, but which one ? I followed excactly the README file in the lib direcrory. And the error trace don't tell me why I am wrong.

Here are all the hibernate libraries or dependencies in my classpath :
- antlr-2.7.5H3.jar
- asm.jar
- asm-attrs.jar
- cglib-2.1.jar
- commons-collections-2.1.1.jar
- commons-logging-1.0.4.jar
- dom4j-1.5.2.jar
- ehcache-1.1.jar
- hibernate3.jar
- xerces-2.6.2.jar
- xml-apis.jar

Here is my config file :

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory name="java:hibernate/SessionFactory">
<!-- properties -->
<property name = "connection.datasource">precix_allo</property>

<property name="hibernate.dialect">org.hibernate.dialect.InformixDialect</property>
<property name="show_sql">true</property>
<property name="hibernate.query.substitutions">true 1, false 0</property>
<!-- mapping files -->
<mapping resource="WEB-INF/classes/hibernate/Function.hbm.xml"/>
//..etc
</session-factory>
</hibernate-configuration>

I am using JOnas 4.3.2.

Thanks in advance for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 8:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
check your list against version.properties/readme.txt in lib.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 8:27 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
I already did that. All required librairies are under my WEB-INF/lib directory of my application. This is why I have postesd this message. And I don't know what to do at this point.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 8:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
check the log for errors...
step in with a debugger and see what class it cannot load...

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 9:10 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
I cannot find any errors. Here is the hibernate logs (with INFO level). There is no WARN or FATAL.

15:01:07 INFO [org.hibernate.cfg.Environment] --> Hibernate 3.0
15:01:07 INFO [org.hibernate.cfg.Environment] --> hibernate.properties not found
15:01:07 INFO [org.hibernate.cfg.Environment] --> using CGLIB reflection optimizer
15:01:07 INFO [org.hibernate.cfg.Environment] --> using JDK 1.4 java.sql.Timestamp handling
15:01:08 INFO [org.hibernate.cfg.Configuration] --> configuring from resource: /hibernate.cfg.xml
15:01:08 INFO [org.hibernate.cfg.Configuration] --> Configuration resource: /hibernate.cfg.xml
15:01:09 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Function.hbm.xml
15:01:10 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.misc.Function -> prc_fonction
15:01:10 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Person.hbm.xml
15:01:11 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.misc.Person -> prc_secretaire
15:01:11 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/DeliveryMode.hbm.xml
15:01:11 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.delivery.DeliveryMode -> tab_mdlivr
15:01:11 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/PaymentMode.hbm.xml
15:01:11 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.payment.PaymentMode -> tab_mdpai
15:01:11 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/CustomerFamilly.hbm.xml
15:01:11 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.CustomerFamilly -> tab_famcli
15:01:11 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/ProductFamilly.hbm.xml
15:01:12 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.ProductFamilly -> tab_famart
15:01:12 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/SupplierFamilly.hbm.xml
15:01:12 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.SupplierFamilly -> tab_famfrn
15:01:12 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Supplier.hbm.xml
15:01:12 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.Supplier -> bas_frn
15:01:12 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Price.hbm.xml
15:01:12 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Price -> view_current_price
15:01:13 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Representative.hbm.xml
15:01:13 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Representative -> bas_repres
15:01:13 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Customer.hbm.xml
15:01:14 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Customer -> bas_cli
15:01:14 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Product.hbm.xml
15:01:14 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Product -> bas_art
15:01:14 INFO [org.hibernate.cfg.Configuration] --> Configured SessionFactory: java:hibernate/SessionFactory
15:01:14 INFO [org.hibernate.cfg.Configuration] --> processing extends queue
15:01:14 INFO [org.hibernate.cfg.Configuration] --> processing collection mappings
15:01:14 INFO [org.hibernate.cfg.Configuration] --> processing association property references
15:01:14 INFO [org.hibernate.cfg.Configuration] --> processing foreign key constraints
15:01:46 INFO [org.hibernate.dialect.Dialect] --> Using dialect: org.hibernate.dialect.InformixDialect
15:01:46 INFO [org.hibernate.cfg.SettingsFactory] --> Default batch fetch size: 1
15:01:46 INFO [org.hibernate.cfg.SettingsFactory] --> Generate SQL with comments: disabled
15:01:46 INFO [org.hibernate.cfg.SettingsFactory] --> Order SQL updates by primary key: disabled
15:01:46 INFO [org.hibernate.cfg.SettingsFactory] --> Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
15:01:46 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] --> Using ASTQueryTranslatorFactory
15:01:46 INFO [org.hibernate.cfg.SettingsFactory] --> Query language substitutions: {true=1, false=0}
15:01:46 INFO [org.hibernate.util.NamingHelper] --> JNDI InitialContext properties:{}
15:02:17 INFO [org.hibernate.connection.DatasourceConnectionProvider] --> Using datasource: precix_allo
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Scrollable result sets: enabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> JDBC3 getGeneratedKeys(): disabled
15:02:31 INFO [org.hibernate.transaction.TransactionFactoryFactory] --> Using default transaction strategy (direct JDBC transactions)
15:02:31 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] --> No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Automatic flush during beforeCompletion(): disabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Automatic session close at end of transaction: disabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Cache provider: org.hibernate.cache.EhCacheProvider
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Second-level cache: enabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Optimize cache for minimal puts: disabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Structured second-level cache entries: enabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Query cache: disabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Echoing all SQL to stdout
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Statistics: disabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Deleted entity synthetic identifier rollback: disabled
15:02:31 INFO [org.hibernate.cfg.SettingsFactory] --> Default entity-mode: pojo
15:02:57 INFO [com.netqi.businessvision.plugins.LoggingPlugin] --> Application initialisation : logging OK
15:02:57 INFO [com.netqi.portals.persistence.HibernateManager] --> HibernateManager context initialisation
15:03:26 INFO [org.hibernate.cfg.Configuration] --> configuring from resource: /hibernate.cfg.xml
15:03:26 INFO [org.hibernate.cfg.Configuration] --> Configuration resource: /hibernate.cfg.xml
15:03:26 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Function.hbm.xml
15:03:26 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.misc.Function -> prc_fonction
15:03:26 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Person.hbm.xml
15:03:27 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.misc.Person -> prc_secretaire
15:03:27 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/DeliveryMode.hbm.xml
15:03:27 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.delivery.DeliveryMode -> tab_mdlivr
15:03:27 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/PaymentMode.hbm.xml
15:03:27 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.payment.PaymentMode -> tab_mdpai
15:03:27 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/CustomerFamilly.hbm.xml
15:03:27 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.CustomerFamilly -> tab_famcli
15:03:27 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/ProductFamilly.hbm.xml
15:03:27 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.ProductFamilly -> tab_famart
15:03:27 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/SupplierFamilly.hbm.xml
15:03:28 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.SupplierFamilly -> tab_famfrn
15:03:28 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Supplier.hbm.xml
15:03:28 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.Supplier -> bas_frn
15:03:28 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Price.hbm.xml
15:03:28 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Price -> view_current_price
15:03:28 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Representative.hbm.xml
15:03:28 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Representative -> bas_repres
15:03:28 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Customer.hbm.xml
15:03:29 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Customer -> bas_cli
15:03:29 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Product.hbm.xml
15:03:29 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Product -> bas_art
15:03:29 INFO [org.hibernate.cfg.Configuration] --> Configured SessionFactory: java:hibernate/SessionFactory
15:03:29 INFO [org.hibernate.cfg.Configuration] --> processing extends queue
15:03:29 INFO [org.hibernate.cfg.Configuration] --> processing collection mappings
15:03:29 INFO [org.hibernate.cfg.Configuration] --> processing association property references
15:03:29 INFO [org.hibernate.cfg.Configuration] --> processing foreign key constraints
15:03:29 INFO [org.hibernate.dialect.Dialect] --> Using dialect: org.hibernate.dialect.InformixDialect
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Default batch fetch size: 1
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Generate SQL with comments: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Order SQL updates by primary key: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
15:03:29 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] --> Using ASTQueryTranslatorFactory
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Query language substitutions: {true=1, false=0}
15:03:29 INFO [org.hibernate.util.NamingHelper] --> JNDI InitialContext properties:{}
15:03:29 INFO [org.hibernate.connection.DatasourceConnectionProvider] --> Using datasource: precix_allo
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Scrollable result sets: enabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> JDBC3 getGeneratedKeys(): disabled
15:03:29 INFO [org.hibernate.transaction.TransactionFactoryFactory] --> Using default transaction strategy (direct JDBC transactions)
15:03:29 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] --> No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Automatic flush during beforeCompletion(): disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Automatic session close at end of transaction: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Cache provider: org.hibernate.cache.EhCacheProvider
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Second-level cache: enabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Optimize cache for minimal puts: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Structured second-level cache entries: enabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Query cache: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Echoing all SQL to stdout
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Statistics: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Deleted entity synthetic identifier rollback: disabled
15:03:29 INFO [org.hibernate.cfg.SettingsFactory] --> Default entity-mode: pojo
15:04:07 INFO [com.netqi.businessvision.plugins.LoggingPlugin] --> Application initialisation : logging OK
15:04:07 INFO [com.netqi.portals.persistence.HibernateManager] --> HibernateManager context initialisation
15:06:31 INFO [org.hibernate.cfg.Configuration] --> configuring from resource: /hibernate.cfg.xml
15:06:37 INFO [org.hibernate.cfg.Configuration] --> Configuration resource: /hibernate.cfg.xml
15:06:37 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Function.hbm.xml
15:06:37 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.misc.Function -> prc_fonction
15:06:37 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Person.hbm.xml
15:06:37 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.misc.Person -> prc_secretaire
15:06:38 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/DeliveryMode.hbm.xml
15:06:38 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.delivery.DeliveryMode -> tab_mdlivr
15:06:38 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/PaymentMode.hbm.xml
15:06:38 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.payment.PaymentMode -> tab_mdpai
15:06:38 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/CustomerFamilly.hbm.xml
15:06:38 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.CustomerFamilly -> tab_famcli
15:06:38 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/ProductFamilly.hbm.xml
15:06:38 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.ProductFamilly -> tab_famart
15:06:38 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/SupplierFamilly.hbm.xml
15:06:39 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.SupplierFamilly -> tab_famfrn
15:06:39 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Supplier.hbm.xml
15:06:39 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.business.beans.commerce.Supplier -> bas_frn
15:06:39 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Price.hbm.xml
15:06:39 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Price -> view_current_price
15:06:39 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Representative.hbm.xml
15:06:39 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Representative -> bas_repres
15:06:39 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Customer.hbm.xml
15:06:39 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Customer -> bas_cli
15:06:39 INFO [org.hibernate.cfg.Configuration] --> Mapping resource: WEB-INF/classes/hibernate/Product.hbm.xml
15:06:40 INFO [org.hibernate.cfg.HbmBinder] --> Mapping class: com.netqi.businessvision.beans.Product -> bas_art
15:06:40 INFO [org.hibernate.cfg.Configuration] --> Configured SessionFactory: java:hibernate/SessionFactory
15:06:40 INFO [org.hibernate.cfg.Configuration] --> processing extends queue
15:06:40 INFO [org.hibernate.cfg.Configuration] --> processing collection mappings
15:06:40 INFO [org.hibernate.cfg.Configuration] --> processing association property references
15:06:40 INFO [org.hibernate.cfg.Configuration] --> processing foreign key constraints
15:06:40 INFO [org.hibernate.dialect.Dialect] --> Using dialect: org.hibernate.dialect.InformixDialect
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Default batch fetch size: 1
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Generate SQL with comments: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Order SQL updates by primary key: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
15:06:40 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] --> Using ASTQueryTranslatorFactory
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Query language substitutions: {true=1, false=0}
15:06:40 INFO [org.hibernate.util.NamingHelper] --> JNDI InitialContext properties:{}
15:06:40 INFO [org.hibernate.connection.DatasourceConnectionProvider] --> Using datasource: precix_allo
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Scrollable result sets: enabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> JDBC3 getGeneratedKeys(): disabled
15:06:40 INFO [org.hibernate.transaction.TransactionFactoryFactory] --> Using default transaction strategy (direct JDBC transactions)
15:06:40 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] --> No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Automatic flush during beforeCompletion(): disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Automatic session close at end of transaction: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Cache provider: org.hibernate.cache.EhCacheProvider
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Second-level cache: enabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Optimize cache for minimal puts: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Structured second-level cache entries: enabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Query cache: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Echoing all SQL to stdout
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Statistics: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Deleted entity synthetic identifier rollback: disabled
15:06:40 INFO [org.hibernate.cfg.SettingsFactory] --> Default entity-mode: pojo


What is thrown is exactly this :

exception

javax.servlet.ServletException
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:290)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)


cause mère

java.lang.NoClassDefFoundError
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)
com.netqi.portals.persistence.HibernateManager.<init>(HibernateManager.java:80)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 9:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
...so no errors - then use a debugger to see what class its missing!

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 10:01 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
OK, do you known a simple way to degug a web app under eclipse ? The step by step debbuger (with a toggle breakpoint insertion) didn't tell me anything interesting.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 11:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://www.jroller.com/page/eu/20050411 ... th_eclipse

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 10:36 am 
Beginner
Beginner

Joined: Tue Feb 01, 2005 8:38 am
Posts: 38
Hi guys,

Did you ever get to the bottom of this Cyril? I seem to be experinecing exactly the same problem with Hibernate 3.0 final version. I can't debug into it though - I'm using Sun One app server 7 and whenever I try to debug it through Eclipse, the server just crashes and restarts!

I have the all the required jars on my classpath but I can't tell what class-def can't be found.

Here's some of the log and stacktrace I get...

Code:
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.util.ReflectHelper] [getBulkBean (201)] reflection optimizer disabled for: com.myapp.common.dto.ConversionRateId, NoClassDefFoundError: null
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.util.ReflectHelper] [getBulkBean (201)] reflection optimizer disabled for: com.myapp.common.dto.PartnerServiceId, NoClassDefFoundError: null
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.util.ReflectHelper] [getBulkBean (201)] reflection optimizer disabled for: com.myapp.common.dto.RoamingChargeId, NoClassDefFoundError: null
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.util.ReflectHelper] [getBulkBean (201)] reflection optimizer disabled for: com.myapp.common.dto.ConversionRateId, NoClassDefFoundError: null
INFO: CORE3282: stdout: [INFO ] [org.hibernate.dialect.Dialect] [<init> (91)] Using dialect: org.hibernate.dialect.OracleDialect
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.exception.SQLExceptionConverterFactory] [buildSQLExceptionConverter (52)] Using dialect defined converter
INFO: CORE3282: stdout: [INFO ] [org.hibernate.cfg.SettingsFactory] [buildSettings (90)] Default batch fetch size: 1
INFO: CORE3282: stdout: [INFO ] [org.hibernate.cfg.SettingsFactory] [buildSettings (94)] Generate SQL with comments: disabled
INFO: CORE3282: stdout: [INFO ] [org.hibernate.cfg.SettingsFactory] [buildSettings (98)] Order SQL updates by primary key: disabled
INFO: CORE3282: stdout: [INFO ] [org.hibernate.cfg.SettingsFactory] [createQueryTranslatorFactory (273)] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO: CORE3282: stdout: [INFO ] [org.hibernate.hql.ast.ASTQueryTranslatorFactory] [<init> (21)] Using ASTQueryTranslatorFactory
INFO: CORE3282: stdout: [INFO ] [org.hibernate.cfg.SettingsFactory] [buildSettings (106)] Query language substitutions: {}
INFO: CORE3282: stdout: [INFO ] [org.hibernate.connection.DriverManagerConnectionProvider] [configure (41)] Using Hibernate built-in connection pool (not for production use!)
INFO: CORE3282: stdout: [INFO ] [org.hibernate.connection.DriverManagerConnectionProvider] [configure (42)] Hibernate connection pool size: 20
INFO: CORE3282: stdout: [INFO ] [org.hibernate.connection.DriverManagerConnectionProvider] [configure (45)] autocommit mode: false
INFO: CORE3282: stdout: [INFO ] [org.hibernate.connection.DriverManagerConnectionProvider] [configure (80)] using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@lagan:1521:calldev
INFO: CORE3282: stdout: [INFO ] [org.hibernate.connection.DriverManagerConnectionProvider] [configure (83)] connection properties: {user=XXXX, password=YYYY}
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.connection.DriverManagerConnectionProvider] [getConnection (93)] total checked-out connections: 0
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.connection.DriverManagerConnectionProvider] [getConnection (109)] opening new JDBC connection
FINE: SingleSignOn[server1]: SSO expiration started. Current entries: 0
FINE: SingleSignOn[server1]: SSO cache will expire 0 entries.
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.connection.DriverManagerConnectionProvider] [getConnection (115)] created connection to: jdbc:oracle:thin:@lagan:1521:calldev, Isolation Level: 2
FINE: EJB5018: Some unmapped exception occurred : [{0}]
java.lang.NoClassDefFoundError
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)
        at com.myapp.dataLayer.DataManager.<init>(DataManager.java:111)
        at com.myapp.dataLayer.DataManager.getInstance(DataManager.java:58)
        at com.myapp.servicesLayer.SBApplicationMetaDataBean.<init>(SBApplicationMetaDataBean.java:73)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:482)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:68)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:735)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:176)
        at com.sun.ejb.containers.StatelessSessionContainer.getContext(StatelessSessionContainer.java:458)
        at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:495)
        at com.myapp.servicesLayer.SBApplicationMetaDataBean_EJBObjectImpl.getMessage(SBApplicationMetaDataBean_EJBObjectImpl.java:27)
        at com.myapp.servicesLayer._SBApplicationMetaDataBean_EJBObjectImpl_Tie._invoke(Unknown Source)
        at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
        at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
        at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
        at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
        at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
        at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
        at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:288)
        at java.lang.Thread.run(Thread.java:534)


I seem to be getting a NoClassDefFoundError for all of my composite-id classes - eg.
INFO: CORE3282: stdout: [DEBUG] [org.hibernate.util.ReflectHelper] [getBulkBean (201)] reflection optimizer disabled for: com.myapp.common.dto.ConversionRateId, NoClassDefFoundError: null

- is this related to the NoClassDefFoundError that is being thrown at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)


Any help on this issue would be greatly appreciated...

:)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 10:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
when you get a NoClassDefFoundError it is most cases caused by some basic underlying problem with loading a class - so e.g. it might be able to find the class, but not being able to execute static blocks properly etc.

look for previously error messages in your log.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 12:52 pm 
Beginner
Beginner

Joined: Tue Feb 01, 2005 8:38 am
Posts: 38
Phew - I finally figured out what the problem was by removing all O-R mappings except one and trying to create an instance of that class. This showed up another exception...

Caused by: java.security.AccessControlException : access denied (java.lang.RuntimePermission getProtectionDomain)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at java.security.AccessController.checkPermission (AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.Class.getProtectionDomain(Class.java:1392)
at net.sf.cglib.core.ReflectUtils$1.run (ReflectUtils.java:42)
at java.securit
FINE: y.AccessController.doPrivileged(Native Method)
at net.sf.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:40)
... 34 more

I did a search for that on the forum here and found this thread...

http://forum.hibernate.org/viewtopic.ph ... tiondomain

which told me to add some permissions to the server.policy of sun one. Thanks to user sninsky for providing me with the solution. What a load of fuss over nothing!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 2:33 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Set a page to the wiki, if you think it will help others.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 28, 2005 11:37 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
It seems to be also my problem. But how to configue JOnAS 4.3 to work with Hibernate 3 ? Does anyone succeed in using use H3 with Jonas ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 28, 2005 12:39 pm 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
Me again.

As I told you earlier, my app is working with H3 RC1, but not anymore with H3 final. So, what has change in hibernate between those 2 releases which may be the source of my problem ? I red the release notes, but I didn't find something witch can help me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 14 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.