19 Nov 2008

Simple Jdbc

I wanted to use spring JdbcTemplate to simplify my jdbc code but I had to add 3 jars just to use it !
  • spring-jdbc.jar
  • spring-tx.jar
  • spring-core.jar


spring-tx.jar because I got this error:
The type org.springframework.dao.DataAccessException cannot be resolved. 
It is indirectly referenced from required .class files
TestSpring.java

spring-core.jar because I got this error:
The type org.springframework.core.NestedRuntimeException 
cannot be resolved. It is indirectly referenced from required .class files
TestSpring.java

And I wasn't even sure about the transaction part, did I need to include spring-beans.jar and spring-context.jar; start to use a TransactionTemplate and configure a PlatformTransactionManager with tons of xml configuration, services and dao(s) :(

So I decided to make a small but simple project doing exactly what I wanted: jdbcTemplate and I made it public on sourceforge.

Don't expect any documentation or support for this, it's just that I don't want to redo this code on my next jdbc project (if that ever happens).




You can also take a look at DbUtils at http://commons.apache.org that does just the same ;)


 

4 comments:

  1. Anonymous3:00 pm

    thanks, it helps me

    ReplyDelete
  2. Anonymous12:46 am

    wow =) thanks a lot that solved my problems. nice job )))

    ReplyDelete
  3. Anonymous1:52 pm

    it was very helpful for me resolve my compilation errors

    ReplyDelete
  4. Anonymous10:23 am

    Thanks..It helps me to solve my issue..

    ReplyDelete

Note: only a member of this blog may post a comment.