JDBC 1 « Database « Spring Q&A





1. Lazy Loading DTO fields in Spring    stackoverflow.com

I have a project that is using Spring and is broken down into a couple dozen DAOs and associated DTOs. I'm using JdbcTemplate, but not much else, as it's exactly ...

2. Streaming Data through Spring JDBC, unknown length    stackoverflow.com

I currently have an application that inserts byte[] into our DB through the use of Spring JDBC [SqlLobValue]. The problem is, this is not a scalable way to take in ...

3. using JDBC Connection from presentation tier in 2-tier and 3-tier applications    stackoverflow.com

I am writing a module that will be used in different applications (2-tiers and 3-tiers). I'll need to connect to a DB. so, I made the module requires a java.sql.Connection object as ...

4. Conversion strategies for bind variables    stackoverflow.com

A Spring JDBC question: I use a lot of objects as bind variables which are not automatically mapped to their JDBC equivalents, e.g. jdbctemplate.query(sql, foo, bar, wee) with foo, bar and ...

5. Spring Like clause    stackoverflow.com

I am trying to use a MapSqlParameterSource to create a query using a Like clause. The code is something like this. The function containing it receives nameParam:

String namecount = "SELECT count(*) ...

6. Need help on learning java frameworks quickly    stackoverflow.com

I wrote a piece of java code using threads, JDBC, Java Mail API etc. without using any of the frameworks (read Spring). I am frankly not too comfortable learning them first ...

7. P6Spy - new open source initiative    stackoverflow.com

There is a very usefull open source java tool called P6Spy. It is a proxy JDBC driver that help to log your SQL queries. It does its job very well but last ...

8. After deployment JDBC.Properties outside .Jar not found by Spring anymore    stackoverflow.com

lately a requirement came up to outsource the database settings out of Spring applicationContext.xml. Therefore we wanted to have a jdbc.properties file outside the builded jars, so the user can easily ...

9. If your database tier is only JDBC, is it worthwhile to use Spring?    stackoverflow.com

I was trying to make a case and research if it is worthwhile to use Spring as a middleware library for a system that uses Wicket for the view tier and ...





10. Setting up connection time out using configuration    stackoverflow.com

I realized that I haven't set the time out for the JDBCTemplate using the setQueryTimeOut method. My code is in production as I would ideally want a solution to ...

11. What do these Spring debug messages mean?    stackoverflow.com

I use Spring IoC in my stand-alone Java application. When the application starts it creates a log with start-up info. Some messages I don't understand, please help me to understand them ...

12. Spring framwork with standard JDBC in java    stackoverflow.com

I have a question and I hope you answer it please. I want to use Spring framework with Standard jdbc like this "SELECT usernmae FROM users WHERE username='" + usename + '" Is it ...

13. Spring framework to pass Connection object to legacy code    stackoverflow.com

I am using Spring JDBC 3.0.6. I also have legacy code which uses plain JDBC. There are methods in the legacy code which required java.sql.Connection object. I want to call this ...

14. Overriding BeanPropertyRowMapper to Support JodaTime DateTime    stackoverflow.com

My Domain object has couple of Joda-Time DateTime fields. When I'm reading database values using SimpleJdbcTemplate:

Patient patient = jdbc.queryForObject(sql, new BeanPropertyRowMapper(Patient.class), patientId);
It just fails and surprisingly, no errors ...

15. Spring-JDBC as standalone library    stackoverflow.com

I have a small application that doesn't use Spring container. Now there's a need for this application to access a database, just several small queries, nothing complex. Although I can do ...

16. spring jdbc -- saving queries seperately in xml file    forum.springsource.org

hi guys I have a question about spring jdbc. I see it is very similar to ibatis ORM tool ( it has queryforlist, queryforobject ,ect ) Is it possible that i ...





17. Newb JDBC Connection best practice    forum.springsource.org

I have inherited a web app that uses a SingleConnectionDataSource, which I just read in the docs is "not multi-threading capable". I am concerned about the scalability of the app as ...

18. Spring jdbc and multiple connection pools    forum.springsource.org

Spring jdbc and multiple connection pools Hi, I am using tomcat-dbcp and creating around 5 different pools for as many mysql databases i.e. : ...

19. New bug in the spring jdbc    forum.springsource.org

New bug in the spring jdbc String in_clause = "(120,'JOHN'),(121,'SMITH')"; String sqlString = "SELECT " + "EMPNO," + "ENAME," + "JOB," + "MGR," + "to_char(HIREDATE, 'MM/DD/YYYY') HIREDATE," + "SAL," + "COMM," ...

20. jPetStore cannont make a jdbc connection    forum.springsource.org

jPetStore cannont make a jdbc connection I opened the jPetStore example application. ran "ant all". This seemed to go fine. copied the dist/jpetstore.war file to Tomcat's webapps directory. ran "db/hsqldb>server". started ...

21. jdbc not bound - searched forum but no luck    forum.springsource.org

hi all, I'm getting the infamous 'jdbc is not bound' running from tomcat. here's my spring config: Code: my web.xml: Code: Datasource jdbc/CogServiceDS javax.sql.DataSource Container ...

22. Testing JDBC code    forum.springsource.org

I'm using a SingleConnectionDataSource and JdbcTemplate to run some sql. This is not the main application, but it is still critical. Whats the best way to test my code? Ideally, I'd ...

23. Help with Spring JDBC    forum.springsource.org

Help with Spring JDBC Hello, I am developing a web application with EclipseIDE and I am using the Struts2 and Spring3 frameworks. I am trying to configure the web application acces ...

24. Migrating from traditional jdbc to spring jdbc    forum.springsource.org

Migrating from traditional jdbc to spring jdbc Hello everyone, We would like to migrate from traditional jdbc to spring jdbc template. I was wondering if we can leave the old code ...

25. Complex DB objects + spring-data-jdbc-1.0.0.M1    forum.springsource.org

Complex DB objects + spring-data-jdbc-1.0.0.M1 Hi all I've got a complex database object that I'm trying to map using the recently released spring-data-jdbc-1.0.0.M1 package. We're using Oracle 10. The db object ...

26. help with jdbc tests in petclinic sample    forum.springsource.org

help with jdbc tests in petclinic sample I'm trying to run the jdbc tests that come with the petclinic sample app from https://src.springframework.org/svn/...etclinic/trunk but the jdbc tests in SimpleJdbcClinicTests do not ...

27. Spring JDBC Unit tests    forum.springsource.org

When I looked at the Spring source code I realized that all unit tests make use of mock controls only. Does Spring test its code, for example JDBC classes, with real ...

28. last_inserted_id() and jdbc    forum.springsource.org

last_inserted_id() and jdbc I have a relational table with the following definition: CREATE TABLE heap ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, object MEDIUMBLOB); I would like to use SPRING ...

29. Pointcut on Spring JDBC classes not working    forum.springsource.org

I'm trying to create a pointcut on Spring JDBC classes.. specifically those that implement JdbcOperations. Code: @Pointcut("execution(* org.springframework.jdbc.core.JdbcOperations.*(..))") public void jdbcMethods() {} Then I try some around advice. Code: @Around("jdbcMethods()") public ...

30. JDBC MetaData Through Spring?    forum.springsource.org

JDBC MetaData Through Spring? I'm looking at using Spring as my DAO framework. I'm tired of writing all the try/catch boilerplate for JDBC and Spring seems like a good alternative to ...

31. Integrating Spring JDBC and WebWork2    forum.springsource.org

Integrating Spring JDBC and WebWork2 I've got WebWork2 and Spring's JDBC stuff working great. Thanks to some help from Thomas, I'm even pulling MetaData through Spring. I love it. Now some ...

32. Spring in eclipse RCP - JDBC Problem    forum.springsource.org

Spring in eclipse RCP - JDBC Problem Anyone meet this problem? I can make sure that classes12.jar in my classpath already. Error: org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver]; ...

33. Spring JDBC Opening Read-Only Connection    forum.springsource.org

Spring JDBC Opening Read-Only Connection Quick summary: Spring's JDBC is not allowing me to update tables via SQL, saying that the connection is read-only. Is there a way to force its ...

34. Spring JDBC Storedproc example    forum.springsource.org

Spring JDBC Storedproc example How to implement the code below using Spring Storedproc? Can't find a more complex example anywhere... Thanks, Code: public Collection getAddresses(String pid) { Connection conn = null; ...

35. 500 Error, TransactionException: JDBC begin failed    forum.springsource.org

Aug 10th, 2011, 07:44 AM #1 examarc View Profile View Forum Posts Private Message Junior Member Join Date Aug 2011 Posts 6 500 Error, TransactionException: JDBC begin failed I have a ...

36. Wrapping message processing logic in a separate tx to work with JDBC Msg store    forum.springsource.org

Wrapping message processing logic in a separate tx to work with JDBC Msg store Wrapping message processing logic in a separate tx to work with JDBC Msg store Hello, I'm trying ...

37. How to query for a single decimal value with Spring JDBC    forum.springsource.org

Hi all, I want to query an exchange rate table passing in a currency value like ('EUR'), it should return me a single decimal like '1.56', is below the right way ...

38. jdbc:initialize-database script failures? (Spring 3.0.6) H2 embedded    forum.springsource.org

Oct 7th, 2011, 08:40 PM #1 snashikkar View Profile View Forum Posts Private Message Junior Member Join Date Oct 2011 Location Plano, TX Posts 1 jdbc:initialize-database script failures? (Spring 3.0.6) H2 ...

39. JDBC Abstraction and Spring    forum.springsource.org

JDBC Abstraction and Spring I just read the documentation for JDBC abstraction. I like the features like mapping the query results to an object. If i want to use both JDBC ...

40. Lazy-init jdbc:embedded-database    forum.springsource.org

Hi, Can I lazy init an embedded database?. I use this tag to create it but it seems that this property is not available. Thanks

41. Spring JDBC for unit tests?    forum.springsource.org

Spring JDBC for unit tests? Hi All, Am using Spring Jdbc as the underlying for writing a small Jdbc unit testing framework. I feel Spring Jdbc is the most powerful of ...

42. Issue with Aggregation jdbc message store.    forum.springsource.org

Issue with Aggregation jdbc message store. Hi All, We configured an Aggregator with SimpleMessageStore with reaper timeout of 60secs. ...

43. JDBC: dynamic where clause for SqlQuery    forum.springsource.org

Is there a capability for some implementation of SqlQuery to change/add WHERE CLAUSE dynamically? It would be great to add ORDER BY and paging parameters in Web tier.

44. jdbc:initialize-database - running twice.    forum.springsource.org

More of an observation than a question, But I use the following in a spring file, but find that my database is configured twice! Code: ...

45. persisting fails due to "JpaDialect does not support JDBC connection retrieval"?    forum.springsource.org

persisting fails due to "JpaDialect does not support JDBC connection retrieval"? Hi all, I'm having a little bit of trouble persisting an entity (successfully received from my flex front-end). The logging ...

46. Spring JDBC Appender for Log4J?    forum.springsource.org

Hi: I am interested in using a JDBC appender in a Spring application. I know that there is a version of a JDBC Appender that uses Hibernate already, has anyone created ...

47. JDBC and Future/Callable    forum.springsource.org

JDBC and Future/Callable Hi, I have a system where I currently have a two-step query. The first query performs the where clause filtering and only fetches the row ID's. Once I ...

48. Name jdbc is not bound in this Context    forum.springsource.org

Hi, I am getting "javax.naming.NameNotFoundException: Name jdbc is not bound in this Context" error while configuring datasource using jndi and lookup in spring app-context. Following things I did: After referring - ...

49. point of extension to get different kind of JDBC Connection    forum.springsource.org

point of extension to get different kind of JDBC Connection Good morning We plan to migrate all our web applications to Spring to take profit of all the Hibernate DAO support. ...

50. Using JDBC support classes in a non-spring environment    forum.springsource.org

Using JDBC support classes in a non-spring environment I am interested in incoporating Spring's support classes into a very large project which is primarily using plain JBDC for it's data access. ...

51. Just JDBC support (newbie guy)    forum.springsource.org

Dec 8th, 2004, 05:40 PM #1 garcima View Profile View Forum Posts Private Message Junior Member Join Date Dec 2004 Location MEXICO Posts 11 Just JDBC support (newbie guy) Hello everyone: ...

52. JDBC interface Business Objects and Logic    forum.springsource.org

I am rewriting a legacy application using spring framework. It helped me a lot in separating better all the different layer of the application. However I have a question. Most of ...

53. Need Help : JDBC log of Parametrized Queries    forum.springsource.org

Need Help : JDBC log of Parametrized Queries Hi Is there a way to view the actual SQL constructed after setting params in a parametrized query. The scenario is i have ...

54. Spring's JDBC Abstraction    forum.springsource.org

We would like to use a combination of JDBC Abstraction and Hibernate for our Spring/Hibernate Application. For example, we would like to use JDBC Abstraction for queries and Hibernate for updates. ...

55. How to Disable Annoying JDBC Informational Messages?    forum.springsource.org

How to Disable Annoying JDBC Informational Messages? I am using the Springframework JDBC interfaces and I am running Websphere 5.1 and Servlets. I have tried everything I can think of to ...

56. JDBC + SqlOperation registry    forum.springsource.org

JDBC + SqlOperation registry Hi there, I played with iBatis lately, and I liked it. I also created a jdbc version (simple userDAO (manager) stuff) to compare both versions. Since I ...

57. org.springframework.jdbc.CannotGetJdbcConnectionEx ception    forum.springsource.org

Hi, We are using springframework and in our QA and stagging environment we are getting org.springframework.jdbc.CannotGetJdbcConnectionEx ception: and com.ibm.websphere.ce.cm.ConnectionWaitTimeoutExcep tion:. We are not getting such exception in unit testing and development ...

58. IllegalTransactionStateException: Pre-bound JDBC connection    forum.springsource.org

IllegalTransactionStateException: Pre-bound JDBC connection Hi! I've web application (spring 1.1.4, hiberante 2.1.8, tomcat 5.5.8 ) which had been working correctly for about the month. For last few days I get exception: ...

59. petclinic Jdbc implementation    forum.springsource.org

petclinic Jdbc implementation In looking at the AbstractJdbcClinic class from the PetClinic app, I have a few questions in regards to it's implementation. If the class is implemented as a singleton, ...

60. Implementing JDBC Lazy Loading    forum.springsource.org

Implementing JDBC Lazy Loading There is a fair amount of discussion of lazy loading as it is implemented by Hibernate, but what about a simple implementation with POJOs and JDBC? I ...

61. insert problems with JDBC/ODBC    forum.springsource.org

Hello, I'm using Spring to access my DB through a JDBC/ODBC connection. When I'm using a select statement it works perfect. But when I want to do an insert-statement I get ...

62. Aggresively releasing JDBC Connection    forum.springsource.org

Hi, what does the log entry 'jdbc.ConnectionManager - Aggresively releasing JDBC Connection [after_transaction]' mean? Is there something wrong with my datasource definition: org.postgresql.Drive r jdbcostgresql:XXX ...

63. Using Spring Framework JDBC connection in my java    forum.springsource.org

Using Spring Framework JDBC connection in my java Hi All, I am trying to use Spring Framework JDBC connection in my simple Java program, but I am getting FileNotFound Exception can ...

64. Integrating Spring JDBC into application    forum.springsource.org

Integrating Spring JDBC into application I've started looking into integrating Spring JDBC into our application and had a few questions/issues. Currently, I have Struts calling a Manager class and then the ...

65. how to read uncommited database entries with spring-jdbc    forum.springsource.org

how to read uncommited database entries with spring-jdbc Hello, for a special part of my application, I need to read the uncommited changes of data, that another connection has written. I ...

66. could not get database version from JDBC metadata    forum.springsource.org

Jul 21st, 2005, 11:01 AM #1 igalmarino View Profile View Forum Posts Private Message Visit Homepage Member Join Date Aug 2004 Location San Jose - Costa Rica Posts 42 could not ...

67. Spring JDBC reentrancy question    forum.springsource.org

Hi, With Spring JDBC, is it safe to declare SqlUpdate and MappingSqlQuery objects as statics and reuse them throughout the lifetime of a multithreaded application? I've tried this and it seems ...

68. Spring JDBC - Please close it yourself?    forum.springsource.org

Spring JDBC - Please close it yourself? I'm seeing this error when I execute an SqlUpdate.update() method call. I wasn't aware that I had to close a result set with Spring ...

69. Spring JDBC and Universe Database    forum.springsource.org

Spring JDBC and Universe Database This is a long shot but has anybody used Spring JDBC and The RDBMS Operation classes in particular, with the Universe database. I've developed some classes ...

70. javax.naming.NameNotFoundException: Name jdbc is not bound i    forum.springsource.org

javax.naming.NameNotFoundException: Name jdbc is not bound i Hi I have deployed my application on tomcat 5.0.28 and the IDE is eclipse 3.1 with myeclipse plugin. when I try to start the ...

71. NameNotFoundException:Name jdbc is not bound in this context    forum.springsource.org

NameNotFoundException:Name jdbc is not bound in this context Hi I have deployed my application on tomcat 5.0.28 and the IDE is eclipse 3.1 with myeclipse plugin. when I try to start ...

72. org.springframerk.jdbc.core VS object    forum.springsource.org

org.springframerk.jdbc.core VS object I have been using the org.springframework.jdbc.object package to do my RDBMS operations and recently noticed that using the JdbcTemplate in the org.springframerk.jdbc.core package seems to be more convenient/straight-forward. ...

73. customizing Spring JDBC exceptions    forum.springsource.org

customizing Spring JDBC exceptions Hello All, I am working on a POC using Struts & Spring JDBC framework. I have been able to use most of the classes such as JdbcTemplate, ...

74. Could not explicitly release JDBC savepoint    forum.springsource.org

Could not explicitly release JDBC savepoint Hello, We are getting this error in our app when a transaction is committed. I think it has something to do with named savepoints - ...

75. Spring JDBC auto-commit    forum.springsource.org

Spring JDBC auto-commit Any suggestions on how I can implement this kind of functionality? I would like to use Spring JDBC to implement this. 1. Turn off auto-commit for PostgreSQL DB ...

76. PropertyPlaceholderConfigurer & jdbc.properties    forum.springsource.org

PropertyPlaceholderConfigurer & jdbc.properties I'm using a PropertyPlaceholderConfigurer to load a jdbc.properties file to fill in a dataSource like this:: com.mysql.jdbc.Driver jdbc:mysql://${jdbc.host}/databasename ...

77. Intermittent JDBC Connection failure    forum.springsource.org

Intermittent JDBC Connection failure I am recently getting this error quite frequently now : org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not get JDBC Connection; nested exception is org.jboss.util.NestedSQLException: Could not create connection; - nested ...

78. JDBC commit failed    forum.springsource.org

JDBC commit failed I am getting the following exception when trying to load a entity from database. The original cause of error is JDBC Commit failed. any idea why this is ...

79. JDBC commit failed    forum.springsource.org

JDBC commit failed Hi All, I am trying to save an entity in Oracle and it gives me the following exception This does not happens every time, it happens sometimes. Any ...

80. Can i use Spring JDBC?    forum.springsource.org

Can i use Spring JDBC? Hi all, i am utilizing a number of built-in features that come with the Oracle JDBC drivers. Unfortunately, its not obvious to me how i can ...

81. Spring - Jdbc Stack oveflow error    forum.springsource.org

Dear All, I am using spring framework along with JSF and everything works fine. Then I want to integrate persistence into the application and I tried both hibernate and Jdbc through ...

82. Spring-jdbc    forum.springsource.org

Is it possible to map a sql view from data base? how? i d like to display a result on jsf page. How can i iterate on a result(map) of queryForList("sql"); ...

83. Name jdbc is not bound in this Context    forum.springsource.org

Name jdbc is not bound in this Context We are trying to migrate an application to a newer server. We have the same versions of tomcat and etc. installed, but on ...

84. what is the best approach to do JDBC implementation in spring framework at persistent    forum.springsource.org

no one is answering because the answer is not definative. Spring helps you work with either JDBC or Hibernate, the choice is yours. My recommendation is to try both since everybodies ...

85. couple questions on JDBC support    forum.springsource.org

couple questions on JDBC support I have pretty complicated data model with highly normalized schema. I have several queries populating my objects and I define them in XML files for my ...

86. visibility of "org.springframework.jdbc.core.StatementCreato rUti ls"    forum.springsource.org

visibility of "org.springframework.jdbc.core.StatementCreato rUti ls" Visibility of "org.springframework.jdbc.core.StatementCreatorUti ls" has been tuned to package-protected since spring 2.0 m2. I do not know why, maybe it's just a design consideration: always keep ...

87. Cancel JDBC query    forum.springsource.org

Hi, We need to call a cancel on the query we execute with the help of the JDBCTemplate after a certain time. We know the method is there but we can;t ...

88. JDBC inside a HibernateDAO    forum.springsource.org

JDBC inside a HibernateDAO Hi, I have a method in a Hibernate DAO (which extends HibernateDaoSupport) where I would like to perform raw JDBC. Actually, I have a complex mapping between ...

89. fetch out of sequence-- Spring JDBC    forum.springsource.org

fetch out of sequence-- Spring JDBC Hello Guys! I am having this problem when i use SELECT with FOR UPDATE, i think i have to set AutoCommit to false, but i ...

90. Correct way to get/release JDBC connections with Spring?    forum.springsource.org

Correct way to get/release JDBC connections with Spring? I have some questions concerning acquiring/releasing connections under Spring when doing data access via JDBC. Some background: We have an application that currently ...

91. Maven compile issues for Spring JDBC    forum.springsource.org

Maven compile issues for Spring JDBC [INFO] ---------------------------------------------------------------------------- [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/junit/...unitee-1.8.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/spring...l-naga-1.1.pom ...

92. Spring with JDBC    forum.springsource.org

Hi to all, Here I'm doing my al year project in spring framework...and i have idea in Struts and its flow... Plz help me to connect spring with JDBC using data ...

93. transferring raw jdbc data query to an excel view?    forum.springsource.org

transferring raw jdbc data query to an excel view? recently, when creating reports for applications, i have found myself creating dedicated rowmappers to hold the data structures and then sending the ...

94. Jdbc    forum.springsource.org

I have a database in which instead of each user having a role, i have a table in which a user has certain attributes in terms of yes/no. Is it possible ...

95. Spring JDBC Dynamic Query (Newbee)    forum.springsource.org

Spring JDBC Dynamic Query (Newbee) Hi, I am a Newbee to Spring. I have read the books and searched this forum to find similar situation but could not find a similar ...

96. JDBC hookup questions...    forum.springsource.org

JDBC hookup questions... I have a static "master" database that is used to find which DB a user should be pointed to. The user database needs to be dynamic so that ...

97. Dynamically set JDBC properties    forum.springsource.org

Dynamically set JDBC properties I'm currently writing quite a few batch programs, i.e. non-Web applications being started from a main method. Each of these programs should logon to the data bases ...

98. Passing Nulls to Bind Variables to Spring JDBC    forum.springsource.org

Passing Nulls to Bind Variables to Spring JDBC I'm using Spring 1.2.5, with my DAO's extending JdbcDaoSupport. My question is one of relative confusion, because I've been writing this enormous application ...

99. newbie jdbc question    forum.springsource.org

I have a standalone app that currently has a dao with a static property for the database connection. I want to switch over to spring/jdbc, but want to do it in ...

100. JDBC Commit failed: no other info    forum.springsource.org

JDBC Commit failed: no other info Spring 1.2.8, Hibernate 3.0.5, Oracle 9i, JDK 1.4.2, WebLogic 8.1.4. My app was promoted to a new environment this morning, and I'm now getting the ...