• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot get new screen to work properly; similar screen was recently added successfully

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently added a screen to a small application, everything worked out fine. The Oracle data looks like this:

# Errors Description
755 MED_COV Dup Found
453 MEM_MEMB_TEFRA Dup Found
6 MEM_MEMB_WHCR Dup Found

So my next screen is to drill down on one of the above rows to display all "755 errors", with some additional detail.

The error I keep getting is "Invalid Column Name", but the two screens are using (virtually) the same sql, etc. Here's the error:
Error 500: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select et.srce_sys_cd, trunc(et.load_dt) as date_loaded, et.fld_nm, et.mtrcs_errs_linkg_id from stage3i.err_tbl et where et.mtrcs_errs_linkg_id = to_number(4413) order by et.fld_nm, et.ent_key_id ]; nested exception is java.sql.SQLException: Invalid column name

I think the spring-servlet file is wrong, that's something I don't quite understand. In the first code snippet, "summary" is my good screen but "detail" gets the error.

I "re-use" some pieces of the code but obviously I'm tripped up somewhere.

I've also provided all the components for the working screen ("summary") and the screen with the error ("detail"). Since I had just wrestled with the first screen (and got it working), I don't think it's my screen, I thing it's the spring-mvc file.

Here's a snippet from my spring-mvc file



Here's the code shared between the two sreens:


Here's the components for the screen that works :



Here are the pieces for the screen that doesn't work

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

the two screens are using (virtually) the same sql


They are not virtually the same, they are different
1. Does the ent_key_id column exist ?
2. Why are you setting "linkingId" in ErrorListDetailDAOImpl although it's not used ?
3. Did you try to execute the SQL via a tool like SQL*Plus ?
 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christophe Verré wrote:

the two screens are using (virtually) the same sql


They are not virtually the same, they are different



Well, my point was it's using the same "select" statement [except for the "count(*) ] and the group by.

1. Does the ent_key_id column exist ?

3. Did you try to execute the SQL via a tool like SQL*Plus ?



yes, the Sql works fine in Sql*Plus

2. Why are you setting "linkingId" in ErrorListDetailDAOImpl although it's not used ?



Once I get the screen working, I'll remove the hard-coded "to_number(4413)" and replace it with "to_number(:linkingId)
 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I built it a second time and it worked . . . but thanks anyway.
 
Slime does not pay. Always keep your tiny ad dry.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic