longzenvo / log4jdbc

Automatically exported from code.google.com/p/log4jdbc
0 stars 0 forks source link

No suitable driver found for jdbc:log4jdbc:oracle:thin:@localhost:1521:XE #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.
PFA log4j.properties and persistence.xml as mentioned in your log4jdbc#faq page 
I have configured persistence.xml as follows :

 <property name="connection.driver_class" value="net.sf.log4jdbc.DriverSpy"/>
        <property name="hibernate.connection.url" value="jdbc:log4jdbc:oracle:thin:@localhost:1521:XE"/>

When I run NewClass I throws me an Exception :
java.sql.SQLException: No suitable driver found for 
jdbc:log4jdbc:oracle:thin:@localhost:1521:XE
    at java.sql.DriverManager.getConnection(DriverManager.java:602)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
    at clobtest.NewClass.main(NewClass.java:40)

What version of the product are you using? On what operating system?
I am running my application in Windows7 and Oracle 11.2.0.1g 
Please help me in resolving this problem

regards
sentil

Original issue reported on code.google.com by senthi...@gmail.com on 2 Jun 2015 at 5:52

Attachments:

GoogleCodeExporter commented 9 years ago
Just some ideas to try:
Are you sure that the log4jdbc jar is in  your classpath?
Are you able to connect directly with JDBC (not going through hibernate)?

Original comment by arthur.b...@gmail.com on 2 Jun 2015 at 10:40

GoogleCodeExporter commented 9 years ago
hi

thanks for your response

With this url jdbc:oracle:thin:@localhost:1521:XE  its working fine, but with 
jdbc:log4jdbc:oracle:thin:@localhost:1521:XE not working.
regards
sentil

Original comment by senthi...@gmail.com on 2 Jun 2015 at 12:23

GoogleCodeExporter commented 9 years ago
hi

attached below classpath.png. Works with dburl 
jdbc:oracle:thin:@localhost:1521:XE not with dburl 
jdbc:log4jdbc:oracle:thin:@localhost:1521:XE.

regards
sentil

Original comment by senthi...@gmail.com on 2 Jun 2015 at 1:47

Attachments: