Cannot create JDBC driver of class '' for connect URL 'null'

HI,
Can any one help why i am getting the below error:
Cannot create JDBC driver of class '' for connect URL 'null'
The Error Stack Trace is:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
    at java.sql.DriverManager.getDriver(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
    at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
    at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1786)
    at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:505)
    at com.crystaldecisions.reports.queryengine.Connection.t4(SourceFile:3020)
    at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:697)
    at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(SourceFile:309)
    at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.long(SourceFile:264)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1150)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)
    at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)
    at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
    at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
    at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
    at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
    at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:878)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPromptDatabaseLogOnInfos(SourceFile:815)
    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPromptDatabaseLogOnInfos(SourceFile:338)
    at com.businessobjects.report.web.a.e.a(SourceFile:174)
    at com.businessobjects.report.web.a.e.a(SourceFile:97)
    at com.businessobjects.report.web.a.e.a(SourceFile:343)
    at com.businessobjects.report.web.a.t.a(SourceFile:1726)
    at com.businessobjects.report.web.event.bw.broadcast(SourceFile:97)
    at com.businessobjects.report.web.event.am.a(SourceFile:53)
    at com.businessobjects.report.web.a.t.if(SourceFile:2104)
    at com.businessobjects.report.web.e.a(SourceFile:300)
    at com.businessobjects.report.web.e.a(SourceFile:202)
    at com.businessobjects.report.web.e.a(SourceFile:135)
    at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)
    at com.crystaldecisions.report.web.ServerControl.processHttpRequest(SourceFile:342)
    at org.apache.jsp.CrystalReport_jsp._jspService(CrystalReport_jsp.java:205)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
    at java.sql.DriverManager.getDriver(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
    at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
    at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1786)
    at com.crystaldecisions.reports.queryengine.Connection.
Thanks
Penchal

