cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajani Karuturi <raj...@apache.org>
Subject Re: [USAGE][MASTER] java.sql.SQLException: No suitable driver found for jdbc:mysql
Date Fri, 31 Oct 2014 07:56:20 GMT
You could change the dependency of mysql connector in usage pom to compile
and run the mvn command.


On Fri, Oct 31, 2014 at 13:11 PM, Ilia Shakitko <
i.shakitko@tech.leaseweb.com> wrote:

Yeah, I am running jetty run on the server for tests, there is no IDE, hehe.

Can I solve it w/o an IDE?


Kind regards,

Ilia Shakitko
Innovation Engineer
LeaseWeb Technologies B.V.

T: +31 20 316 0235
M:
E: i.shakitko@tech.leaseweb.com <javascript:;>
W: http://www.leaseweb.com

Luttenbergweg 8, 1101 EC Amsterdam, Netherlands


-----Original Message-----
From: Rajani Karuturi [mailto:rajani@apache.org <javascript:;>]
Sent: donderdag, 30 oktober, 2014 13:47
To: dev@cloudstack.apache.org <javascript:;>
Subject: Re: [USAGE][MASTER] java.sql.SQLException: No suitable driver
found for jdbc:mysql

The only way I could run in a dev environment was to run
com.cloud.usage.UsageServer as a plain java process and explicitly set
mysql connector in the classpath

for example in intellij, add mysql connector to the classpath by editing
the project structure and adding mysql connector jar to the dependencies of
cloud-usage module and right click run as java process.


~Rajani

On Thu, Oct 30, 2014 at 4:01 PM, Ilia Shakitko <i.shakitko@tech.leaseweb.com
<javascript:;>
> wrote:

> Hello,
>
> I know this was a known issue and fixed in 4.4 and master (as
> Sebastian mentioned), but it appears again in master.
>
> I am running mgt with jetty-run. Works OK.
> I am running usage then (mvn -pl usage -Drun -Dpid=$$). Getting an
> exception:
>
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
>         at
>
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:425)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.CGLIB$searchIncludingRemoved$36(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2_FastClassByCloudStack_ce5b857a.invoke(<generated>)
>         at
net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
>         at
>
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.searchIncludingRemoved(<generated>)
>         at
>
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:361)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.CGLIB$searchIncludingRemoved$35(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2_FastClassByCloudStack_ce5b857a.invoke(<generated>)
>         at
net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
>         at
>
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.searchIncludingRemoved(<generated>)
>         at
>
com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:931)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.CGLIB$listIncludingRemovedBy$60(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2_FastClassByCloudStack_ce5b857a.invoke(<generated>)
>         at
net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
>         at
>
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.listIncludingRemovedBy(<generated>)
>         at
>
com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:936)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.CGLIB$listIncludingRemovedBy$62(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2_FastClassByCloudStack_ce5b857a.invoke(<generated>)
>         at
net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
>         at
>
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.listIncludingRemovedBy(<generated>)
>        at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl.getConfiguration(ConfigurationDaoImpl.java:82)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.CGLIB$getConfiguration$7(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2_FastClassByCloudStack_ce5b857a.invoke(<generated>)
>         at
net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
>         at
>
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.getConfiguration(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl.getConfiguration(ConfigurationDaoImpl.java:110)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.CGLIB$getConfiguration$8(<generated>)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2_FastClassByCloudStack_ce5b857a.invoke(<generated>)
>         at
net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
>         at
>
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
>         at
>
org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl_EnhancerByCloudStack_6c3a6ca2.getConfiguration(<generated>)
>         at
> com.cloud.usage.UsageManagerImpl.configure(UsageManagerImpl.java:194)
>         at
>
com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(ComponentContext.java:116)
>         at com.cloud.usage.UsageServer.start(UsageServer.java:60)
>         at com.cloud.usage.UsageServer.main(UsageServer.java:47)
>         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.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
>         at java.lang.Thread.run(Thread.java:744)
> Caused by: java.sql.SQLException: No suitable driver found for
>
jdbc:mysql://localhost:3306/cloud?autoReconnect=true&prepStmtCacheSize=517&cachePrepStmts=true&prepStmtCacheSqlLimit=4096
>         at java.sql.DriverManager.getConnection(DriverManager.java:596)
>         at java.sql.DriverManager.getConnection(DriverManager.java:215)
>         at
>
org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
>         at
>
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
>         at
>
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
>         at
>
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
>         at
>
com.cloud.utils.db.TransactionLegacy.getConnection(TransactionLegacy.java:560)
>         at
>
com.cloud.utils.db.TransactionLegacy.prepareStatement(TransactionLegacy.java:471)
>         at
>
com.cloud.utils.db.TransactionLegacy.prepareAutoCloseStatement(TransactionLegacy.java:464)
>         at
>
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:398)
>         ... 45 more
>
> I’ve tried to create a symlink -> didn’t help
> /usr/share/cloudstack-usage/lib/mysql-connector-java.jar ->
> /usr/share/cloudstack-usage/lib/mysql-connector-java-5.1.21.jar
>
> Any ideas?
>
> Kind regards,
>
> Ilia Shakitko
> Innovation Engineer
> LeaseWeb Technologies B.V.
>
> T: +31 20 316 0235
>
> E: i.shakitko@tech.leaseweb.com <javascript:;>
> W: www.leaseweb.com<http://www.leaseweb.com>
>
> Luttenbergweg 8,        1101 EC Amsterdam,      Netherlands
>
>
>
>



-- 
Sent from Windows Phone

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message