Discussions

Web tier: servlets, JSP, Web frameworks: Cannot create JDBC driver of class '' for connect URL 'null', ca

  1. I am able to lookup dB. But on trying to fetch data from dB I am getting this error. i am using oracle i copied the jar file in classes12.jar in catalinahome/common/lib but i am getting this error Cannot create JDBC driver of class '' for connect URL 'null', ca this is my server.xml file ------------------------------ <!--?xml version='1.0' encoding='utf-8'?--> factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml url jdbc:oracle:thin:@localhost:1521:BSL password yerra maxActive 4 maxWait 5000 driverClassName oracle.jdbc.driver.OracleDriver username pradeep maxIdle 2 --------------------------- this is my web.xml file ------------------------------------- <!--?xml version="1.0" encoding="UTF-8"?--> 30 index.jsp Oracle Datasource example jdbc/myoracle javax.sql.DataSource Container --------------------------- this is my context.xml file -------------------------- any one plz help me thanks in advance

    Threaded Messages (7)

  2. post the whole exception stack trace. \ cheers, http://www.javaicillusion.blogspot.com/
  3. dbcp problem[ Go to top ]

    (org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver ) I am getting the above error in the browser i am using th below jsp
  4. Re: dbcp problem[ Go to top ]

    There may be many reasons: 1: The driver does not match the database version you are using. 2: The connection URL is not correct 3: The DBCP jar and the driver class is loaded by different classloaders. Check them and see if you find any success. cheers, http://www.javaicillusion.blogspot.com/
  5. not working[ Go to top ]

    the driver is working well there is no problem because i directly write the url in jsp page by using drivermanager and when i try to connect it is connecting i didn't get u in this The DBCP jar and the driver class is loaded by different classloaders can u be specipic because i am very much new i am in learning stage thanks
  6. Re: not working[ Go to top ]

    I am reaaly not an expert of dbcp but you do these: 1: keep the driver jar file in Catalina/shared/lib dir. 2: set the system property -Djdbc.drivers=oracle.jdbc.driver.OracleDriver:org.apache.commons.dbcp.PoolingDriver 3: As the exceptionn says,that you have got a null url, something to do with Contexts. I will have to check with tomcat. cheers, http://javaicillusion.blogspot.com/
  7. still problem persists[ Go to top ]

    i copied the jar file and i also set the system property what u said but still the problem persists and the the exception is same yar
  8. connected but some help need[ Go to top ]

    i connected to database using pooling when ichanged the datasource properties for my webapplication in jndi tree Tomcat Server Service (Catalina) Connector (8009) Connector (8080) Host (localhost) Context (/) Resources Data Sources Mail Sessions Resource Links Environment Entries Context (/admin) Context (/manager) Context (/tomcat-docs) Context (/web1) Resources -------------------------------------------- Data Sources------------->(Ichanged the properties here by default there is no url and driver class but i created in datasource now what i have to do is there any way to set the content dynamically when i created the datasource ) i am setting the datasource manually here now i connected to the database. ------------------------------------------- Mail Sessions Resource Links Environment Entries Realm for Service (Catalina) Resources Data Sources Mail Sessions Environment Entries User Databases User Definition Users Groups Roles