SQL 2 « Database « Spring Q&A





1. logging SQL parameter values on exception    forum.springsource.org

2. MSSQL driver error: Null parameters crash    forum.springsource.org

MSSQL driver error: Null parameters crash Hello. MSSQL. I'm trying to execute stored proc: getJdbcTemplate().update("{spw_updateuserinfo(?, ?)}", new Object[] {userId, userName}); spw_updateuserinfo only updates record. userId == 6, userName == null. Dispalayed: ...

3. CustomEditor and java.sql.Date    forum.springsource.org

Is there a way to define a CustomEditor for a java.sql.Date? When trying the CustomDateEditor provided by Spring, it gives me an error message since it obviously only works with java.util.Date ...

4. CustomDateEditor and java.sql.Date    forum.springsource.org

CustomDateEditor and java.sql.Date I'm getting the following error when I try to submit a form containing a date. The property in question is actually a java.sql.Date, not a regular java.util.Date. "Failed ...

5. Executing raw SQL and returning XML    forum.springsource.org

Hello, I was wondering how to execute sql that can be processed as the data is being returned. I need to return XML after the query completes and I would rather ...

6. sql-error-codes.xml and also NestedExceptions    forum.springsource.org

sql-error-codes.xml and also NestedExceptions Two quick questions. If I am just trying to use the DAO module, I want to verify somethings about the exceptions being thrown from Spring. If I ...

7. Uncategorized SQL Exception while inserting null values for Date/int    forum.springsource.org

Uncategorized SQL Exception while inserting null values for Date/int Hi Everybody, I am accessing SQLServer 2000 via Spring JDBC. I get the following error while inserting null values in the fields ...

8. help me -- how to bind more than one parameters within SQL in clause    forum.springsource.org

how to bind more than one parameters within SQL in clause conveniently when I use Spring JdbcTemplate: jdbcTemplate.queryForList( "select * from person where id in(?)",new Object[]{"'1','2'"}); ........... exception will occur. puzzling........ ...

9. Native SQL queries and JpaDaoSupport?    forum.springsource.org

We have some native SQL queries that we must somehow execute. Our DAO extends JpaDaoSupport but we can't find a way to 1) Execute native queries in it. 2) Get the ...





10. SQL and Spring ...    forum.springsource.org

SQL and Spring ... Sorry if this topic has already been discussed but I have tried to search for it and found nothing. Looking at all the examples of how to ...

11. SQLErrorCodeSQLExceptionTranslator & MS-SQL    forum.springsource.org

SQLErrorCodeSQLExceptionTranslator & MS-SQL I'd like a bit of help using SQLErrorCodeSQLExceptionTranslator, if anybody can provide it. Here's the scenario... My DAO implementation uses JDBCTemplate to invoke stored procedures in our Microsoft ...

12. Named Parameter with SQL "IN" Condition    forum.springsource.org

Hi, I'm working with Spring 2.0 M5 JDBC, in particular the NamedParameterJdbcTemplate, and I'm having some difficulty retrieving data back using an IN condition in my SQL statement. Say I have ...

13. Oracle.sql.STRUCT    forum.springsource.org

Oracle.sql.STRUCT I ran into a problem when learning Spring. Can somebody please help me? I defined a Type in Oracle: Code: create type Address_type as object (street varchar2(50), city varchar2(25), state ...

14. JAMon 2.1 SQL/JDBC Monitoring now available    forum.springsource.org

For an easy way to monitor JDBC and SQL statements check out the new release of the JAMon open source project. If you have used the JAMon interceptor available via Spring ...

15. Capturing all SQL bind variables for exceptions    forum.springsource.org

16. Logging SQL    forum.springsource.org

Logging SQL Please let me know if there is more to logging SQL with Hibernate (3.0) than the following (used with Spring 1.2.8): 1) sessionFactory.xml (loaded from contextConfigLocation) //... ...





17. Question about binding arguments to sql    forum.springsource.org

I'm trying to use JdbcTemplate.queryForList(String sql, Object[] args). My question is do I pass in an sql query in typical PreparedStatement format using '?' to indicate query params, and the args ...

