niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle » Server
Oracle sql completed with warnings...
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
dczyrnek
*nix forums beginner


Joined: 05 Sep 2006
Posts: 1

PostPosted: Tue Sep 05, 2006 10:44 am    Post subject: SQL Warning: 17110, SQLState: null - solved Reply with quote

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

PostPosted: Fri Jul 07, 2006 6:34 pm    Post subject: Re: Oracle sql completed with warnings... Reply with quote

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 Smile
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

PostPosted: Fri Jul 07, 2006 9:51 am    Post subject: Re: Oracle sql completed with warnings... Reply with quote

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. Wink

oops sorry...
Of course there is a "group by a.column1" in my statement Smile
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

PostPosted: Thu Jul 06, 2006 8:01 pm    Post subject: Re: Oracle sql completed with warnings... Reply with quote

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. Wink
--
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

PostPosted: Thu Jul 06, 2006 7:01 pm    Post subject: Re: Oracle sql completed with warnings... Reply with quote

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. Wink
--
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

PostPosted: Thu Jul 06, 2006 10:23 am    Post subject: Re: Oracle sql completed with warnings... Reply with quote

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

PostPosted: Wed Jul 05, 2006 6:27 pm    Post subject: Re: Oracle sql completed with warnings... Reply with quote

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

PostPosted: Wed Jul 05, 2006 5:11 pm    Post subject: Oracle sql completed with warnings... Reply with 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
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
The time now is Sat Nov 22, 2008 6:53 am | All times are GMT
navigation Forum index » Databases » Oracle » Server
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Move Oracle 10g database to another location Selt Server 0 Fri Jul 21, 2006 2:14 pm
No new posts Oracle runtime Spitfire Server 0 Fri Jul 21, 2006 1:18 pm
No new posts Oracle Text Score Computation jatinder.1975@gmail.com Server 0 Fri Jul 21, 2006 1:00 pm
No new posts Can a trigger insert records into another oracle server Tauqir Server 2 Fri Jul 21, 2006 12:27 am
No new posts Moving Oracle filesystem to SAN howard Server 1 Thu Jul 20, 2006 11:49 pm

YouTube Proxy | Personal Car Finance | Satellite TV for PC | Problem Mortgage | Credit Reports
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2134s ][ Queries: 20 (0.1246s) ][ GZIP on - Debug on ]