| Author |
Message |
dczyrnek *nix forums beginner
Joined: 05 Sep 2006
Posts: 1
|
Posted: Tue Sep 05, 2006 10:44 am Post subject:
SQL Warning: 17110, SQLState: null - solved
|
|
|
I just solved the problem:
WARN [org.hibernate.util.JDBCExceptionReporter] SQL Warning: 17110, SQLState: null
WARN [org.hibernate.util.JDBCExceptionReporter] Warning: execution completed with warning
or in my case (polish version was).
WARN org.hibernate.util.JDBCExceptionReporter - SQL Warning: 17110, SQLState: null
WARN org.hibernate.util.JDBCExceptionReporter - Warning: wykonywanie ukończono z ostrzeżeniem
why i had the warning:
i had two tables:
<class name="ObjectA">
<id name="resID">
<generator class="native">
<param name="sequence">hibernate_sequence</param>
</generator>
</id>
...
<property name="someNumericValue" type="integer" />
...
</class>
<class name="ObjectB">
<key column="resID"/>
...
<property name="objectACount" formula="(SELECT sum(a.someNumericValue) from object_a a, object_b b WHERE <some rules for joining a with b> )" />
...
</class>
Warning accured because someNumericValues were null.
Property resolver was albe to count the sum but with mentioned warning.
my fix was to secure table column with 'not null' constraint, and filling null values with 0. |
|
| Back to top |
|
 |
psoug *nix forums Guru
Joined: 15 May 2005
Posts: 3492
|
Posted: Fri Jul 07, 2006 6:34 pm Post subject:
Re: Oracle sql completed with warnings...
|
|
|
Lionel wrote:
| Quote: | DA Morgan wrote:
Lets see one non-aggregated column
One aggregated column ... COUNT(...)
No GROUP BY clause
I wonder what could be the problem. ;-)
oops sorry...
Of course there is a "group by a.column1" in my statement
The statement works fine and quickly.
I was just wondering why my jdbc drivers displays a warning and how I could
see the warning under sql*plus or toad.
|
As the warning is a JDBC warning you can not see it under a product not
using that JDBC connection/driver.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org |
|
| Back to top |
|
 |
Lionel *nix forums Guru
Joined: 26 Feb 2005
Posts: 511
|
Posted: Fri Jul 07, 2006 9:51 am Post subject:
Re: Oracle sql completed with warnings...
|
|
|
DA Morgan wrote:
| Quote: | Lets see one non-aggregated column
One aggregated column ... COUNT(...)
No GROUP BY clause
I wonder what could be the problem.
|
oops sorry...
Of course there is a "group by a.column1" in my statement
The statement works fine and quickly.
I was just wondering why my jdbc drivers displays a warning and how I could
see the warning under sql*plus or toad. |
|
| Back to top |
|
 |
akkha1234@gmail.com *nix forums beginner
Joined: 19 Apr 2006
Posts: 14
|
Posted: Thu Jul 06, 2006 8:01 pm Post subject:
Re: Oracle sql completed with warnings...
|
|
|
Thanks, Daniel. You are ahead of me. Please add a group by.
DA Morgan wrote:
| Quote: | Lionel wrote:
The sql statement looks like this:
select a.column1, count(distinct b.id) as nb_b
from table1 a, table2 b
where a.id = b.a_id (+)
Lets see one non-aggregated column
One aggregated column ... COUNT(...)
No GROUP BY clause
I wonder what could be the problem.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org |
|
|
| Back to top |
|
 |
psoug *nix forums Guru
Joined: 15 May 2005
Posts: 3492
|
Posted: Thu Jul 06, 2006 7:01 pm Post subject:
Re: Oracle sql completed with warnings...
|
|
|
Lionel wrote:
| Quote: | The sql statement looks like this:
select a.column1, count(distinct b.id) as nb_b
from table1 a, table2 b
where a.id = b.a_id (+)
|
Lets see one non-aggregated column
One aggregated column ... COUNT(...)
No GROUP BY clause
I wonder what could be the problem.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org |
|
| Back to top |
|
 |
Lionel *nix forums Guru
Joined: 26 Feb 2005
Posts: 511
|
Posted: Thu Jul 06, 2006 10:23 am Post subject:
Re: Oracle sql completed with warnings...
|
|
|
Anthony wrote:
| Quote: | Can you cut and paste the sql statement and run it directly under
SQL*PLUS and then
post both the query and result?
|
The sql statement looks like this:
select a.column1, count(distinct b.id) as nb_b
from table1 a, table2 b
where a.id = b.a_id (+)
If I remove the outer join or the sum, the warning disapears...
nb_b is sometimes null because of the outer join, but the shouldn't be a
warning for that. |
|
| Back to top |
|
 |
akkha1234@gmail.com *nix forums beginner
Joined: 19 Apr 2006
Posts: 14
|
Posted: Wed Jul 05, 2006 6:27 pm Post subject:
Re: Oracle sql completed with warnings...
|
|
|
Can you cut and paste the sql statement and run it directly under
SQL*PLUS and then
post both the query and result?
Lionel wrote:
| Quote: | Hi !!
I found this in the logs of my application server:
org.hibernate.util.JDBCExceptionReporter SQL Warning: 17110, SQLState: null
org.hibernate.util.JDBCExceptionReporter Warning: execution completed with
warning
How can I find the detail of the warnings in oracle ?
I think I found the sql request that raises the warning, but it seems
correct.
thanks. |
|
|
| Back to top |
|
 |
Lionel *nix forums Guru
Joined: 26 Feb 2005
Posts: 511
|
Posted: Wed Jul 05, 2006 5:11 pm Post subject:
Oracle sql completed with warnings...
|
|
|
Hi !!
I found this in the logs of my application server:
org.hibernate.util.JDBCExceptionReporter SQL Warning: 17110, SQLState: null
org.hibernate.util.JDBCExceptionReporter Warning: execution completed with
warning
How can I find the detail of the warnings in oracle ?
I think I found the sql request that raises the warning, but it seems
correct.
thanks. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|