Philipp Kursawe
unread,Nov 4, 2009, 12:10:51 PM11/4/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Hello,
I am running into the the NPE mentioned above:
Internal Exception: org.h2.jdbc.JdbcSQLException: Allgemeiner Fehler:
java.lang.NullPointerException
General error: java.lang.NullPointerException [50000-71]
Error Code: 50000
Call: SELECT order_no, SHORTFALLS, SHORTFALLS_PERCENT, DONE_PERCENT
FROM pbv_order_details WHERE (order_no = ?)
bind => [12]
while the view is defined like this:
CREATE VIEW pbv_order_details (order_no, done_percent,
shortfalls_percent, shortfalls) AS
select
o.order_no as order_no,
100 * (select count(*) from pbv_order_items where
order_no=o.order_no and state!=1) / count(*) as done_percent,
100 * (select count(*) from pbv_order_items where
order_no=o.order_no and state=6) / count(*) as shortfalls_percent,
(select count(*) from pbv_order_items where
order_no=o.order_no and state=6) as shortfalls
from
pbv_order_items p, pbv_orders o where p.order_no =
o.order_no
group by o.order_no
I wonder why the select can even cause a NPE in the first place?