-->
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.  [ 4 posts ] 
Author Message
 Post subject: NoClassDefFoundError when creating cache
PostPosted: Fri Apr 28, 2006 10:19 am 
Newbie

Joined: Fri Apr 28, 2006 9:42 am
Posts: 9
Location: Florida, USA
Can anyone throw any light on the reason(s) for this exception? Obviously, the offending class is in the Hibernate3.jar, so it ought to be found. At the point at which the exception occurs the connection has been made to the DB. In fact, the app is almost at the point where it starts to execute.
The mapping file is below, as is the trace.
Thanks for your attention...

===========================================
Name and version of the database you are using:Oracle 9
===========================================
Hibernate version: 3.1.3
===========================================
OS: Win 2000
===========================================
Mapping File:
<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jea.gpmd.persistence.metrics.Metrics"
table="METRICS">
<cache usage="read-write" />
<id name="metricsId"
type="long"
unsaved-value="null">
<column name="METRICS_ID" length="22" />
<generator class="native"></generator>
</id>
<property name="footprintNumber" type="string">
<column name="FOOTPRINT_NUMBER" length="30" not-null="true" />
</property>
<property name="metricsCode" type="string">
<column name="METRICS_CODE" length="24" not-null="true"/>
</property>
<property name="metricsDescription" type="string">
<column name="METRICS_DESCRIPTION" length="80" not-null="true" />
</property>
<property name="metricsIsCompleted" type="short">
<column name="METRICS_IS_COMPLETED" length="1" not-null="true" />
</property>
<property name="metricsBaselineDuration" type="long">
<column name="METRICS_BASELINE_DURATION" length="10" not-null="true" />
</property>
<property name="metricsActualDuration" type="long">
<column name="METRICS_ACTUAL_DURATION" length="10" not-null="true" />
</property>
<property name="metricsTargetStartDate" type="date">
<column name="METRICS_TARGET_START_DATE" length="7" not-null="true" />
</property>
<property name="metricsTargetEndDate" type="date">
<column name="METRICS_TARGET_END_DATE" length="7" not-null="true" />
</property>
<property name="metricsActualStartDate" type="date">
<column name="METRICS_ACTUAL_START_DATE" length="7" not-null="true" />
</property>
<property name="metricsActualEndDate" type="date">
<column name="METRICS_ACTUAL_END_DATE" length="7" not-null="true" />
</property>
<property name="metricsIsMilestone" type="short">
<column name="METRICS_IS_MILESTONE" length="1" not-null="true" />
</property>
<property name="metricsIsPq" type="short">
<column name="METRICS_IS_PQ" length="1" not-null="true" />
</property>
<property name="metricsMilestoneCode" type="string">
<column name="METRICS_MILESTONE_CODE" length="24" not-null="true" />
</property>
<property name="metricsForecastDuration" type="long">
<column name="METRICS_FORECAST_DURATION" length="10" not-null="true" />
</property>
<property name="metricsForecastStartDate" type="date">
<column name="METRICS_FORECAST_START_DATE" length="7" not-null="true" />
</property>
<property name="metricsForecastEndDate" type="date">
<column name="METRICS_FORECAST_END_DATE" length="7" not-null="true" />
</property>
</class>
</hibernate-mapping>

==============================================


STACK TRACE:

java.lang.NoClassDefFoundError
at org.hibernate.tuple.EntityMetamodel.class$(EntityMetamodel.java:41)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:122)

at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)

at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)

at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)

at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:216)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)

at com.jea.gpmd.persistence.utils.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:56)

at com.jea.gpmd.persistence.metrics.ExtractLauncher.execute(ExtractLauncher.java:88)

at com.jea.gpmd.persistence.metrics.ExtractLauncher.main(ExtractLauncher.java:58)

Caused by: java.lang.ClassNotFoundException: net.sf.cglib.transform.impl.InterceptFieldEnabled

at java.net.URLClassLoader$1.run(URLClassLoader.java:199)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:187)

at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:141)

... 10 more

NoClassDefFoundError when Building sessions...

org.hibernate.HibernateException

at com.jea.gpmd.persistence.metrics.ExtractLauncher.execute(ExtractLauncher.java:94)

at com.jea.gpmd.persistence.metrics.ExtractLauncher.main(ExtractLauncher.java:58)

VM shutting down with the disk store for com.jea.gpmd.persistence.metrics.Metrics still active. The disk store is persistent. Calling dispose...

com.jea.gpmd.persistence.metrics.Metrics is persistent. Spooling 0 elements to the disk store.

VM shutting down with the disk store for com.jea.gpmd.persistence.metrics.Footprint still active. The disk store is persistent. Calling dispose...

com.jea.gpmd.persistence.metrics.Footprint is persistent. Spooling 0 elements to the disk store.

com.jea.gpmd.persistence.metrics.MetricsCache: Expiry thread interrupted on Disk Store.

com.jea.gpmd.persistence.metrics.FootprintCache: Expiry thread interrupted on Disk Store.


=============================================


Top
 Profile  
 
 Post subject: The reference Document sayed:
PostPosted: Fri Apr 28, 2006 11:07 am 
Regular
Regular

Joined: Wed Feb 22, 2006 11:28 am
Posts: 65
Location: Santiago, Chile
Hello Friend:

Please read:
http://www.hibernate.org/hib_docs/v3/re ... ation.html
1.2. Part 1 - The first Hibernate Application.

It indicate you which API's Jar you have to import or reference for ur application.

requests for comments.


Top
 Profile  
 
 Post subject: java.lang.NoClassDefFoundError at org.hibernate.tuple.Entit
PostPosted: Thu May 11, 2006 8:19 am 
Newbie

Joined: Fri Mar 24, 2006 9:21 am
Posts: 2
I am getting the same exception at the same point. I am deploying my web app on Weblogic 9.1. From the console log it looks like it does connect to the database, but then right when it tries to either get a Hibernate session or access the EJB layer, I get this exception. I did look at the document referred to by neketsushonen, but did not really find anything that tells me about any jar files. Am I looking at the right document?

Thanks for any help.

Sharma

_________________
Sharma Vedula


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 11, 2006 8:28 am 
Newbie

Joined: Wed Nov 23, 2005 5:01 am
Posts: 15
Hi,

Do you have into your classpath all neccessary files? For example from your exception result that the cglib.jar is not in your classpath or there are some problems for loading that jar.

I hope this help

Calin


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