Where to put JDBC driver jars or add to path?

0

 I am using the standalone Jaspersoft Studio (rather than the Eclipse plugin) and want to connect to set up a data source for MySQL.

I already have various JDBC drivers for MySQL and am familiar with setting up drivers in Eclipse. In the standalone Studio the options under Preferences:Java:Build Path:User Libraries looked familiar enough. I added a user library and added the mysql-connector jar to it. However, I still get a class not found error when I try to create a new Data Adapter for MySQL and test it.

What is the correct way to add a JDBC driver to the JasperSoft Studio classpath?

 

will1604's picture
Joined: Mar 5 2012 - 3:11pm
Last seen: 7 years 2 weeks ago

5 Answers:

3

you can add to project classpath in a standard eclipse way, in this way driver will be visible inside your project

or you can add the driver inside the DataAdapter dialog

 

can you send your error, stack trace?

chicuslavic's picture
Joined: Apr 19 2010 - 3:18am
Last seen: 8 months 3 weeks ago
1

Thanks for the reply. I missed the "Driver Classpath" tab in the Data Adapter dialog. Obvious really!

It would still be useful to add the driver to the classpath so it is always available. The only thing I could find which looks anything like the standard Eclipse way was in Preferences as I mentioned above. Can you be more specific about where to set this up?

Stacktrace attached.

 

will1604's picture
Joined: Mar 5 2012 - 3:11pm
Last seen: 7 years 2 weeks ago
0

 There is another way to add the drivers to the system itself so it is always available when compiling. Maven, However is a different story. See my FAQ post if you can and please post this answer to help others!

pjamrisk's picture
Joined: May 3 2008 - 6:54am
Last seen: 10 years 10 months ago
1

the standard eclipse way to add jars to classpath, is to use Project Properties, Java Build Path pages

right click on you project, on the bottom you have Properties, go to "Java Build Path" pages, the best way is to create a lib folder inside your project and put there your drivers, in this way you can share your configuration on CVS, SVN, GIT, etc.

you can also have classpath settings for each DataAdapter, in this case you have to use paths relative to your current filesystem

 

chicuslavic's picture
Joined: Apr 19 2010 - 3:18am
Last seen: 8 months 3 weeks ago
0

Please can an administrator remove this comment, because I cannot find a delete menu.

shsamara77's picture
Joined: Apr 9 2018 - 8:50pm
Last seen: 4 months 3 weeks ago
Feedback
randomness