| Joined: Thu Aug 31, 2006 10:58 am
 Posts: 1
 | 
				
					| Why does this error occur ? There is a determinated reason or it may occur in many situations ?
 thanks for help.
Hibernate version:3.0.5
Mapping documents: <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 <hibernate-mapping>
 <class name="hibernate.dao.Clientes" table="clientes" catalog="meubanco">
 <id name="id" type="integer">
 <column name="id" />
 <generator class="native" />
 </id>
 <property name="codigo" type="long">
 <column name="codigo" not-null="true" />
 </property>
 ...
 Code between sessionFactory.openSession() and session.close():
 
 Code: public Object[] pesquisar(String select) throws DbException {Object[] resultado = null;
 try{
 Session session = ConcentradorSessionFactory.currentSession();
 Query query = session.createQuery(select);
 List listGrupo = query.list();
 if (listGrupo.size() > 0)
 resultado = listGrupo.toArray();
 }catch (HibernateException he){
 throw new DbException(he, Base.rb.getString("erroPesquisar"));
 }catch (Exception ex){
 throw new DbException(ex, Base.rb.getString("erroPesquisar"));
 }finally{
 fechaSessao();
 }
 return resultado;
 }
 
 Full stack trace of any exception that occurs:
 exception.DbException
 at lib.DAOAdapter.pesquisar(DAOAdapter.java:123)
 at hibernate.bo.ClientesBO.pesquisar(ClientesBO.java:18)
 at comunicacao.GeraMovoutra.getClientes(GeraMovoutra.java:1781)
 at comunicacao.GeraMovoutra.trataFinalizador(GeraMovoutra.java:966)
 at comunicacao.GeraMovoutra.trataCupom(GeraMovoutra.java:350)
 at comunicacao.GeraMovoutra.geraMovimento(GeraMovoutra.java:297)
 at comunicacao.GeraMovoutra.run(GeraMovoutra.java:89)
 at gui.listener.TelaGeraExportaMovtoListener.actionPerformed(TelaGeraExportaMovtoListener.java:115)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
 at java.awt.Component.processMouseEvent(Unknown Source)
 at javax.swing.JComponent.processMouseEvent(Unknown Source)
 at java.awt.Component.processEvent(Unknown Source)
 at java.awt.Container.processEvent(Unknown Source)
 at java.awt.Component.dispatchEventImpl(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Window.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.EventQueue.dispatchEvent(Unknown Source)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.run(Unknown Source)
 19/10/2006 15:12:19 org.hibernate.hql.ast.ErrorCounter reportError
 SEVERE: *** ERROR: line 1:56: unexpected token: 88440
 
 Name and version of the database you are using:
 MySQL 5.0
 The generated SQL (show_sql=true):
 
 Hibernate: select clientes0_.id as id, clientes0_.codigo as codigo4_, clientes0_.razsoc as razsoc4_, clientes0_.ender as ender4_, clientes0_.bairro as bairro4_, clientes0_.munic as munic4_, clientes0_.estado as estado4_, clientes0_.cep as cep4_, clientes0_.telefone as telefone4_, clientes0_.cgc as cgc4_, clientes0_.dtnasc as dtnasc4_, clientes0_.ultcompra as ultcompra4_, clientes0_.situacao as situacao4_, clientes0_.limite as limite4_, clientes0_.saldo as saldo4_, clientes0_.desconto as desconto4_, clientes0_.promocao as promocao4_, clientes0_.descgeral as descgeral4_, clientes0_.fiado as fiado4_, clientes0_.mensagem as mensagem4_, clientes0_.limitechq as limitechq4_, clientes0_.limiteqtch as limiteqtch4_, clientes0_.saldochq as saldochq4_, clientes0_.saldoqtchq as saldoqtchq4_, clientes0_.codbarra as codbarra4_, clientes0_.filler1 as filler26_4_, clientes0_.insest as insest4_, clientes0_.fidacum as fidacum4_, clientes0_.filler2 as filler29_4_, clientes0_.filler3 as filler30_4_, clientes0_.ultcomval as ultcomval4_, clientes0_.saldoconta as saldoconta4_, clientes0_.qtdconta as qtdconta4_, clientes0_.bloqfin as bloqfin4_, clientes0_.preco as preco4_, clientes0_.nivelbloq as nivelbloq4_, clientes0_.nomfan as nomfan4_, clientes0_.senha as senha4_ from concentradordb.clientes clientes0_ where clientes0_.codigo=40031430088440
 
 Problems with Session and transaction handling? No_________________
 Alexandre Boaventura
 
 
 |  |