Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 22nd, 2008, 12:42 PM
Klava Klava is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 3 Klava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 32 sec
Reputation Power: 0
Question FBSQLException 335544358 message length error (encountered 0, expected 8)

Hi,
I am trying to execute stored procedure.
When I do it from SQL command line, data gets inserted just fine. I do select *. The data is there, everything looks good.
If I am trying to execute the same stored procedure from within Java code (below are parts of it):
PreparedStatement stm = null;
ResultSet r;
r = stm.executeQuery();
I get this error:
FBSQLException 335544358 message length error (encountered 0, expected 8)
I am able to execute another stored procedure using the same Java code. String "Execute Procedure..." looks exactly the same in Java and in SQL command line. Have you ever seen above error? What could be causing it?
Thank you in advance.

Reply With Quote
  #2  
Old April 22nd, 2008, 12:55 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 8,527 pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 1 Day 3 h 19 m 49 sec
Reputation Power: 537
Are you shure about your code, what you posted
Quote:
PreparedStatement stm = null;
ResultSet r;
r = stm.executeQuery();
shouldn't work

Reply With Quote
  #3  
Old April 22nd, 2008, 12:58 PM
Klava Klava is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 3 Klava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 32 sec
Reputation Power: 0
code

I posted a small part of it. Let me know if you need much more info. It works fine for other stored procedure.
Do you want more info?
Thanks.

Reply With Quote
  #4  
Old April 22nd, 2008, 01:04 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 8,527 pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 1 Day 3 h 19 m 49 sec
Reputation Power: 537
Shure, the exact code that gives you an error of course

Reply With Quote
  #5  
Old April 22nd, 2008, 03:58 PM
Klava Klava is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 3 Klava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 32 sec
Reputation Power: 0
Fixed it.

I fixed it. It turned out to be known firebird bug. I used "select * from PROC_NAME..." instead of "execute PROC_NAME..." and it worked.
Thank you for looking into this anyway.

Reply With Quote
  #6  
Old December 2nd, 2012, 02:00 AM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 50 m 14 sec
Reputation Power: 11
I want to share my experience with this error, I encounter just yesterday. In my case the stored procedure was called with EXECUTE PROCEDURE inside another SP. There wasn't any SUSPEND in the called procedure, that is why I called it with EXECUTE statement.
In my case - the application that used the procedures as first step did a convert to some stored procedures in the database before using them.
As a result I've got the error message length error (encountered xxx, expected yyy).
How I fixed - the Firebird server was Classic server. I had to close all connections to the database and after that to reconnect with my app again( this time without doing the changes - they were already made) and then the application saw the "new"/last/actual versions of the changed procedures and everything was fine after that.
Until now 99% of the time I work with Superserver version of Firebird and that is why I didn't know for that behaviour of the server.
So maybe this is another reason for that error. I didn't find another case like mine, so I hope that this post will help someday somebody not to

Last edited by mIRCata : December 2nd, 2012 at 11:25 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > FBSQLException 335544358 message length error (encountered 0, expected 8)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap