Wired error in spring jdbc templates:

13 views
Skip to first unread message

Lei

unread,
Mar 13, 2013, 1:24:54 PM3/13/13
to
Question 1:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [select ClinicNo, AdmissionDtTm, PatientName, PatientDOB, PatientGender, NurseUnit, BedLocation from og_icu_demo where ClinicNo= ?]; Error converting data type nvarchar to numeric.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to numeric.
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Question 2:
How to access jstl collection in jquery or javascript in a jsp file?

Lei

unread,
Mar 13, 2013, 1:23:53 PM3/13/13
to
Question 1:
You get this exception if the value that you pass (and want converted) is "".
Makes sense really (once you know).
It's not saying nvarchars are wrong, just that it had an error trying to convert this one.

Question 2:

You can access individual elements with the array [] operator:

<c:out value="${attachments[0].id}" />

This will work for arrays, lists and sets. It won't work for maps. In that case you must put the key of the element inside the brackets.

Reply all
Reply to author
Forward
0 new messages