Hibernate e Firebird

Estou tentando acessar o Firebird com o Hibernate, mais, infelismente, não estou conseguindo, o problema não está no driver JDBC, pois, consigo acessar “openStatelessSession”, vou postar um trecho do meu DAO, onde tem as duas funções, a que funciona e a que não:

	@SuppressWarnings("unchecked")
	public List<Cliente> geraLista(Cliente p_cliente) throws Exception {
		StatelessSession sessao = getSessionFactory().openStatelessSession();
		String sql = "Select * from Cliente where NOME like ?";	
		PreparedStatement criteria = sessao.connection().prepareStatement(sql);
		criteria.setString(1, p_cliente.getNome()+"%");
		ResultSet rs = criteria.executeQuery(); // manda executar o sql
		List<Cliente> l_ret = new ArrayList();
		while (rs.next()) {
			Cliente cli = new Cliente();
			cli.setCodigoCliente(rs.getInt("CODIGO_CLIENTE"));
			cli.setNome(rs.getString("NOME"));
			cli.setFantasia(rs.getString("FANTASIA"));
			cli.setTelefone1(rs.getString("TELEFONE1"));
			cli.setDataCadastro(rs.getDate("DATA_CADASTRO"));
			l_ret.add(cli);
		}
		return l_ret;
	}
	@SuppressWarnings("unchecked")
	public List<Cliente> getListParametro(Cliente p_cliente) throws Exception {
		try {	
			Criteria criteria = getSession().createCriteria(Cliente.class); 
			criteria.add(Example.create(p_cliente).enableLike(MatchMode.ANYWHERE).ignoreCase());
			criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
			criteria.addOrder(Order.asc("NOME"));
			List<Cliente> l_tipoproc = criteria.list();
			return l_tipoproc;
		} catch (Exception e) {
			return null;
		}
	}

o q significa não esta conseguindo acessar ? o que ocorre ? kd a Exception ? com o stacktrace ? … c ta usando DialectFirebird ? para se comunicar como banco ?? existem 2 Drivers de firebird, um é o FBDriver o outro é o FirebirdDriver… (não lembro c tem o “r” no fin) … enfim, existem mil possiblidade, pode ser configuração etc etc… o começo do começo, é sabe o problema, pra isso tem q ter a Stacktrace…

de posse da stack trace, é bom aplicar o que esse artigo fala:

Mensagens de erro são feias mas não mentem (nem mordem)
http://www.urubatan.com.br/mensagens-de-erro-sao-feias-mas-nao-mentem-nem-mordem/

posta ai as informações, quanto mais informações vc mostra no problema, mais facil de solucionar, abraço

Me desculpe, segue o erro:

2009-05-20 16:31:06 ERROR [http-8400-2] (JDBCExceptionReporter.java:78) - Not yet implemented.

Na console, mostra que encontrou todas as tabelas, seus campos…

2009-05-20 16:28:13 INFO [main] (SchemaUpdate.java:160) - schema update complete.

O erro acontece, quando tento pesquisar na tabela.

Se eu fizer assim, como segue a baixo via JDBC, funciona:

Class.forName("org.firebirdsql.jdbc.FBDriver"); 
Connection con = DriverManager.getConnection("jdbc:firebirdsql://localhost:3050/d:\\dirtorio\\banco.FDB", "SYSDBA", "masterkey" );                       
Statement s = con.createStatement();
s.execute("SELECT * FROM Cliente WHERE nome like 'JAIR%' ORDER BY NOME ASC");     
ResultSet rs = s.getResultSet();

Esse é meu jdbc.properties

# Banco de Dados

# jdbc.url=jdbc:firebirdsql:IP_SERVIDOR:ALIAS
jdbc.url=jdbc:firebirdsql://localhost:3050/d:\\Chacal\\BD_CHACAL.FDB?charset=WIN1252

jdbc.username=SYSDBA
jdbc.password=masterkey

# --- nao alterar ---
jdbc.driverClassName=org.firebirdsql.jdbc.FBDriver
jdbc.pool=1
jdbc.autocommit=true
jdbc.readonly=false
jdbc.maxwait=10000
hibernate.dialect=org.hibernate.dialect.FirebirdDialect
# -------------------

E aqui o applicationContext.xml

