Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

How to add MySql Driver in any Opendaylight bundle/module.

asked 2014-12-04 03:20:31 -0800

anonymous user

Anonymous

updated 2014-12-13 23:50:46 -0800

Hi,

I want to save packets details using northbound Apis in Mysql database. For that i add following Dependencies in my pom.xml

<dependency> <groupid>mysql</groupid> <artifactid>mysql-connector-java</artifactid> <version>5.1.32</version> </dependency>

and in one of my java class i used static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";

on mvn clean install my module build perfectly but when my java class receive packets controller log shows java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Help/Suggestion needed.

edit retag flag offensive close merge delete

Comments

1

It's really not good form to tag users in your questions. This is a community-driven site. If your question is [good](http://www.catb.org/esr/faqs/smart-questions.html), the members of the community that know the relevant domain will step in and help.

dfarrell07 ( 2014-12-12 10:21:46 -0800 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-04-29 10:17:37 -0800

Bjoern gravatar image

Hi there,

You have to configure Datasources in Karaf. Tutorial on this link. But at the moment I haven't got my MySQL running still working on it.

Cheers, Bjoern

edit flag offensive delete publish link more
0

answered 2015-12-14 18:24:59 -0800

s04639linzi gravatar image

Do you install mysql-connector-java.jar in controller? In my solution, this jar file is added in opendaylight plugin folder and thus MySql can work. ps. In Lithium version, you shuld install the database feature in karaf. feature:install pax-jdbc-mysql

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-12-04 03:20:31 -0800

Seen: 3,336 times

Last updated: Dec 14 '15