java.lang.ClassNotFoundException

com.mysql.jdbc.Driver

Samebug tips10

This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 hello_world_from_pyspark.py {file location}"


rafaelrafael

Check if you've set a name in Application -> Run. If you didn't, the generated XML is gonna have missing information and then this exception will be thrown.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Stack trace

  • java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:190) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473) at org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator.initIterators(AbstractChunkDataIterator.java:151) at org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator.iterators(AbstractChunkDataIterator.java:113) at org.openspaces.persistency.support.ConcurrentMultiDataIterator.<init>(ConcurrentMultiDataIterator.java:66) at org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource.createInitialLoadIterator(AbstractHibernateSpaceDataSource.java:127) at org.openspaces.persistency.hibernate.DefaultHibernateSpaceDataSource.initialDataLoad(DefaultHibernateSpaceDataSource.java:84) at com.gigaspaces.datasource.concurrentaccess.SharedIteratorSpaceDataSourceDecorator.initialDataLoad(SharedIteratorSpaceDataSourceDecorator.java:157) at com.gigaspaces.internal.sync.SynchronizationStorageAdapter.initialLoad(SynchronizationStorageAdapter.java:294) at com.j_spaces.core.cache.CacheManager.loadDataFromDB(CacheManager.java:838) at com.j_spaces.core.cache.CacheManager.initCache(CacheManager.java:416) at com.gigaspaces.internal.server.space.SpaceEngine.init(SpaceEngine.java:566) at com.gigaspaces.internal.server.space.SpaceImpl.initAndRecoverFromDataStorage(SpaceImpl.java:1371) at com.gigaspaces.internal.server.space.recovery.strategy.NonPrimaryBackupSpaceRecovery.recoverFromDB(NonPrimaryBackupSpaceRecovery.java:67) at com.gigaspaces.internal.server.space.recovery.strategy.NonPrimaryBackupSpaceRecovery.recover(NonPrimaryBackupSpaceRecovery.java:58) at com.gigaspaces.internal.server.space.SpaceImpl.initAndStartRegularSpace(SpaceImpl.java:1344) at com.gigaspaces.internal.server.space.SpaceImpl.start(SpaceImpl.java:3403) at com.gigaspaces.internal.server.space.SpaceImpl.<init>(SpaceImpl.java:260) at com.j_spaces.core.JSpaceContainerImpl.createSpaceImpl(JSpaceContainerImpl.java:2451) at com.j_spaces.core.JSpaceContainerImpl.loadSpace(JSpaceContainerImpl.java:2394) at com.j_spaces.core.JSpaceContainerImpl.xmlInit(JSpaceContainerImpl.java:1184) at com.j_spaces.core.JSpaceContainerImpl.initContainer(JSpaceContainerImpl.java:682) at com.j_spaces.core.JSpaceContainerImpl.<init>(JSpaceContainerImpl.java:566) at com.j_spaces.core.client.SpaceFinder.initContainer(SpaceFinder.java:675) at com.j_spaces.core.client.SpaceFinder.findEmbeddedService(SpaceFinder.java:797) at com.j_spaces.core.client.SpaceFinder.findService(SpaceFinder.java:519) at com.j_spaces.core.client.SpaceFinder.findService(SpaceFinder.java:472) at com.j_spaces.core.client.SpaceFinder.find(SpaceFinder.java:361) at org.openspaces.core.space.UrlSpaceFactoryBean.doCreateSpace(UrlSpaceFactoryBean.java:373) at org.openspaces.core.space.AbstractSpaceFactoryBean.afterPropertiesSet(AbstractSpaceFactoryBean.java:185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$6.run(AbstractAutowireCapableBeanFactory.java:1531) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1529) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainerProvider.createContainer(IntegratedProcessingUnitContainerProvider.java:283) at org.openspaces.pu.container.servicegrid.PUServiceBeanImpl.startPU(PUServiceBeanImpl.java:713) at org.openspaces.pu.container.servicegrid.PUServiceBeanImpl.doStart(PUServiceBeanImpl.java:236) at org.jini.rio.jsb.ServiceBeanAdapter$1.run(ServiceBeanAdapter.java:297) at org.jini.rio.jsb.ServiceBeanAdapter.start(ServiceBeanAdapter.java:310) at org.jini.rio.jsb.JSBLoader.create(JSBLoader.java:106) at org.jini.rio.cybernode.ServiceBeanLoader.load(ServiceBeanLoader.java:276) at org.jini.rio.cybernode.JSBDelegate.startServiceBean(JSBDelegate.java:475) at org.jini.rio.cybernode.JSBDelegate.load(JSBDelegate.java:330) at org.jini.rio.cybernode.JSBContainer.activate(JSBContainer.java:213) at org.jini.rio.cybernode.CybernodeImpl.instantiate(CybernodeImpl.java:1054) at org.jini.rio.core.provision.ServiceBeanInstantiatorGigaspacesMethodinternalInvoke3.internalInvoke(Unknown Source)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
jokesterjokester
Once,
jshakiljshakil
Once,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
1380 more bugmates