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