I am getting odd errors in the applicationContext editor
Build path is incomplete. Cannot find class file for org.apache.commons.dbcp.BasicDataSource SpringDemo/src/pauls/spring applicationContext.xml line 92
The dbcp jar file is in the classpath and my tests run fine. It also can't find Hibernate classes, also in the buildpath.
I get the error on this line:
Here is my context file:Code:<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods" />
Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> <bean name="personBusinessLogic" class="pauls.businesslogic.PersonBusinessLogicImpl"> </bean> <bean name="personDataAccess" class="pauls.dataaccess.PersonDataAccessHibernateImpl" p:session-factory-ref="sessionFactory"> </bean> <bean name="personService" class="pauls.service.PersonServiceImpl"> <property name="personBusinessLogic"> <ref bean="personBusinessLogic" /> </property> <property name="personDataAccess"> <ref bean="personDataAccess" /> </property> <property name="fudgeFactor"> <value>${fudgeFactor}</value> </property> </bean> <bean class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'> <property name="locations"> <list> <value>classpath:database.properties</value> <value>classpath:application.properties</value> </list> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="mappingResources"> <list> <value>pauls/model/Person.hbm.xml</value> <value>pauls/model/Address.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> ${hibernate.dialect} </prop> <prop key="hibernate.hbm2ddl.auto"> ${hibernate.hbm2ddl.auto} </prop> <prop key="hibernate.show_sql">true</prop> <prop key="connection.pool_size">1000</prop> <prop key="hibernate.jdbc.use_get_generated_keys"> ${hibernate.jdbc.use_get_generated_keys} </prop> </props> </property> </bean> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="save*" /> <tx:method name="*" read-only="true" /> </tx:attributes> </tx:advice> <!-- ensure that the above transactional advice runs for any execution of an operation defined by the genericDatabaseService interface --> <aop:config> <aop:pointcut id="serviceMethods" expression="execution(* pauls.service.PersonService.*(..))" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods" /> </aop:config> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${database.jdbc.driverClassName}" /> <property name="url" value="${database.url}" /> <property name="username" value="${database.username}" /> <property name="password" value="${database.password}" /> <property name="initialSize"> <value>100</value> </property> <property name="maxActive"> <value>0</value> </property> <property name="maxWait"> <value>5000</value> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref local="sessionFactory" /> </property> </bean> </beans>


Reply With Quote