<?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:context="http://www.springframework.org/schema/context" 
	xmlns:jee="http://www.springframework.org/schema/jee" 
	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.5.xsd 
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd 
	http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd 
	http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> 
	
	
	<!-- 
	////////////////////////////////////// 
	Integração do Spring com o Hibernate 
	////////////////////////////////////// 
	--> 
	<!-- 
	Carregamento do Arquivo de Configuracoes do JDBC 
	--> 
	<context:property-placeholder location="classpath:jdbc.properties" />
	<!-- 
	Configuracao do DataSource 
	--> 
    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <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>            
	
	<!--
	Hibernate SessionFactory 
	-->
	<bean id="sessionFactory" 
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource">
			<ref local="dataSource" />
		</property>
		
		<property name="namingStrategy">
			<bean class="org.hibernate.cfg.DefaultComponentSafeNamingStrategy" />
		</property> 
		
		<property name="annotatedClasses">
			<list>
				<!-- Map all files in classpath to the session factory -->
				<value>br.com.mota.model.entity.Aliquota</value>
				<value>br.com.mota.model.entity.Aplicacao</value>
				<value>br.com.mota.model.entity.Atividade</value>
				<value>br.com.mota.model.entity.Bancos</value>
				<value>br.com.mota.model.entity.Cfop</value>
				<value>br.com.mota.model.entity.Cliente</value>
				<value>br.com.mota.model.entity.ConferenciaGrade</value>
				<value>br.com.mota.model.entity.ConferenciaProduto</value>
				<value>br.com.mota.model.entity.ConfiguraEcfs</value>
				<value>br.com.mota.model.entity.Consulta1</value>
				<value>br.com.mota.model.entity.Consulta2</value>
				<value>br.com.mota.model.entity.CustoAnalitico</value>
				<value>br.com.mota.model.entity.CustoSintetico</value>
				<value>br.com.mota.model.entity.Ecfs</value>
				<value>br.com.mota.model.entity.EntradaCompra</value>
				<value>br.com.mota.model.entity.Fabricante</value>
				<value>br.com.mota.model.entity.Filial</value>
				<value>br.com.mota.model.entity.Grade</value>
				<value>br.com.mota.model.entity.Grupo</value>
				<value>br.com.mota.model.entity.Historico</value>
				<value>br.com.mota.model.entity.Medida</value>
				<value>br.com.mota.model.entity.Moeda</value>
				<value>br.com.mota.model.entity.Movbancaria</value>
				<value>br.com.mota.model.entity.Opeestoque</value>
				<value>br.com.mota.model.entity.Operacao</value>
				<value>br.com.mota.model.entity.Produto</value>
				<value>br.com.mota.model.entity.Serie</value>
				<value>br.com.mota.model.entity.Subgrupo</value>
				<value>br.com.mota.model.entity.Tipodoc</value>
				<value>br.com.mota.model.entity.Titulo</value>
				<value>br.com.mota.model.entity.Utilizacao</value>
				<value>br.com.mota.model.entity.VendaTotal</value>
			</list>
		</property>
		
		<!-- Configuracoes do Hibernate -->
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">
					org.hibernate.dialect.FirebirdDialect
				</prop>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.format_sql">true</prop>
				<prop key="hibernate.hbm2ddl.auto">update</prop>
			</props>
		</property>
		
		<property name="eventListeners">
			<map>
				<entry key="merge">
				<bean
					class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener" />
				</entry>
			</map>
		</property>
	</bean>
	<!-- 
	Transaction Manager 
	--> 
	<bean id="transactionManager" 
		class="org.springframework.orm.hibernate3.HibernateTransactionManager"> 
		<property name="sessionFactory"> 
			<ref local="sessionFactory" /> 
		</property> 
	</bean> 
	<!-- Habilita os Services para serem transicionais via a Annotation @Transactional --> 
	<tx:annotation-driven transaction-manager="transactionManager" /> 
	<!-- ============================== AOP DEFINITIONS ================================ --> 
	<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= --> 
	<!-- 
	Activates various annotations to be detected in bean classes: 
	Spring's @Required and @Autowired, as well as JSR 250's @Resource. 
	--> 
	<context:annotation-config /> 
	<!-- Carrega os Beans de Servico --> 
	<context:component-scan 
		base-package="br.com.mota.model.service" /> 
	<!-- Carrega os Beans DAO Hibernate --> 
	<context:component-scan 
		base-package="br.com.mota.model.repository.hibernate" /> 
</beans>

Obs.: Com MySQL, Oracle, PostgreSQL, funciona perfeitamente.

O driver que estou usando é o jaybird.