Add Data Adapter JDBC MySql: ClassNotFound

0

Hi,

I get this message error (see below) when I test new Mysql Data Adapter.

Witch is the location where I must copy mysql connector jar ?

thanks.

net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
 
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:173)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:128)
at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:129)
at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.run(AbstractDataAdapterWizard.java:164)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:175)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:145)
... 4 more
 
devware33's picture
Joined: Jan 13 2015 - 4:10am
Last seen: 4 years 9 months ago

2 Answers:

1

just add mysql jar (mysql-connector-java-5.1.34-bin.jar) to the CLASSPATH:

project properties/Java Build Path/Libraries/Add External JARs ...

 

devware33's picture
Joined: Jan 13 2015 - 4:10am
Last seen: 4 years 9 months ago
0

Thanks,

looks like I was working with IReports 5.6.0. The things look much easier with Jaspersoft Studio 6.2.0 :-)

 

llcool_willyj's picture
Joined: Jan 26 2016 - 8:45am
Last seen: 2 years 4 days ago
Feedback
randomness