-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: JDBCExceptionReporter:36 - SQL Exception
PostPosted: Sun Feb 15, 2004 10:39 am 
Newbie

Joined: Thu Feb 12, 2004 9:48 am
Posts: 12
Location: Campina Grande, PB, Brazil
Greetings, everyone.

I'm having a problem retrieving the values of an entity from the database. I'm using the following mapping:

Code:
<hibernate-mapping schema="balcomMessenger" auto-import="true">

    <class
      name="br.com.balcom.messenger.bean.Mensagem"
      table="MENSAGEM"
      lazy="false">
       
       <id name="id" type="integer" column="ID">
         <generator class="native">
           </generator>
      </id>
      
      <property
         name="altaPrioridade"
         column="ALTA_PRIORIDADE"
         type="boolean"
      />
      
      <property
         name="assunto"
         column="ASSUNTO"
         type="string"
      />
      
      <property
         name="conteudo"
         column="CONTEUDO"
         type="text"
      />
         
      <many-to-one
         name="remetente"
         class="br.com.balcom.messenger.bean.Pessoa"
         column="ID_REMETENTE"
         cascade="delete"
         outer-join="auto"
         access="property"
      />
      
      <set
         name="anexos"
         table="ANEXO"
         lazy="true"
         order-by="ID_MENSAGEM desc">
         
         <key column="ID_MENSAGEM" />
          <one-to-many class="br.com.balcom.messenger.bean.Anexo" />
         
      </set>
      
      <set
         name="destinatarios"
         table="MENSAGEM_PESSOA"
         lazy="false"
         order-by="ID_MENSAGEM desc">
         
         <key column="ID_MENSAGEM" />
         <many-to-many column="ID_PESSOA" class="br.com.balcom.messenger.bean.Pessoa"/>
         
      </set>

   </class>

</hibernate-mapping>


When I access the properties of one "Mensagem" entity, via its Bean (Mensagem.java), I get the following messages in the logging:

Code:
DEBUG Loader:404 - result row: 1
DEBUG Loader:535 - Initializing object from ResultSet: 1
DEBUG Loader:604 - Hydrating entity: br.com.balcom.messenger.bean.Mensagem#1
11:20:39,140 DEBUG BooleanType:68 - returning 'true' as column: ALTA_PRI2_0_
11:20:39,140 DEBUG StringType:68 - returning 'Amigos, consegui!' as column: ASSUNTO0_
11:20:39,160 DEBUG JDBCExceptionReporter:36 - SQL Exception
com.mysql.jdbc.jdbc2.NotImplemented
        at com.mysql.jdbc.jdbc2.ResultSet.getCharacterStream(Unknown Source)
        at net.sf.hibernate.type.TextType.get(TextType.java:29)
        at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
        at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
        at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
        at net.sf.hibernate.loader.Loader.hydrate(Loader.java:610)
        at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:551)
        at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:510)
        at net.sf.hibernate.loader.Loader.getRow(Loader.java:425)
        at net.sf.hibernate.loader.Loader.doQuery(Loader.java:208)
        at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
        at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:909)
        at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:884)
        at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.java:69)
        at net.sf.hibernate.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:284)
        at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3133)
        at net.sf.hibernate.collection.PersistentCollection.forceInitialization(PersistentCollection.java:331)
        at net.sf.hibernate.impl.SessionImpl.initializeNonLazyCollections(SessionImpl.java:3007)
        at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:137)
        at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
        at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:109)
        at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3440)
        at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:177)
        at br.com.balcom.messenger.BalcomMessenger.getPessoa(BalcomMessenger.java:76)


I have a bean called Pessoa (Person), which has a set of CaixaDeMensagens (something like MessageBox), and a CaixaDeMensagens has a set of Mensagem (Message). When I call BalcomMessenger.getPessoa, I'm retrieving this bean from the database via a hibernate session. I wonder if that's the property "conteudo" (contents) of the bean "Mensagem" that, by any reason, is not being able to be retrieved.

Please, help.

Best regards,
julioaragao


Top
 Profile  
 
 Post subject: Re: JDBCExceptionReporter:36 - SQL Exception
PostPosted: Sun Feb 15, 2004 12:24 pm 
Newbie

Joined: Thu Feb 12, 2004 9:48 am
Posts: 12
Location: Campina Grande, PB, Brazil
Quote:
Well, in the meantime between the sending of the message and anyone's reply, I solved this one just by switching the mysql_jdbc_connector for its newer version. I think the cause of the problem was that I was using a version too old of that .jar


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.