18. The solution I've taken to a SQL Server 2005 error    forum.springsource.org

The solution I've taken to a SQL Server 2005 error Hi Folks, I'm calling a series of stored procedures on SQL Server 2005 using Spring's StoredProcedure class. I came across an ...

19. Sql Join    forum.springsource.org

Sql Join All - I'm new to the forum, please bear with me. I have to sql maps that are access two oracle tables. The problem that I'm having is that ...

20. java.sql.Types, how strict?    forum.springsource.org

java.sql.Types, how strict? This is probably an SQL newbie question. I'm using the JDBC template stuff; org.springframework.jdbc.core.SqlParameter; org.springframework.jdbc.object.SqlUpdate; In a class I have an init() method that looks like the following ...

21. My SQL 5    forum.springsource.org

Sep 27th, 2006, 02:05 AM #1 shahzad992 View Profile View Forum Posts Private Message Senior Member Join Date Nov 2005 Posts 148 My SQL 5 Hi, i have updated my Database ...

22. Advice Needed: Static SQL Location?    forum.springsource.org

I'm considering using some static SQL in a Spring controller, and I would like some advice. I like the thought of injecting the SQL from the application context using Spring, and ...

23. Common SQL    forum.springsource.org

Common SQL For those using iBATIS, how do you have your SQL maps (XML) organized if you have SQL that's common to many views? I have created a Common.xml file, and ...

24. JDBC sql: where author=? or author is null    forum.springsource.org

Hi, Can someone please tell me the best way to do sql "select ... from table where author=?" but where you may wish to set it to null - e.g. execute ...

25. PreparedStatementCallback; bad SQL grammar    forum.springsource.org

PreparedStatementCallback; bad SQL grammar I am preparing a complex sql statement and have few nested queries. I get the following trace when I try to execute this Query using Spring JDBC ...

26. Acls Sql    forum.springsource.org

Much of the SQL in the ACLS package is not portable, example is much of it doesn't work on Oracle. Maybe It could use JPA? Steve

27. Regarding Syntax error in my SQL while insert    forum.springsource.org

Regarding Syntax error in my SQL while insert Hi, When i insert record with simple english text, it works fine. But when i insert record with following text, it gives me ...

28. sql is required problem    forum.springsource.org

sql is required problem Hi I tried to call a store procedure using a class that extends StoredProcedure. The problem is that when I deploy it, it gives an error: Code: ...

29. sql-error-codes.xml question    forum.springsource.org

Good afternoon, I have a case where it does not seem like the application is picking up the sql-error-codes.xml file. The odd thing is this was working up until about a ...

30. Issue Integrating Spring JBOSS and MSSQL server    forum.springsource.org

Jan 30th, 2007, 09:50 AM #1 annpan View Profile View Forum Posts Private Message Junior Member Join Date Jan 2007 Posts 1 Issue Integrating Spring JBOSS and MSSQL server Hi, Im ...

31. Sql Query    forum.springsource.org

Sql Query Can I execute simple sql query in Hibernate fro eg: Code: String stat = "select count(*) count,fnu_id,trunc(hit_timestamp) hit_timestamp from fnu_hits group by fnu_id,trunc(hit_timestamp) order by fnu_id,trunc(hit_timestamp)"; Iterator result = ...

32. How to log sql queries from Jasper Reports?    forum.springsource.org

Is there some special trick to log the prepared statements from Jasper Reports? I'm using log4j, and I have java.sql listed in my JBoss log4j.xml (which prints out all my other ...

33. Applying AOP to javax.sql.DataSource.getConnection(..)) method    forum.springsource.org

Hi, I am currently using Spring 1.1 and want to use certain AOP concepts, what i actually want to apply an avice after the "javax.sql.DataSource.getConnection(..))" method is called. Currently the datasource ...

34. You have an error in your SQL syntax    forum.springsource.org

