Обсуждение: [JDBC] IllegalState Exception

Поиск
Список
Период
Сортировка

[JDBC] IllegalState Exception

От
Yury Petukhou
Дата:
Dear Sir/Madam,

My name is Yury Petukhou. I have a question on jdbc usage. 

In my application I use postgres-9.4.12.12 JDBC driver. 

When I make an INSERT or SELECT request I get IllegalState Exception with description 
"Received resultset tuples, but no field structure for them"

What can be the reason? I have looked through FAQ and documentation and found only description of the exception but not the reason.

This exception is thrown occasionally not systematically, so it's not an application logic error. Database is used by my application only.

Thank you for reply.

Best regards,
Yury Petukhou

Re: [JDBC] IllegalState Exception

От
Dave Cramer
Дата:
Yury,

I think we need a bit more information. What code is running, etc.


On 6 September 2017 at 05:31, Yury Petukhou <yury.petukhou@gmail.com> wrote:
Dear Sir/Madam,

My name is Yury Petukhou. I have a question on jdbc usage. 

In my application I use postgres-9.4.12.12 JDBC driver. 

When I make an INSERT or SELECT request I get IllegalState Exception with description 
"Received resultset tuples, but no field structure for them"

What can be the reason? I have looked through FAQ and documentation and found only description of the exception but not the reason.

This exception is thrown occasionally not systematically, so it's not an application logic error. Database is used by my application only.

Thank you for reply.

Best regards,
Yury Petukhou

Re: IllegalState Exception

От
Dave Cramer
Дата:
Yury,

I think we need a bit more information. What code is running, etc.


On 6 September 2017 at 05:31, Yury Petukhou <yury.petukhou@gmail.com> wrote:
Dear Sir/Madam,

My name is Yury Petukhou. I have a question on jdbc usage. 

In my application I use postgres-9.4.12.12 JDBC driver. 

When I make an INSERT or SELECT request I get IllegalState Exception with description 
"Received resultset tuples, but no field structure for them"

What can be the reason? I have looked through FAQ and documentation and found only description of the exception but not the reason.

This exception is thrown occasionally not systematically, so it's not an application logic error. Database is used by my application only.

Thank you for reply.

Best regards,
Yury Petukhou

Re: IllegalState Exception

От
rob stone
Дата:

On Wed, 2017-09-06 at 12:31 +0300, Yury Petukhou wrote:
> Dear Sir/Madam,
>
> My name is Yury Petukhou. I have a question on jdbc usage. 
>
> In my application I use postgres-9.4.12.12 JDBC driver. 
>
> When I make an INSERT or SELECT request I get IllegalState Exception
> with description 
> "Received resultset tuples, but no field structure for them"
>
> What can be the reason? I have looked through FAQ and documentation
> and found only description of the exception but not the reason.
>
> This exception is thrown occasionally not systematically, so it's not
> an application logic error. Database is used by my application only.
>
> Thank you for reply.
>
> Best regards,
> Yury Petukhou


IllegalStateException is Throwable, so is this message
"Received resultset tuples, but no field structure for them"
the message or the cause?

You can retrieve both via Throwable.getMessage() and
Throwable.getCause().

This exception is usually caused by changing the data data type of a
parameter mid-stream due to your prepared statement expecting an
integer, say, and receiving a string.

HTH,
Rob


Re: [JDBC] IllegalState Exception

От
rob stone
Дата:

On Wed, 2017-09-06 at 12:31 +0300, Yury Petukhou wrote:
> Dear Sir/Madam,
>
> My name is Yury Petukhou. I have a question on jdbc usage. 
>
> In my application I use postgres-9.4.12.12 JDBC driver. 
>
> When I make an INSERT or SELECT request I get IllegalState Exception
> with description 
> "Received resultset tuples, but no field structure for them"
>
> What can be the reason? I have looked through FAQ and documentation
> and found only description of the exception but not the reason.
>
> This exception is thrown occasionally not systematically, so it's not
> an application logic error. Database is used by my application only.
>
> Thank you for reply.
>
> Best regards,
> Yury Petukhou


IllegalStateException is Throwable, so is this message
"Received resultset tuples, but no field structure for them"
the message or the cause?

You can retrieve both via Throwable.getMessage() and
Throwable.getCause().

This exception is usually caused by changing the data data type of a
parameter mid-stream due to your prepared statement expecting an
integer, say, and receiving a string.

HTH,
Rob