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.  [ 8 posts ] 
Author Message
 Post subject: Connection aborted due to a communications protocol error ?!
PostPosted: Mon Dec 12, 2005 10:33 am 
Newbie

Joined: Wed Nov 30, 2005 7:53 am
Posts: 9
Hidiho everybody,

Been stuck on this for the last couple of days and getting no where! Hope someone out there knows what this is.

I'm trying to load an object out of an Ingres database that i put there last week. I have no trouble loading objects that match the relationships (i had to build some for early problems!). However when i try and load my more complete objects i get this horrible error...

Code:
Hibernate: select earlywarni0_.EarlyWarningID as UID0_, earlywarni0_2_.critical as critical0_, earlywarni0_2_.corePoolSize as corePool3_0_, earlywarni0_2_.keepAliveTime as keepAliv4_0_, earlywarni0_2_.maximumPoolSize as maximumP5_0_, earlywarni0_2_.queueSize as queueSize0_, earlywarni0_2_.jndiName as jndiName0_, earlywarni0_1_.host as host5_, earlywarni0_1_.interval as interval5_, earlywarni0_1_.port as port5_, earlywarni0_1_.reciever as reciever5_ from EarlyWarning earlywarni0_ inner join WebBasedProcessors earlywarni0_1_ on earlywarni0_.EarlyWarningID=earlywarni0_1_.WebBased_ID inner join ProcessingService earlywarni0_2_ on earlywarni0_.EarlyWarningID=earlywarni0_2_.UID
EDBC-Connect[5].prepareStatement( select earlywarni0_.EarlyWarningID as UID0_, earlywarni0_2_.critical as critical0_, earlywarni0_2_.corePoolSize as corePool3_0_, earlywarni0_2_.keepAliveTime as keepAliv4_0_, earlywarni0_2_.maximumPoolSize as maximumP5_0_, earlywarni0_2_.queueSize as queueSize0_, earlywarni0_2_.jndiName as jndiName0_, earlywarni0_1_.host as host5_, earlywarni0_1_.interval as interval5_, earlywarni0_1_.port as port5_, earlywarni0_1_.reciever as reciever5_ from EarlyWarning earlywarni0_ inner join WebBasedProcessors earlywarni0_1_ on earlywarni0_.EarlyWarningID=earlywarni0_1_.WebBased_ID inner join ProcessingService earlywarni0_2_ on earlywarni0_.EarlyWarningID=earlywarni0_2_.UID )
EDBC-PreparedStatement[250]: 'select earlywarni0_.EarlyWarningID as UID0_, earlywarni0_2_.critical as critical0_, earlywarni0_2_.corePoolSize as corePool3_0_, earlywarni0_2_.keepAliveTime as keepAliv4_0_, earlywarni0_2_.maximumPoolSize as maximumP5_0_, earlywarni0_2_.queueSize as queueSize0_, earlywarni0_2_.jndiName as jndiName0_, earlywarni0_1_.host as host5_, earlywarni0_1_.interval as interval5_, earlywarni0_1_.port as port5_, earlywarni0_1_.reciever as reciever5_ from EarlyWarning earlywarni0_ inner join WebBasedProcessors earlywarni0_1_ on earlywarni0_.EarlyWarningID=earlywarni0_1_.WebBased_ID inner join ProcessingService earlywarni0_2_ on earlywarni0_.EarlyWarningID=earlywarni0_2_.UID'
EDBC-Connect[5].prepareStatement(): EDBC-PreparedStatement[250]
EDBC-PreparedStatement[250].executeQuery()
EDBC-Connect[5].isReadOnly(): false
EDBC-PreparedStatement[250].executeQuery(): EDBC-ResultSet[497]
EDBC-ResultSet[497].next()
SQLException: SQLState(40003) vendor code(15532034)
ca.edbc.util.EdbcEx: Connection aborted due to a communications protocol error.
        at ca.edbc.util.EdbcEx.get(EdbcEx.java:195)
        at ca.edbc.jdbc.RsltFtch.readData(RsltFtch.java:844)
        at ca.edbc.jdbc.EdbcObj.readResults(EdbcObj.java:661)
        at ca.edbc.jdbc.RsltFtch.load(RsltFtch.java:358)
        at ca.edbc.jdbc.RsltCurs.load(RsltCurs.java:245)
        at ca.edbc.jdbc.EdbcRslt.next(EdbcRslt.java:573)
        at org.hibernate.loader.Loader.doQuery(Loader.java:685)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
        at org.hibernate.loader.Loader.doList(Loader.java:2147)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
        at org.hibernate.loader.Loader.list(Loader.java:2021)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
        at meta.system.SystemResurector.load(SystemResurector.java:483)
        at meta.system.SystemResurector.loadEarlyWarning(SystemResurector.java:478)
        at meta.system.SystemResurector.main(SystemResurector.java:374)
SQLException: SQLState(40003) vendor code(15532034)
ca.edbc.util.EdbcEx: Connection aborted due to a communications protocol error.
        at ca.edbc.util.EdbcEx.get(EdbcEx.java:195)
        at ca.edbc.io.DbConnIn.receive(DbConnIn.java:540)
        at ca.edbc.jdbc.EdbcObj.readResults(EdbcObj.java:643)
        at ca.edbc.jdbc.RsltFtch.closeCursor(RsltFtch.java:454)
        at ca.edbc.jdbc.RsltCurs.closeCursor(RsltCurs.java:290)
        at ca.edbc.jdbc.RsltFtch.shut(RsltFtch.java:509)
        at ca.edbc.jdbc.RsltFtch.load(RsltFtch.java:362)
        at ca.edbc.jdbc.RsltCurs.load(RsltCurs.java:245)
        at ca.edbc.jdbc.EdbcRslt.next(EdbcRslt.java:573)
        at org.hibernate.loader.Loader.doQuery(Loader.java:685)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
        at org.hibernate.loader.Loader.doList(Loader.java:2147)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
        at org.hibernate.loader.Loader.list(Loader.java:2021)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
        at meta.system.SystemResurector.load(SystemResurector.java:483)
        at meta.system.SystemResurector.loadEarlyWarning(SystemResurector.java:478)
        at meta.system.SystemResurector.main(SystemResurector.java:374)
EDBC-ResultSet[497].next(): error loading data
EDBC-ResultSet[497].close()


Not very pleasent at all. I'm using the lastest ingres version and i've rebuilt my Hibernate with the lastest Dialect. Have included the SQl in the hope this helps. Ingres is being its usual helpful self and giving me its standard 'somethings wrong error'

Code:
!test8   ::[32849        IIGCD, 00000000]: Mon Dec 12 09:29:46 2005 E_GC4807_CONN_ABORT Aborting client connection, reason follows.
!test8   ::[32849        IIGCD, 00000000]: Mon Dec 12 09:29:46 2005 E_CLFE07_BS_READ_ERR Read from peer process failed; it may have
!exited.


Hope some1 can help cause i sorely need some!

Cheers

Tom


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 11:00 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
It looks like SQL string is too long, I hope this limitation is configurable.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 11:35 am 
Newbie

Joined: Wed Nov 30, 2005 7:53 am
Posts: 9
The SQLs not that long. Surely Hibernate (pretty sure ingres can handle sql at that length and know for certain that mySql, which is surposed to be of a lower pedigree can handle much longer statements) can deal with this? Is there a config setting to increase Hibernates max sql length? Plus if that was the case surely it would give a more informative error message, something like 'Sql to long' for instance :)

Abit sarcy i know, but this has me climbing walls and eating plasticene!

Tom


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 11:49 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
This error is reported by driver, driver can not know the reason if server drops connection. I see server detects error in protocol and drops connection (you must find a reason in ingres error log, it can be a driver bug or some limitation like SQL string length)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 11:10 am 
Newbie

Joined: Wed Nov 30, 2005 7:53 am
Posts: 9
Hi baliukas,

Its appears that Hibernate is actually generating invalid sql. Bold i know, but (assuming that the output from hibernate is exactly what it send to the db) when i try and run the statement directly into Ingres i get this.

Code:
1> select earlywarni0_.EarlyWarningID as UID0_, earlywarni0_2_.critical as cr
     itical0_, earlywarni0_2_.corePoolSize as corePool3_0_, earlywarni0_2_.keep
     AliveTime as keepAliv4_0_, earlywarni0_2_.maximumPoolSize as maximumP5_0_,
      earlywarni0_2_.queueSize as queueSize0_, earlywarni0_2_.jndiName as jndiN
     ame0_, earlywarni0_1_.host as host5_, earlywarni0_1_.interval as interval5
     _, earlywarni0_1_.port as port5_, earlywarni0_1_.reciever as reciever5_ fr
     om EarlyWarning earlywarni0_ inner join WebBasedProcessors earlywarni0_1_
     on earlywarni0_.EarlyWarningID=earlywarni0_1_.WebBased_ID inner join Proce
     ssingService earlywarni0_2_ on earlywarni0_.EarlyWarningID=earlywarni0_2_.
     UID

E_US0846 Invalid qualifier 'earlywarni0_2_'. 'earlywarni0_2_' must be
    declared in the FROM clause or equivalent. If used in a target list,
    'earlywarni0_2_' must be declared at the current scope.
    (Fri Dec 16 09:46:55 2005)


End of Request - Terminated by Errors


I've jst rebuilt the hibernate jar with a fresh copy of the ingres dialect to be sure that it was'nt incorrect and made sure there are'nt any old ones around, but no joy i'm afriad.

Are you aware of any problems using Hibernate with Ingres?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 11:09 am 
Newbie

Joined: Wed Nov 30, 2005 7:53 am
Posts: 9
Have manged to modify the Ingres Dialect so it produces sql thats accepted by Ingres, though tthe console tools. However still getting the same error when Hibernate trys to submit it.

Getting abit put off now.

Tom


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 11:20 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
It looks like SQL is correct. Ingres suppors standard "JOIN", doe's not it ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 11:42 am 
Newbie

Joined: Wed Nov 30, 2005 7:53 am
Posts: 9
Problem sovled:

Was the edbc driver all along, switch to using iijdbc an was well!

Tom


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.