Home » Java » spring – How to resolve DB related Exception java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null'-Exceptionshub

spring – How to resolve DB related Exception java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null'-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:
java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:2224)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2104)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1563)
at com.axisrooms.db.AccountsDatabaseManager.getConnection(AccountsDatabaseManager.java:72)
at com.axisrooms.db.AccountsDatabaseManager.getConnection(AccountsDatabaseManager.java:58)
at com.axisrooms.location.Country.loadAllCountries(Country.java:96)
at com.axisrooms.location.Country.init(Country.java:84)
at com.axisrooms.location.LocationHelper.initializeLocations(LocationHelper.java:11)
at com.axisrooms.system.startup.ARInitializer.initialize(ARInitializer.java:39)
at com.axisrooms.system.startup.listener.ContextListener.contextInitialized(ContextListener.java:101)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:483)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:432)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:2209)
... 56 common frames omitted
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(40) - Initialized locations.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(43) - Initialized hotels.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(46) - Initialized AbstractUser.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(49) - Initialized ResourceHelper.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(52) - Initialized HotelProduct.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(55) - Initialized Deal.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(58) - Initialized Corporate.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(60) - Initialized Hotelier.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(63) - Initialized HotelierAdmin.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(66) - Initialized TourOperator.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(69) - Initialized ProductKickbackPlan.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(72) - Initialized Itinerary.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(75) - Initialized SearchableCity.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(78) - Initialized WebSite.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(81) - Initialized AbstractApp.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(84) - Initialized PCProduct.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(87) - Initialized PCCompetitorProduct.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(90) - Initialized PCProductRelation.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(93) - Initialized OTAHotel.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(96) - Initialized HotelTaxDetailsAction.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(99) - Initialized PrivateDeskUser.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(102) - Initialized hotel additional details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(105) - Initialized hotel amenities details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(108) - Initialized hotel room details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(111) - Initialized hotel cancell rule details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(114) - Initialized hotel rate plan details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(117) - Initialized hotel child policy details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] INFO  com.axisrooms.system.startup.ARInitializer initialize(120) - Initialized hotel tax v2 policy details.
2020-02-19T12:16:11 [RMI TCP Connection(2)-127.0.0.1] ERROR com.axisrooms.system.startup.ARInitializer initialize(127) - FATAL: Error initializing Caches
java.lang.Exception: Unsuccessful.
at com.axisrooms.system.startup.ARInitializer.initialize(ARInitializer.java:123)
at com.axisrooms.system.startup.listener.ContextListener.contextInitialized(ContextListener.java:101)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
How to&Answers: