-->
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.  [ 5 posts ] 
Author Message
 Post subject: NoClassDefFoundError
PostPosted: Thu Jan 07, 2010 5:25 pm 
Newbie

Joined: Thu Jan 07, 2010 12:26 pm
Posts: 2
I keep getting this error when I try to deploy on weblogic 10.3. I'm trying to initialize hibernate through spring

Code:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        at org.hibernate.util.XMLHelper.<clinit>(XMLHelper.java:26)
        at org.hibernate.cfg.Configuration.reset(Configuration.java:196)


Here is the spring configuration
Code:
   <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
      <property name="environment">
         <props>
            <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
         </props>
      </property>
   </bean>

   <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiTemplate" ref="jndiTemplate" />
      <property name="jndiName" value="ds.oracleds" />
   </bean>
<!-- lazy-init="true"-->
   <bean id="sessionFactory"
      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
      <property name="dataSource" ref="dataSource" />
      <property name="mappingResources">
         <list>
            <value>test.hbm.xml</value>
         </list>
      </property>

      <property name="hibernateProperties">
         <props>
            <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
            <prop key="hibernate.show_sql">true</prop>
            <prop key="hibernate.generate_statistics">true</prop>
         </props>
      </property>
   </bean>
   <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
      <property name="sessionFactory" ref="sessionFactory" />
   </bean>
   
   <bean id="testDao" class="test.TestDao">
      <property name="hibernateTemplate" ref="hibernateTemplate" />
   </bean>


I have commons-logging.jar in my classpath. The following is a list of jar files in my lib directory

Code:
antlr-2.7.6.jar
asm-2.2.3.jar
asm-commons-2.2.3.jar
asm-util-2.2.3.jar
cglib-2.2.jar
commons-attributes-api.jar
commons-attributes-compiler.jar
commons-beanutils.jar
commons-codec.jar
commons-collections-3.1.jar
commons-dbcp.jar
commons-digester.jar
commons-discovery.jar
commons-fileupload.jar
commons-httpclient.jar
commons-io.jar
commons-jexl-1.1.jar
commons-lang.jar
commons-logging.jar
commons-pool.jar
commons-validator.jar
dom4j-1.6.1.jar
easymock-2.5.1.jar
ehcache-1.5.0.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar
hibernate3.jar
iText-2.1.0.jar
jasperreports-3.7.0.jar
javassist-3.9.0.GA.jar
jaxb-api.jar
jaxen-1.1-beta-7.jar
jdt-compiler-3.1.1.jar
jstl.jar
jta-1.1.jar
junit-4.1.jar
log4j-1.2.15.jar
ojdbc14.jar
quartz-all-1.6.0.jar
quartz-weblogic-1.6.0.jar
slf4j-api-1.5.8.jar
slf4j-jcl-1.5.8.jar
spring.jar
standard.jar
struts-el.jar
struts-legacy.jar
struts.jar
xalan-2.7.0.jar


Top
 Profile  
 
 Post subject: Re: NoClassDefFoundError
PostPosted: Fri Jan 08, 2010 4:16 am 
Newbie

Joined: Fri Jan 08, 2010 4:08 am
Posts: 4
if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.

_________________
craft ideas | india news


Top
 Profile  
 
 Post subject: Re: NoClassDefFoundError
PostPosted: Fri Jan 08, 2010 5:39 am 
Newbie

Joined: Mon Oct 05, 2009 6:16 am
Posts: 3
Am having the same problem. where by my application is not working in weblogic 10.3. My application uses hibernate an spring framework. is there a way to deployee my application without bringing errors
plis help


Top
 Profile  
 
 Post subject: Re: NoClassDefFoundError
PostPosted: Fri Jan 08, 2010 7:37 am 
Newbie

Joined: Thu Jan 07, 2010 12:26 pm
Posts: 2
Quote:
if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.


The strange part here is that Spring Framework uses Commons Logging internally. The deployment fails before attempting to load the hibernate classes if commons-logging.jar is removed (as expected with NoClassDefFoundError). But if the commons-logging.jar file exists in the classpath, other beans in spring framework are loaded, only the hibernate classes give this error.


Top
 Profile  
 
 Post subject: Re: NoClassDefFoundError
PostPosted: Tue Jan 12, 2010 4:09 am 
Newbie

Joined: Tue Jan 12, 2010 3:58 am
Posts: 2
Hi, good people!!!

I have a similar error, but I don't have the minimum idea of the possible reason.
the erro msg it's:

org.zkoss.zk.ui.impl.UiEngineImpl handleError:1131
SEVERE: >>java.lang.NoClassDefFoundError: org/hibernate/criterion/Criterion

how can a repear this error????

I'm creating a web application using ZK, runing with TomCat 6.0, IDE Eclips, patern MVC

this msg apera wen I click to save button on my ZUL form..... and point to the place where I instancialize the DAO class

Macho Mozambique


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