Feb 27th, 2007, 02:14 AM #1 Dosihris View Profile View Forum Posts Private Message Senior Member Join Date Dec 2006 Posts 150 You have an error in your SQL syntax Hi, ...

35. You have an error in your SQL syntax    forum.springsource.org

Feb 27th, 2007, 03:08 PM #1 Dosihris View Profile View Forum Posts Private Message Senior Member Join Date Dec 2006 Posts 150 You have an error in your SQL syntax Hi, ...

36. SQL Maps Memory Leak    forum.springsource.org

SQL Maps Memory Leak I am running a Spring 2.0 application with SQL Maps on JBoss 4.0.5 with Tomcat. I am trying to track down a memory leak inside the application. ...

37. How to execute an sql script file    forum.springsource.org

How to execute an sql script file Hi, I have a need to execute a ".sql" file (containing select query statement along with several other oracle sql commands) and then capture ...

38. Question re. "sql-error-codes.xml"    forum.springsource.org

How come this file contains so few properties for error types? For instance Oracle (shown below) has only six, surely this is not sufficient to deal with all possible exceptions that ...

39. How to print the SQL Query for a StatementID    forum.springsource.org

How to print the SQL Query for a StatementID Iam using Spring2.0 framework, and iam implementing my DAO Class using Ibatis framework. This is the migration project , and iam supposed ...

40. Problem with database name in SQL query    forum.springsource.org

Problem with database name in SQL query Hello, I use class MappingSqlQuery for fetching data from Informix database. There I use SQL query in which specify database name using syntax database_name:table_name ...

41. how to find SQL Query based on StatementID    forum.springsource.org

how to find SQL Query based on StatementID Iam using Spring with iBatis framework I have the following requirement. I have to implement Batch execute function which takes the list of ...

42. passing parameters to sql    forum.springsource.org

passing parameters to sql Hi, I'm using JdbcTemplate to fetch results from database, The query is String envHost = "SELECT * FROM AC_FBCAPP_V WHERE classification IN (?) and hostname IN (select ...

43. help with sql query    forum.springsource.org

dr_pompeii, no problem - that was just a moment for me :-) btw. i've noticed that we have the same year of birth - 1981 :-)) cheers!

44. spring JDBC template. delete sql    forum.springsource.org

spring JDBC template. delete sql hi all, i am trying to use following sql statement in jdbc template delete from Error e join Message m " + "on e.messageId = m.id ...

45. Map SQL query results to Java Enum?    forum.springsource.org

Hello, Thus far I've been unsuccessful in finding a resolution to my problem. I'm hoping that somebody here will be able to help. I use ant's xjc task to create objects ...

46. Getting SQL state [null]; error code [17041]; Missing IN or OUT parameter at index::    forum.springsource.org

Getting SQL state [null]; error code [17041]; Missing IN or OUT parameter at index:: I think I am doing everything correct. However, I am getting following error -- org.springframework.jdbc.UncategorizedSQLException : CallableStatementCallback; ...

47. TYPES.null error with Spring/MS SQL server jdbc driver configuration    forum.springsource.org

TYPES.null error with Spring/MS SQL server jdbc driver configuration When setNull() is called with second parameter Types.NULL, it causes a null pointer exception in the MS JDBC driver. Configuration: SQL server ...

48.  not being called    forum.springsource.org

Jul 11th, 2007, 09:34 PM #1 MrCodeMan View Profile View Forum Posts Private Message Junior Member Join Date Jul 2007 Posts 10 not being called I'm using Spring with Hibernate ...

49. Value '0000-00-00' can not be represented as java.sql.Timestamp    forum.springsource.org

Value '0000-00-00' can not be represented as java.sql.Timestamp I'm upgrading my db server from mysql 4.0.23 to 5.0 and i have also updated mysql connector from 3.1 to 5.0.3. I'm using ...

50. Retrieving meta data from a sql query / store procedure    forum.springsource.org

Retrieving meta data from a sql query / store procedure Hi, I'd like to use Spring to abstract from different databases that I am using. I have to run plain sql ...

51. SQL:Like condition problem    forum.springsource.org

I am using SQL:Like condition in my application for fetching records from data base but I am experiencing binding error and here is details, SQL Query I need to execute is: ...

52. log sql when exception is thrown    forum.springsource.org

log sql when exception is thrown Hi, I am try to figure out how to globally log the original sql statement when an exception is thrown during one of the JdbcTemplate ...

53. Native SQL cast error    forum.springsource.org

Code: I want to search, using ...

54. SQL Server connections not getting closed w/ Exception    forum.springsource.org

Hi, We're using SQL Server 2000, and Spring 1.2. We're also using the Spring StoredProcedure mechanism to call our sql server stored procs. Everything is working great unless the stored procedure ...

55. show generated SQL    forum.springsource.org

Hi, I'm using Spring's support for JDBC, specifically I have a DAO that extends NamedParameterJdbcDaoSupport. I'd like to see the SQL that this is generating, in particular, I want to see ...

56. Auth using usersByUsernameQuery SQL    forum.springsource.org

Auth using usersByUsernameQuery SQL My bean is mapped appropriately in applicationContext.xml: SELECT username, password, status as enabled FROM users WHERE username=? ...

57. Retrieve identity using SCOPE_IDENTITY in SQL Server    forum.springsource.org

Retrieve identity using SCOPE_IDENTITY in SQL Server Hi, The petclinic sample application (provided with spring) inserts records into the database and then retrieves the identities of the inserted records. I would ...

58. SQL Cursor Input Source - clarifications    forum.springsource.org

SQL Cursor Input Source - clarifications Hi, Just to clarify some issues regarding SQL Cursor input source. A) Will the query get executed every time when the application starts up. What ...

59. java.sql.DataTruncation    forum.springsource.org