HI Shailendra,
I think your expecting code. The Code is as follows. and also for few reports i am getting Unexpected Database Error help me in this also
if(reportName != null && !"".equals(reportName) && reportSource==null){
        //Initializing report
        ReportClientDocument boReportClientDocument = new ReportClientDocument();
        boReportClientDocument.open(reportName, 0);
          Fields<IParameterField> parameterFields = boReportClientDocument.getDataDefController().getDataDefinition().getParameterFields();
          System.out.println("Param Fields Size:"+parameterFields.size());
     if (parameterFields.size() > 0) {
        ParameterFieldController paramController = boReportClientDocument.getDataDefController().getParameterFieldController();
        for (int i = 0; i < parameterFields.size(); i++) {
            String paramName = parameterFields.getField(i).getName().trim();
            System.out.println("                    -          "+paramName);
            if(request.getParameter(paramName) != null) {
                paramController.setCurrentValue("", paramName, request.getParameter(paramName));
                System.out.println(paramName+":"+request.getParameter(paramName));
            }else {
                System.out.println("Param is Null:"+paramName+":"+request.getParameter(paramName));
                paramController.setCurrentValue("", paramName, "");
    reportSource = boReportClientDocument.getReportSource();
    //session.setAttribute("ReportSource", reportSource);
    boReportClientDocument.close();
    CrystalReportViewer crystalReportViewer = new CrystalReportViewer();
    crystalReportViewer.setName(reportName);
    crystalReportViewer.setOwnPage(true);
    crystalReportViewer.setBestFitPage(true);
    crystalReportViewer.setToolPanelWidth(0);
    crystalReportViewer.setHasToggleParameterPanelButton(false);
    crystalReportViewer.setHasToggleGroupTreeButton(false);
    crystalReportViewer.setReportSource(reportSource);
    crystalReportViewer.setEnableDrillDown(false);
            crystalReportViewer.processHttpRequest(request, response,getServletConfig().getServletContext(),null);
Thanks
Penchal

Similar Messages

  • Tomcat 6.0.18, Cannot create JDBC driver of class '' for connect URL 'null'

    hi,
    I have searched through the web, none of the solution works for me. Hope I could get some suggestion from you.
    I am running tomcat 6.0.18 + eclipse 3.4.1 + jre 1.6 + jsp + jsf + mysql 5.0 on Ubuntu 8.10.
    The <GlobalNamingResources> configuration of TOMCAT_HOME/conf/server.xml
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/db" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/db?autoReconnect=true"
    username="xxx"
    password="xxx"
    maxActive="20"
    maxIdle="10"
    poolPreparedStatements="true" />
      </GlobalNamingResources>TOMCAT_HOME/conf/context.xml
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                
    </Context>An additional context.xml at eclipse'sworkspace/MyApplication/WebContent/META-INF
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                  
    </Context>web.xml of my application
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/db</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>This is the current configuration of the application, before this, I have followed the guidance of:
    [Apache Tomcat 6.0 JNDI Datasource HOW-TO|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations]
    and all the solutions from
    [Cannot create JDBC driver of class..|http://www.theserverside.com/discussions/thread.tss?thread_id=25459]
    Please advice, what's going wrong?

    hi,
    I have searched through the web, none of the solution works for me. Hope I could get some suggestion from you.
    I am running tomcat 6.0.18 + eclipse 3.4.1 + jre 1.6 + jsp + jsf + mysql 5.0 on Ubuntu 8.10.
    The <GlobalNamingResources> configuration of TOMCAT_HOME/conf/server.xml
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/db" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/db?autoReconnect=true"
    username="xxx"
    password="xxx"
    maxActive="20"
    maxIdle="10"
    poolPreparedStatements="true" />
      </GlobalNamingResources>TOMCAT_HOME/conf/context.xml
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                
    </Context>An additional context.xml at eclipse'sworkspace/MyApplication/WebContent/META-INF
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                  
    </Context>web.xml of my application
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/db</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>This is the current configuration of the application, before this, I have followed the guidance of:
    [Apache Tomcat 6.0 JNDI Datasource HOW-TO|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations]
    and all the solutions from
    [Cannot create JDBC driver of class..|http://www.theserverside.com/discussions/thread.tss?thread_id=25459]
    Please advice, what's going wrong?

  • "cannot create jbcd driver of class " for connect URL 'null'" error

    I am trying to get an application that is currently working fine on a Windows platform to work in a Linux environment.
    One thing that is different from my setup in Windows, and also one that I have no experience with, is the Linux-Ubuntu default install of Apache uses Virtual Hosts and Tomcat's equivalent multiple sessions.
    I'm running the app out of the usr/share/tomcat6/webapps/msgboard instance of Tomcat vs var/lib/tomcat6.
    I am calling the application from Apache Virtual Host port 80 using mod_jk. The application cannot run under native Tomcat because of the extensive use of PHP. Everything else in the application is working correctly including a DWR (Ajax) servlet. However I also tried a simple test app from native Tomcat and got the same results.
    I also tried connecting with jdbc:mysql://localhost:3306/msgboard?autoreconnect=true&user=root&password=password at the terminal prompt and got
    bash: jdbc:mysql://localhost/msgboard?autoreconnect=true: No such file or directory
    [1]7074
    [2] 7048
    [1] Exit 127 jdbc:mysql://localhost/msgboard?autoreconnect=true
    [2]+ Donesyslog error is
    Feb 23, 2009 3:01:51 PM org.directwebremoting.util.CommonsLoggingOutput info INFO: Exec: Online.getPosts()
    Feb 23 15:01:51 ubuntu jsvc.exec[6779]: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Feb 23 15:01:51 ubuntu jsvc.exec[6779]: Caused by: java.sql.SQLException: No suitable driverFollowing is all the pertinent setup info for reference and critique. Any suggestions would be greatly appreciated.
    Apache2.2
    Tomcat6
    JDBC
    mod_jk
    Java (not sure what ver, it's the default Ubuntu install ver.)
    PHP
    Currently I am pointing to mysql-connector-java.jar in my CLASSPATH at /usr/share/java/mysql-connector-java.jar added symlinks commons-dbcp.jar, commons-logging.jar to usr/share/tomcat6/lib
    Application is deployed from usr/share/tomcat6/webapps/msgboard
    The basic code snippet in class calling the jdbc
    WEB-INF/classes/dbLink.class
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/msgboardDB");
    WEB-INF/web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="msgboard">
    <display-name>Message Board</display-name>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/msgboardDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    META-INF/context.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Context path="/msgboard" docBase="msgboard"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/msgboardDB"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="100"
    maxIdle="30"
    maxWait="10000"
    username="root"
    password="thePassword"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/msgboard?autoReconnect=true"/>
    </Context>
    I also included a symlink to this in var/lib/tomcat6/config named msgboard.xml
    per instruction at http://ubuntuforums.org/showthread.php?t=430133 and have since removed it.
    my.cnf
    [client]
    port = 3306
    bind-address = 127.0.0.1
    permissions set in /etc/tomcat6/policy.d/04webapps.policy
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    per instruction at http://ubuntuforums.org/showthread.php?t=430133
    other permiissions set /etc/tomcat6/policy.d/50local.policy
    grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/-" {
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/-" {
    permission java.io.FilePermission "/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/logging.properties", "read";
    grant codeBase "jar:file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/lib/mysql-connector-java-5.1.6.jar!/-" {
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    I even tried setting Tomcat Security to "no" per instruction at
    http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta
    http://ubuntuforums.org/showthread.php?t=1034957&highlight=apache+tomcat+jdbc
    http://ubuntuforums.org/showthread.php?t=66615
    http://ubuntuforums.org/showthread.php?t=33601&highlight=java+mysql
    http://ubuntuforums.org/showthread.php?t=430133
    http://programminglinuxblog.blogspot.com/2008/03/connection-pooling-with-java-all.html
    http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta

    SOLUTION
    I had to add
    <Resource name="jdbc/webappDB"
         auth="Container"
         type="javax.sql.DataSource"
            maxActive="100"
         maxIdle="30"
         maxWait="10000"
            username="root"
         password="password"
         driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/webapp?autoReconnect=true"/>into /var/lib/tomcat6/conf/Catalina/localhost/ webapp.xml
    Note: the above context file was created automatically after deploying the webapp. I had to add the <resource> to it.
    The context I created in usr/share/tomcat_home/webapp/META_INF/context.xml is still there and has the same <resource>.defined in it. I did not verify whether or not it still needs to be there.
    After that I had to add two policies
    /var/lib/tomcat6/conf/policy.d/03catalina.policy
    grant {
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.dbcp.*";
    and 04webapps.policy
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    That did the trick!
    Other things that were done but have not been verified as to have any bearing on this issue.
    I changed the active java from openjdk to java-sun
    I added $tomcat_home/lib:$tomcat_home/lib/mysql-connector.jar:$tomcat_home/lib/commons-dbcp.jar to PATH
    Changed CLASSPATH=usr/share/classpath:usr/share/java/commons-dbcp.jar:usr/share/java/mysql-connector.jar
    Edited by: wlbragg on Feb 25, 2009 12:58 AM
    Edited by: wlbragg on Feb 25, 2009 12:59 AM
    Edited by: wlbragg on Feb 25, 2009 1:11 AM

  • JNDI-Tomcat 5.5.17, Cannot create JDBC driver of class '' for connect URL '

    I wrote a jsp program using JNDI to get connected to MySql DB, but i got the error " Cannot load JDBC driver class 'com.mysql.jdbc.Driver' " while running the program.
    I'm using NetBean5.5 which has bundled TomCat5.5.17.
    I've refered to many tutorials and websites, but i still can't solve it, here's my configuration and codes:
    Imported mysql-connector-java-5.0.5-bin into lib directory.
    context.xml:
    <Context path="/WebApplication1">
    <Resource name="jdbc/jsp" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/jsp">
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/jsp</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>malaysia</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>10</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>-1</value>
    </parameter>
    </ResourceParams>
    </Context>
    i included the following in Web.xml:
    <resource-ref>
    <res-ref-name>jdbc/jsp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    My JSP Code:
    Context initContext = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/jsp");
    Connection conn = ds.getConnection();
    Thanks~~~~

    I think mysql jdbc library should add to the class library path of your project.
    Hope this helps.

  • How to find out the cause of "Cannot create JDBC driver"?

    A small Java web application constantly runs into a problem of "Cannot of create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgresl://localhost:5432/myapp'". The problem still exists after upgrading the driver. After recycling the server, this problem will be resolved. It, however, will come back after a while.
    Any suggestions to solve this problem?
    Thanks a lot.

    jschell wrote:
    vwuvancouver wrote:
    Any suggestions to solve this problem?To start with get the full and complete stack trace.
    However since it is an intermittent problem there are only two possibilities
    1. You have some code that is written correctly and some that is not.
    2. It is a resource not code usage problem. Such as that you are not closing all result sets, statements and connections.Here is related log messages:
    2009-04-30 09:29:21,386  INFO XmlWebApplicationContext:601: - Closing application context [WebApplicationContext for namespace 'mybookmarks-servlet']
    2009-04-30 09:29:21,387  INFO DefaultListableBeanFactory:273: - Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [messageSource,viewResolver,localeResolver,untapedUrlMapping,urlMapping,localeChangeInterceptor,errorsController,myBookmarksController,bookmarkController,reminderController,accountController,userControllerMethodResolver,userFormController,searchFormController,directoryController,directoryControllerMethodResolver,secureHandlerMapping,signonInterceptor,addBookmarkFromListFormController,addBookmarkFormController,bookmarkValidator,editWebSiteEntryFormController,addCommentFormController,reminderFormController,genericReminderFormController,alterReminderDateFormController,contactFormController,invitationFormController,propertyConfigurer,mailSender]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,mailSender,userValidator,bookmarkService,dataSource,sessionFactory,transactionManager,accountDao,categoryDao,webSiteDao,siteVisitDao,reminderDao,commentDao,bookmarkDao]; root of BeanFactory hierarchy}
    2009-04-30 09:29:21,388  INFO GenericWebApplicationContext:601: - Closing application context [org.springframework.web.context.support.GenericWebApplicationContext;hashCode=15954072]
    2009-04-30 09:29:21,389  INFO DefaultListableBeanFactory:273: - Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [modelView,addCommentFormView,discoveryFormView,mostVisitedView,bookmarkListView,contactFormView,actionResultView,accountView,reminderFormView,reminderDateFormView,searchList2View,helpView,homeView,taggedListView,searchFormView,reminderListView,webSiteEntryFormView,reminderForm2View,categorizedList2View,invitationFormView,myHomeView,taggedList2View,contactListView,aboutView,bookmarkFormView,bookmarkForm2View,newEntries2View,categorizedListView,signinFormView,accountActionResultView,userFormView,siteActionResultView,searchListView,mostVisited2View,newEntriesView,errorHttp404View]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [messageSource,viewResolver,localeResolver,untapedUrlMapping,urlMapping,localeChangeInterceptor,errorsController,myBookmarksController,bookmarkController,reminderController,accountController,userControllerMethodResolver,userFormController,searchFormController,directoryController,directoryControllerMethodResolver,secureHandlerMapping,signonInterceptor,addBookmarkFromListFormController,addBookmarkFormController,bookmarkValidator,editWebSiteEntryFormController,addCommentFormController,reminderFormController,genericReminderFormController,alterReminderDateFormController,contactFormController,invitationFormController,propertyConfigurer,mailSender]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,mailSender,userValidator,bookmarkService,dataSource,sessionFactory,transactionManager,accountDao,categoryDao,webSiteDao,siteVisitDao,reminderDao,commentDao,bookmarkDao]; root of BeanFactory hierarchy}
    2009-04-30 09:29:21,391  INFO GenericWebApplicationContext:601: - Closing application context [org.springframework.web.context.support.GenericWebApplicationContext;hashCode=29369879]
    2009-04-30 09:29:21,392  INFO DefaultListableBeanFactory:273: - Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [modelView,addCommentFormView,discoveryFormView,mostVisitedView,bookmarkListView,contactFormView,accountView,actionResultView,reminderFormView,reminderDateFormView,searchList2View,helpView,homeView,configView,taggedListView,searchFormView,reminderListView,webSiteEntryFormView,reminderForm2View,categorizedList2View,invitationFormView,taggedList2View,myHomeView,contactListView,aboutView,bookmarkFormView,bookmarkForm2View,newEntries2View,categorizedListView,signinFormView,accountActionResultView,userFormView,siteActionResultView,searchListView,mostVisited2View,newEntriesView,errorHttp404View]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [messageSource,viewResolver,localeResolver,untapedUrlMapping,urlMapping,localeChangeInterceptor,errorsController,myBookmarksController,bookmarkController,reminderController,accountController,userControllerMethodResolver,userFormController,searchFormController,directoryController,directoryControllerMethodResolver,secureHandlerMapping,signonInterceptor,addBookmarkFromListFormController,addBookmarkFormController,bookmarkValidator,editWebSiteEntryFormController,addCommentFormController,reminderFormController,genericReminderFormController,alterReminderDateFormController,contactFormController,invitationFormController,propertyConfigurer,mailSender]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,mailSender,userValidator,bookmarkService,dataSource,sessionFactory,transactionManager,accountDao,categoryDao,webSiteDao,siteVisitDao,reminderDao,commentDao,bookmarkDao]; root of BeanFactory hierarchy}
    2009-04-30 09:29:21,394  INFO XmlWebApplicationContext:601: - Closing application context [Root WebApplicationContext]
    2009-04-30 09:29:21,395  INFO DefaultListableBeanFactory:273: - Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,mailSender,userValidator,bookmarkService,dataSource,sessionFactory,transactionManager,accountDao,categoryDao,webSiteDao,siteVisitDao,reminderDao,commentDao,bookmarkDao]; root of BeanFactory hierarchy}
    2009-04-30 09:29:21,396  INFO LocalSessionFactoryBean:184: - Closing Hibernate SessionFactory
    2009-04-30 09:29:21,397  INFO SessionFactoryImpl:767: - closing
    2009-04-30 09:29:21,408  WARN JDBCExceptionReporter:71: - SQL Error: 0, SQLState: null
    2009-04-30 09:29:21,410 ERROR JDBCExceptionReporter:72: - Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgresql://localhost:5432/homepage'
    2009-04-30 09:29:21,411  WARN JDBCExceptionReporter:71: - SQL Error: 0, SQLState: null
    2009-04-30 09:29:21,414 ERROR JDBCExceptionReporter:72: - Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgresql://localhost:5432/homepage'
    ...Your analysis seems very reasonable. As the above log messages, this application is built on Hibernate and Spring. All back end is taken care by Hibernate. I don't have a direct control on it. I should ask the Hibernate crowd about this issue. The Hibernate forum is still down at this moment.
    Edited by: vwuvancouver on Apr 30, 2009 1:12 PM

  • Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver

    Hi,
    i am doing a forum application.
    i am trying to connect database connection through javax.sql.DataSource.
    I am using Eclipse editor for developing this application and i am using sql server 2000 database.
    i have create a servlet file.
    here is the coding.
    DatabaseGetConnection.java
    `````````````````````````````````````````
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.sql.DataSource;
    public class DatabaseGetConnection extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
    private Connection con=null;
    private DataSource ds=null;
    public DatabaseGetConnection() throws ServletException {
    super();               
    public DatabaseGetConnection(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
    this.doPost(req, res);          
    public void init() throws ServletException {
    try
    final Context initContext = new InitialContext();
    final Context envContext = (Context)initContext.lookup("java:/comp/env");
    this.ds = (DataSource)initContext.lookup("jdbc/mySQLServer");
    }catch(final NamingException ne)
    ne.printStackTrace();
    }catch(final Exception e)
    e.printStackTrace();
    public DataSource getDS()
    System.out.println("Datasource method calling");
    if (this.ds!=null)
    System.out.println("Datasource not null");
    }else
    System.out.println("Datasource null");
    return this.ds;
    public Connection getCon()
    try
    this.con=this.getDS().getConnection();
    if (this.con!=null)
    System.out.println("Connection Successfull");
    }catch(final SQLException se)
    System.out.print("Connection Establishment Error : ");
    se.printStackTrace();
    return this.con;
    I have configured server.xml. here is the configuration
    server.xml
    ````````````````
    <GlobalNamingResources>
    <Resource name="jdbc/mySQLServer" global="jdbc/mySQLServer" auth="Container"
    type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=forum;SelectMethod=cursor"
    username="sa" password="sa" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </GlobalNamingResources>
    here is the web.xml file
    ``````````````````````````````````
    <resource-ref>
    <res-ref-name>jdbc/mySQLServer</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    is this configuration correct? plz help me about the configuration and coding through Eclipse.
    i have run the application and i got the error. here is the error details
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
    at com.forum.database.DatabaseGetConnection.getCon(DatabaseGetConnection.java:85)
    at com.forum.database.DatabaseGetConnection.GetAllTopicSearch(DatabaseGetConnection.java:101)
    at org.apache.jsp.test_jsp._jspService(test_jsp.java:73)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
    ... 24 more
    thanks and regards,
    k.s.kumar

    Please don't multipost, it's rude: http://forum.java.sun.com/thread.jspa?threadID=5219591
    Please continue on that thread.

  • Cannot load JDBC Driver Class in Tomcat5.5 using struts.

    Hello to all,
    I'm working in the struts environment using Esclipse3.2 IDE.
    And I have installed Tomcat5.5 server.I have created the LoginForm
    in struts.Now i like to connect my LoginForm with MySql database.I
    have also created the database in MySql naming strutsdatabase.
    I had also download the mysql-connector-java-3.0.16-ga-bin.jar and
    save that in C:/tomcat/commons/lib directory.
    While running I have got the below error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    And I have attached my struts-config.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software
    Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <data-sources>
    <data-source
    type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/strutsdatabase?autoReconnect
    =true"/>
    <set-property property="driverClassName"
    value="com.mysql.jdbc.Driver"/>
    <set-property property="username" value=""/>
    <set-property property="password" value=""/>
    <set-property property="maxActive" value="10"/>
    <set-property property="validationQuery" value="SELECT
    COUNT(*) FROM test"/>
    <set-property property="maxWait" value="5000"/>
    <set-property property="defaultAutoCommit" value="false"/>
    </data-source>
    </data-sources>
    <form-beans>
    <form-bean name="LoginForm"
    type="fino.web.struts.action.LoginForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards/>
    <action-mappings>
    <action name="LoginForm" path="/login" scope="request"
    type="fino.web.struts.action.LoginAction" validate="true">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/failure.jsp"/>
    </action>
    </action-mappings>
    <controller/>
    <message-resources null="false"
    parameter="org.apache.struts.action.ActionResources"/>
    </struts-config>
    Friends,please help me to find solution to this problem.

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • Java.sql.SQLException: Cannot load JDBC driver class 'null'

    Hi,
    I am a beginner of using jdbc, i use the tomcat4.1.x, mysql3.23.54 and it's jdbc driver 2.0.14. I place the drive <in jar file> in tomcat/commons/lib and configure the server.xml, web.xml and some testing coding. But there are some error like the following:
    java.sql.SQLException: Cannot load JDBC driver class 'null'
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
         at foo.DBTest.init(DBTest.java:18)
         at org.apache.jsp.test_jsp._jspService(test_jsp.java:48)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    of course its some of the error code and there are more.
    Why I have this problems and how can I fix it? Can someone help me??
    Thanks,
    Tong
    I place my test.jsp at tomcat/webapps/DBTest and DBTest.java at tomcat/webapps/DBTest/WEB-INF/classes/foo
    additional of the tomcat/conf/server.xml
    <Resource name="TestDB" auth="Container" type="javax.sql.DataSource" description="MySQL TestDB"/>
    <ResourceParams name="TestDB">
    <parameter><name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter><name>maxActive</name><value>10</value></parameter>
    <parameter><name>maxIdle</name><value>1</value></parameter>
    <parameter><name>maxWait</name><value>10000</value></parameter>
    <parameter><name>username</name><value>javauser</value></parameter>
    <parameter><name>password</name><value>javadude</value></parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.gjt.mm.mysql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
    </parameter>
    </ResourceParams>
    tomcat/webapps/DBTest/WEB-INF/web.xml :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>MySQL Test App</description>
    </web-app>

    Post the part of your code that loads the driver and connects. My guess is you are using a variable for the name of the driver and the variable has not been set to anything(intially set to null).
    Thanks
    Cardwell

  • Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

    Hi,
    At the moment I'm trying to get an example working. The error message I get is:
    Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'"
    The example I tried is http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html.
    Configuration:
    Wampserver 2.0 (Apache, MySQL, PHP for Windows XP), Tomcat 6.0 and jdk1.6.0_03.
    The following files are installed in %CATALINA_HOME%/webabbs/
    - Dbtest/test.jsp
    - Dbtest/WEB-INF/web.xml
    - Dbtest/WEB-INF/lib/standard.jar
    - Dbtest/WEB-INF/lib/tomcat-dbcp.jar
    - Dbtest/WEB-INF/lib/jstl.jar
    Tia,
    Abel.

    Hi,
    I added the jar file containing the requested class to my lib directory. So the current contents of that directory is:
    The following files are installed in %CATALINA_HOME%/webabbs/
    - Dbtest/test.jsp
    - Dbtest/WEB-INF/web.xml
    - Dbtest/WEB-INF/lib/standard.jar
    - Dbtest/WEB-INF/lib/tomcat-dbcp.jar
    - Dbtest/WEB-INF/lib/jstl.jar
    - Dbtest/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar
    More importantly, I started my Wamp server.
    The example works as it should have. Thanks for the feedback.
    Abel

  • Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

    Hi,
    I'm trying to run my web app and connect to a MySQL database but keep getting this error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
    any ideas?
    Thanks!

    Lookup the stacktrace and find the root cause of the exception.
    My cents on a ClassNotFoundException which is rather self-explaining.
    By the way, the mentioned driver class name is a very old driver. You shouldn't be using that anymore. Surf to the MySQL homepage and download the most recent Connector/J JDBC driver for your database version. Documentation is also available over there.

  • Java.sql.SQLException: Cannot load JDBC driver

    THis topic has been discussed many many times but I still not able to connect to Oracle 8i from my servlet using Tomcat 4.1.12 on hp-ux and java1.3
    I always got: java.sql.SQLException: Cannot load JDBC driver class 'null'
    In server.xml:
    <Context Path="/MyApp" docBase="MyApp" debug="0" reloadable="true" >
    <Resource name="jdbc/ora" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/ora" >
    <parameter>
    <name>username</name>
    <value>myname</value>
    </parameter>
    <parameter> <name>password</name>
    <value>mypassword</value>
    </parameter>
    <parameter> <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:thin:@myhostname:1521:ora</value>
    </parameter> </ResourceParams>
    </Context>
    In MyApp/WEB-INF/web.xml:
    <resource-ref>
    <res-ref-name>jdbc/ora</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    The Oracle jdbc jar file classes12.jar is under common/lib in Tomcat's home. read Permission is there.
    In the servlet:
    init(ServletConfig config):
    Context init = new InitialContext();
    Context ctx = (Context) init.lookup("java:comp/env");
    dataSource = (DataSource) ctx.lookup("jdbc/acdb");
    doPost(..)
    the error occured at :
    synchronized (dataSource){
    con = dataSource.getConnection();}
    Thanks in advance!

    Everything looks correct to me, except for one thing.
    In your web.xml you have this:
    <res-ref-name>jdbc/ora</res-ref-name> In your server.xml, you have this tag, which matches your web.xml:
    <ResourceParams name="jdbc/ora" > But in your Java code, you've got this:
    dataSource = (DataSource) ctx.lookup("jdbc/acdb"); When I've successfully set up a Web app data source, all three names had to agree. You either need to change your Java lookup name to "jdbc/ora" or change the web.xml and server.xml to "jdbc/acdb".
    See if that does it. Everything else sounds correct to me. - MOD

  • Cannot create windows driver project

    Hello,
    I'm using Visual Studio 2013 Professional and I'm still in the trial period.
    I'm attempting to create a windows driver project, however it's not available in my new project (File -> New -> Project) menu: http://imgur.com/Bk4afkI
    I also have installed WDK 8.0 and the 8.1 update.
    I can see the "Driver" drop-down menu: http://imgur.com/ovYBuHj
    Any help is appreciated.
    Cheers,
    Ben

    Hi,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    I suggest opening a thread on Windows Hardware WDK and Driver Developmentforum like this thread with the same issue:
    http://social.msdn.microsoft.com/Forums/en-US/c2e6cee1-cf25-4be8-96ab-2a61dae13e7d/cannot-create-device-driver-project-in-vs2013-professional?forum=wdk for better support.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create two different implementation class for a Control

    Hi,
    I am a newbie to beehieve. I want to know that is it possible to create two different 'Impl' classes for a Control. If yes then how do we instantiate them ? How can we chain them (something like calling one 'Impl' from the other one? Thanks in Advance!!!
    Regards,
    Abhishek

    You are sure you are in the right forum?
    This is the JDeveloper and ADF forum...
    Timo

  • How to create a iview in eclipse for connecting  R/3 using JCA?

    Hi everybody,
           I want to create a iview in eclipse for connecting  R/3 using JCA. Can any body send me java code for this purpose. i tried one example from sdn in eclipse but i did't get any code for the same.
    thanking you
    Rajendra

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/sap connector examples download.htm

  • Unable to locate a suitable JDBC driver to establish a connection to URL

    Hi experts,
    I have developed an interface IDOC to JDBC (MS ACCESS) but when try to deliver the message in the MS ACCESS I get this error in the communication channel:
         Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=//10.YY.YY.10/XXXX/XXXXX/pdddd.mdb' using the JDBC driver 'sun.jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Unable to locate a suitable JDBC driver to establish a connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=//10.YY.YY.10/XXXX/XXXX/pdddd.mdb''.
    The parameters of the Communication channel are:
    Driver: sun.jdbc.odbc.JdbcOdbcDriver
    Conection: jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//10.YY.YY.10/XXXX/XXXX/pdddd.mdb
    In my local (windows) I have developed a litlle java code to check the connection with the ms access, I was fine. I'm in the same network that PI.
    I don't know if the JdbcOdbcDriver is compatible with UNIX or I would need a diferent driver to connect. What driver connect PI and MS Access?
    Any idea?
    Thanks in advance.
    Jose

    Hi
    Please go through the below forum
    Re: File - XI - MS Access JDBC Adpater
    Thanks
    Ramg

Maybe you are looking for