The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

postgreSQL driver in bamboo

Deleted user
April 19, 2017

i want to develop a bamboo plugin, and i need to test  it in a safe environment.

i installed bamboo server on my macbook, and postgres.app for the database.

I used this to connect to the database using jdbc, but I get the error

No suitable driver found for jdbc:postgresql://localhost:5432/bamboo

I tried including

Class.forName("org.postgresql.Driver");

in my java class, but it does not find the class.

 

How do I include the driver in my plugin ?

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 19, 2017

You'll have to add the jdbc driver into the /lib directory of tomcat for Bamboo

https://jdbc.postgresql.org/download.html

and then restart bamboo

Deleted user
April 20, 2017

I don't find a tomcat directory, where is it ?

I tried adding the jar to

${bambooHome}/atlassian-bamboo/WEB-INF/lib/

but it does not work

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 20, 2017

How did you install your bamboo?

Deleted user
April 20, 2017

I downloaded the archive here https://confluence.atlassian.com/bamboo/installing-bamboo-on-mac-os-x-289276789.html

 

for writing the plugin I installed atlassian sdk using homebrew.

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 20, 2017

Try ${bambooHome}/lib then check that you have the driver that matches your postgres version

Screen Shot 2017-04-20 at 10.36.33.png

0 votes
Deleted user
April 21, 2017

I tried different locations

${bambooHome}/lib
${bambooHome}/atlassian-bamboo/WEB-INF/lib
${bambooHome}/atlassian-bamboo/lib

and none of them worked.

do I need to include the driver in the pom.xml of the plugin ?

if so, How do I do that ?

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 22, 2017

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1212</version>
</dependency>

0 votes
Deleted user
April 20, 2017

I have downloaded the latest jdbc jar in this folder, but it still does not find it, I have bamboo 5.15.5 with java 8 and postgreSQL 9.6, so I used the 4.2 version.

Deleted user
April 20, 2017

I tried

DriverManager.getDrivers()

and it return an empty list

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 20, 2017

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events