本文主要是介绍CDH安装SQOOP错误:Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:/var/lib/sqoo,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在使用ClouderaManager安装sqoop时出现:
org.apache.sqoop.common.SqoopException: JDBCREPO_0007:Unable to lease linkat org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:64)at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:87)at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:63)at org.apache.sqoop.repository.JdbcRepository.isRepositorySuitableForUse(JdbcRepository.java:144)at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:129)at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:78)at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:56)at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:41)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:944)at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:779)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:505)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068)at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)at org.apache.catalina.core.StandardService.start(StandardService.java:525)at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)at org.apache.catalina.startup.Catalina.start(Catalina.java:595)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:606)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:/var/lib/sqoop2/repository/db;create=trueat java.sql.DriverManager.getConnection(DriverManager.java:596)at java.sql.DriverManager.getConnection(DriverManager.java:187)at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:78)at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:62)... 31 more
解决方法:
1. 下载db-derby-10.11.1.1-bin.tar.gz解压缩之后将derby.jar和derbyclient.jar放入/var/lib/sqoop2下
2. 将derby.jar拷贝到/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/jars目录下
3. 删除derby-10.8.2.2.jar -> ../../../../../../jars/derby-10.8.2.2.jar的软连接:rm -f derby-10.8.2.2.jar
4. 在/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/sqoop2/webapps/sqoop/WEB-INF/lib/目录下建立/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/jars/derby.jar的软连接:
ln -s ../../../../../../jars/derby.jar derby.jar
这篇关于CDH安装SQOOP错误:Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:/var/lib/sqoo的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!