Pessoal estou com o seguinte erro:
java.lang.NoClassDefFoundError: br/com/xxx/ep/afac/modelo/dao/PontoDAO (wrong name: br/com/petrobras/ep/afac/modelo/dao/PontoDao)
Não entendo pois o nome está correto em todos os lugares… segue os arquivos:
application context:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>classpath:afac/db.properties</value>
</property>
</bean>
<bean class="br.com.xxx.ep.afac.negocio.service.impl.PontoServiceImpl" id="pontoService">
<property name="pontoDao" ref="pontoDao"/>
<property name="pontosSelDao" ref="pontosSelDao"/>
</bean>
<bean id="initDbService" class="br.com.xxx.ep.afac.negocio.service.impl.InitDBServiceImpl">
<!--
<property name="file" value="${sqlite.filepath}"/>
-->
</bean>
<!-- DAOS do SQLite -->
<bean id="pontosSelDao" class="br.com.xxx.ep.afac.modelo.dao.sqlite.PontosSelecionadosDAO">
<property name="file" value="${sqlite.filepath}"/>
</bean>
<!-- DAOS do jdbcTemplate -->
<bean id="pontoDao" class="br.com.xxx.ep.afac.modelo.dao.jdbc.PontoJdbcDAO">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
</beans>
PontoServiceImpl:
package br.com.xxx.ep.afac.negocio.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import br.com.xxx.ep.afac.exceptions.AppCException;
import br.com.xxx.ep.afac.modelo.dao.PontoDAO;
import br.com.xxx.ep.afac.modelo.dao.sqlite.PontosSelecionadosDAO;
import br.com.xxx.ep.afac.modelo.entity.Ponto;
import br.com.xxx.ep.afac.negocio.service.PontoService;
public class PontoServiceImpl implements PontoService
{
private Log logger;
private PontoDAO pontoDao;
private PontosSelecionadosDAO pontosSelDao;
public PontoServiceImpl()
{
logger = LogFactory.getLog(getClass());
}
/**
* lista todos os pontos para a combo na tela de grafico
* @return
* @throws AppCException
*/
public List<Ponto> obterSelecionados()throws AppCException{
List<Ponto> pontos = new ArrayList<Ponto>();
try
{
pontos = pontoDao.obterPontos(pontosSelDao.listar());
}
catch(Exception e)
{
String msg = "Nao foi possivel obter todos os pontos";
logger.error(msg, e);
throw new AppCException(msg, e);
}
return pontos;
}
public List<Ponto> obterTodos(){
return pontoDao.obterTodos();
}
//setters
public void setPontoDao(PontoDAO pontoDao) {
this.pontoDao = pontoDao;
}
public void setPontosSelDao(PontosSelecionadosDAO pontosSelDao) {
this.pontosSelDao = pontosSelDao;
}
}
PontoDAO:
package br.com.xxx.ep.afac.modelo.dao;
import java.util.List;
import br.com.xxx.ep.afac.modelo.entity.Ponto;
public interface PontoDAO {
public List<Ponto> obterPontos(List<String> listaCodigos);
public List<Ponto> obterTodos();
}
Alguem faz ideia ??