java.sql.DataTruncation Hi All, I have some difficulty in inserting a CLOB value into a MS SQLServer 2000 Text type field. The update I have coded is as follows: private int updateCommand(VCommand ...

60. UNION in Sql Query    forum.springsource.org

UNION in Sql Query I'm using UNION in my query. If I execute the query on the command center it is fine.But in the application it is giving me this error.. ...

61. SQL Error: 17059 could not obtain internal representation    forum.springsource.org

Jan 16th, 2008, 08:06 AM #1 ROSPRING View Profile View Forum Posts Private Message Junior Member Join Date Dec 2007 Posts 16 SQL Error: 17059 could not obtain internal representation Hi, ...

62. How to bind String to java.sql.Timestamp?    forum.springsource.org

How to bind String to java.sql.Timestamp? Hi, My command bean has a property businessDate of type java.sql.Timestamp. I have initBindler in my simpleformcontroller like below. @Override protected void initBinder(HttpServletRequest request, ServletRequestDataBinder ...

63. SQL Queries in Spring Config File    forum.springsource.org

I dont think that there is a specific way to include SQL in the applicationContext. And I dont think SQL should be declared in the applicationContext. You can always use the ...

64. Cachable SQL query    forum.springsource.org

Cachable SQL query Hi , i have several daos some of them extend hiberantedaosupport and some of them extend jdbcdaosupport , i allso have an sqlQueries.xml files which is a spring ...

65. SQL parameters    forum.springsource.org

SQL parameters Hi, I've been looking around and I haven't found a way to feed parameters into the query in JdbcCursorItemReader. The idea would be to have some SQL query like: ...

66. Get changed fields for Update sql    forum.springsource.org

Get changed fields for Update sql Hi, I am looking for some sort of implementation that can list me only the changed fields when executing an update sql. I am basically ...

67. InfrastructureException on java.sql.Connection.createStatement(III)    forum.springsource.org

Mar 18th, 2008, 02:30 PM #1 iyengark View Profile View Forum Posts Private Message Junior Member Join Date Mar 2008 Posts 5 InfrastructureException on java.sql.Connection.createStatement(III) Getting Error on createStatement when using ...

68. SQL warning for count() function over null values    forum.springsource.org

SQL warning for count() function over null values Hi All, I have a very big sql statement where I need to do a count(col1) over a column which can have null ...

69. Issue (bug?) with complex SQL and getSimpleJdbcTemplate    forum.springsource.org

Mar 28th, 2008, 07:49 AM #1 cockney View Profile View Forum Posts Private Message Junior Member Join Date Jan 2008 Location London, England Posts 14 Issue (bug?) with complex SQL and ...

70. schema-oracle10g.sql - Does not have complete script    forum.springsource.org

Hello All, I had downloaded 1.0 final release of Spring-Batch and when I looked at schema-oracle10g.sql, it does not have the script for all the tables (while mysql script has all). ...

71. Where to store SQL?    forum.springsource.org

I have a web application which runs lots and lots of select queries on a database, implemented using the Spring Jdbc abstraction layer. At the moment these are stored in a ...

72. Setting sql parameters for the reader    forum.springsource.org

Reader is reading data from the database. In the xml file, value for the property "sql" is set for this reader. I want to include "where id=?" in the sql. How ...

73. how to pass parameter for sql in    forum.springsource.org

Easy, use the named parameter support of the SimpleJdbcTempate (Spring 2.5): Code: List l = simpleJdbcTemplate.queryForList("select count(0) from t_actors where first_name in (:names)", Collections.singletonMap("names", Arrays.asList(new Object[]{"Joe", "jee"}))); Just keep the number ...

74. Newbie: Help for SQL Server    forum.springsource.org

Newbie: Help for SQL Server Hi there, I am totally new to Spring Batch, but have worked with Spring in one project. Can you pls. help me with, or direct me ...

75. Best way to deal with Nested Cursors of a SQL Procedure call    forum.springsource.org

Best way to deal with Nested Cursors of a SQL Procedure call Hello, What is the best way to deal with nested cursors returned from execution of a stored procedure. I ...

76. Best way to deal with Nested Cursors of a SQL Procedure call    forum.springsource.org

Best way to deal with Nested Cursors of a SQL Procedure call Hello, What is the best way to deal with nested cursors returned from execution of a stored procedure. I ...

77. Test Class schema.sql file cannot be found    forum.springsource.org

Test Class schema.sql file cannot be found I'm trying to setup some tests to run a jdbc UserDetailsService. I'm trying to use HSQLDB + some .sql files to setup a test ...

78. using spring app to migrate data from oracle to sqlserver?    forum.springsource.org

using spring app to migrate data from oracle to sqlserver? I currently am using a spring/hibernate application to store data into an Oracle database. I need to convert the database to ...

79. SQL Logging    forum.springsource.org

Since we don't use Spring JDBC in the cursor reader there is nothing out of the box. I would add some logging to the PreparedStatementSetter, and use a static public field ...

80. SQL Server 2000 not recognizing OUTPUT parameter    forum.springsource.org

Jul 11th, 2008, 05:18 PM #1 fphan View Profile View Forum Posts Private Message Junior Member Join Date Mar 2008 Posts 10 SqlInOutParameter does not work for SQL Server 2000? I'm ...

81. Could not open ServletContext resource [/sql-map-config.xml]    forum.springsource.org

Could not open ServletContext resource [/sql-map-config.xml] I have a data-services.jar that has an applicationContext-service.xml that has a sqlMapClient in it: Code: sql-map-config-servers.xml Then in ...

82. Repositioning SQL    forum.springsource.org

Repositioning SQL Hi! I'm a complete newbie to SpringBatch and isn't that experienced in Java either. But, I have a background in databases since about 25 years. One of the environments ...

83. SQL error caused by changes to JdbcExecutionContextDao    forum.springsource.org

SQL error caused by changes to JdbcExecutionContextDao JdbcExecutionContextDao was changed from: Code: private static final String STEP_DISCRIMINATOR = "S"; private static final String JOB_DISCRIMINATOR = "J"; ... getJdbcTemplate().getJdbcOperations().query(getQuery(FIND_EXECUTION_CONTEXT), new Object[] { ...

84. native sql in spring    forum.springsource.org

native sql in spring Hi, I'm using hibernate + spring i have a query like "select * from (select..." but i saw that "select" is not supported after "from". Then i ...

85. java.sql.SQLDataException: An attempt was made to get a data value of type 'VARCHAR'    forum.springsource.org

java.sql.SQLDataException: An attempt was made to get a data value of type 'VARCHAR' I am in the process of porting spring apps which uses iBatis and MySQL to use iBatis and ...

86. How (best way) to do "complex" Dynamic SQL Queries in a job    forum.springsource.org

How (best way) to do "complex" Dynamic SQL Queries in a job Hello, I have a job in which the Item Reader reads data in a database. But this step requires ...

87. Help/advice with jdbc/sql corruption    forum.springsource.org

Help/advice with jdbc/sql corruption looking to see if anyone has encountered this before. My application will (infrequently) fail with a database access error. The stack trace (and hence the post to ...

88. spring and MS SqlServer: Mandatory reference '&dataSource'    forum.springsource.org

spring and MS SqlServer: Mandatory reference '&dataSource' Hello forum I have a problem in creating datasource, to connect to a database MSSQL Server 2000, using the driver: com.springsource.net.sourceforge.jtds-1.2.2 Already with a ...

89. How to use javax.sql.datasource with a ConnectionPoolDataSource    forum.springsource.org

How to use javax.sql.datasource with a ConnectionPoolDataSource Hi, We are starting to use Spring as a framework to simplify our JDBC access to DB2. The Spring JDBCTemplate is creating and deleting ...

90. How to execute SQL Script at server startup?    forum.springsource.org

Hi, Currently i am working on a project which uses Struts, Spring, IBatis and MySQL. We have SQL Scripts which contains tables creation, foreign key constraints, seed data insertion statements. Until ...

91. Problem with commit when using Spring JDBC & MSSQL    forum.springsource.org

Problem with commit when using Spring JDBC & MSSQL Hi, I'm using Spring to configure my container managed datasource. My container is Websphere which is used to set up and define ...

92. Override SQL used by JdbcMutableSqlService    forum.springsource.org

Hi all, I am currently using the JdbcMutableSqlService implementation, but I run into problems because the table names do not conform to local coporate naming conventions. Ideally I would like to ...

93. Bad Sql Grammer Exception    forum.springsource.org

Bad Sql Grammer Exception Dear All, I customize one web application which developed under struts spring and hibernate and MySQL with SQL Server.As part of Customization i do changes in the ...

94. JasperReport: embedding sql statement in jrxml doesn't work when running in Spring?    forum.springsource.org

JasperReport: embedding sql statement in jrxml doesn't work when running in Spring? I use IReport create a report, then, I have sql query language inside *.jrxml file. after compile the *.jrxml ...

95. why is petclinic using a dumb sql?    forum.springsource.org

Why do I have to install some random new sql server when mysql/postgres/oracle/microsoft's db are the standards? This is just so dumb and deters me from trying to learn spring mvc. ...

96. Data truncation pronlem while inserting into MS SQL Server 2000 -Spring    forum.springsource.org

Data truncation pronlem while inserting into MS SQL Server 2000 -Spring Hi, I m getting following problem while inserting data into table. database is MS SQL 2000 I m using jtds1.2.2.jar ...

97. Testing mode: no SQL inserts    forum.springsource.org

Testing mode: no SQL inserts I am running some test jobs using JUnit. However, no matter if I take HSQL (standalone, file, memory) or MySQL, I just don't get any records ...

98. Logging EclipseLink SQL using Spring 2.5.6, Log4J    forum.springsource.org

Logging EclipseLink SQL using Spring 2.5.6, Log4J Hello, I have been trying a lot of setup combination to no avail. Here's some background info. - Web application (to be deployed to ...

99. Cannot get boolean value from MSSQL    forum.springsource.org

100. Dynamic Restrictions: SQL-Exception    forum.springsource.org

Dynamic Restrictions: SQL-Exception Hello dear Community, I'm using a Criteria with Restrictions for accessing a list of categories, depending on the UserGroups of the current user. Therefore, I want to use ...