Hi folks,
We are working to get a Jira Report that calculates a SLA, and among other things it needs to check if a day was working day against a holidays calendar stored in our CMDB.
Using jira 5.2, on tomcat 7.0.29 and oracle 11gR2. The CMDB is using MySQL, and no matter where I deploy the mysql jdbc driver, the plugin code seems unable to load the class ...
Already tried TOMCAT_HOME/lib and webapps/atlassian-jira/WEB-INF/lib, but always is throwing the same error:
"ClassNotFoundException: com.mysql.jdbc.Driver"
At this moment, the connection is being opened when the report is called (provisionally). Should I provide the driver with the plugin? I read something in atlassian wiki about classloader with the plugin system, but I can't remember the exact problem ...
The code in the report is:
Class.forName("com.mysql.jdbc.Driver"); // ClassNotFoundException! Properties connectionProps = new Properties(); connectionProps.put("user", "user"); connectionProps.put("password", "the_pass"); String url = "jdbc:mysql://dbhost.com:3306/db"; c = DriverManager.getConnection(url, connectionProps);
Thanks in advance
Community moderators have prevented the ability to post new answers.
for the record, the problem is solved when adding this section to pom.xml:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.29</version> </dependency>
HTH
i also faced same problem later used to connect with external databse using JNDI configuration
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.