This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
William Peck
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • 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

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I built it a second time and it worked . . . but thanks anyway.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic