Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Database connection through Log4j

 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi

am trying to connect to oracle database with log4j.properties file

og4j.appender.A2=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.A2.Driver=oracle.jdbc.driver.OracleDriver
log4j.appender.A2.URL=jdbc racle:thin:@localhost:1521:Indu
log4j.appender.A2.user=scott
log4j.appender.A2.password=indu
log4j.appender.A2.sql=insert into Testing values('English','B')
log4j.appender.A2.layout=org.apache.log4j.PatternLayout

and am getting the error

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

and am able to connect to database with some javaclass with the same details as I supplied to log4j properties file..

thanks
indu
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Indu,

Please only UseOneThreadPerQuestion. Closing this and continuing Here
[ November 06, 2008: Message edited by: Martijn Verburg ]
 
    Bookmark Topic Watch Topic
  • New Topic