Database Values Plugin (jira-database-values-plugin) how to prepere Connection string

Zawistowski Grzegorz December 7, 2015

How to prepere Connection String to Connect Database Values Plugin with MS SQL. Please Help.

Here is documentation for this plugin:

https://bitbucket.org/wimdeblauwe/jdvp/wiki/Home#markdown-header-general

 

2 answers

0 votes
Zawistowski Grzegorz December 10, 2015

I put there yesturday, but this not work:

 

Databasefield.png

 

 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2015

What connection string would you use in any other code?

Although the Atlassian docs do cover this for manual connections to MS-SQL, so you can use their examples - see https://confluence.atlassian.com/jira/connecting-jira-to-sql-server-2012-610763188.html and look near the bottom for "database connection fields" - that should give you a good guide

Zawistowski Grzegorz December 7, 2015

I want to connect with this Extention Nic. Have You tried this on extension ? I cant connect to MS SQL by this Extention.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2015

Have you read the documentation I pointed to - it tells you how to set up a datasource

Zawistowski Grzegorz December 7, 2015

Yes I ws tried. But itdon't run wit this plugin. Have You Tried Nic this plugin ? I write like this: database.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver database.user=Login database.password=******** database.connection.url=jdbc:jtds:sqlserver://11.11.1111:1433/Database_Name

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2015

Yes, many times, and on different databases. "Itdon't run wit this plugin" just tells us that you've got something wrong. Try correcting the errors (e.g. do you *really* have a user called "Login"?) The doc I pointed to tells you how to work out and use the connection strings, and it works absolutely fine for me. Only used it last week, which is why I picked on it.

Zawistowski Grzegorz December 8, 2015

And How we could find out Nic that we connected database or not. Because we don't know that we connected database, or we have got a mistake with Query, or in HTML view. How find out that connection in right and plugin is connected.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2015

I'm not sure what you're asking now - it seems to be for us to know what your database settings are and how you've configured them, but we can't tell you that, they're your systems! First question - how have you set up the add-on? Have you followed the instructions for creating the data source? Your original question was about formatting/building the connection string, and the doc I pointed to tells you how to take your raw settings and convert them to the string you need in there. But we can't tell you if they're right. The second question is how have you set up the field(s) you need?

Zawistowski Grzegorz December 8, 2015

But we cund find out nic by errors is we configured our Database right or wrong ? The Extensions haven't got error masages the connection is good or not ? AD.1. Yes I was fallow the instructions, but I have got still none Values. I can show after connection all my Query, but it hive back None Values: # Cache Timeout (= 15 minutes by default). The actual db is queried only once and then the results are kept in the cache for the given timeout. Uncomment the line below to change it. cache.timeout=1000 # The SQL Query that will be executed on the database sql.query=SELECT TOP 10 ContactId As ID, FirstName, LastName, "Krakow" as city, "Polska" as Country FROM ContactBase # Cache Timeout (= 15 minutes by default). The actual db is queried only once and then the results are kept in the cache for the given timeout. Uncomment the line below to change it. #cache.timeout=900000 # The column number (starting from 0) that contains the primary key of the returned data. primarykey.column.number=0 # The pattern that should be used to render the data in view mode. Use {column_number} as placeholders. You can use HTML, but make sure you close your tags properly! rendering.viewpattern={1} {2} from <a href="http://maps.google.com/maps?f=q&hl=nl&geocode=&q={3}, {4}">{3}, {4}</a> # The pattern that should be used to render the data in edit mode. Use {column_number} as placeholders. rendering.editpattern={2}, {1} # The pattern that should be used to render the data in searcher. Use {column_number} as placeholders. rendering.searchpattern={1} {2} ({0}) # This is used when sorting in the issue navigator. When not defined, the 'rendering.viewpattern' is used. rendering.sortpattern={1} {2} # Use 0 to have a combobox for editing, 1 to have AJAX-style input field, 2 for cascading select edit.type=0 # Use 0 to have a list for searching, 1 to have AJAX-style input field search.type=0 # The pattern that is used for the history and the activity view. If not specified, the 'rendering.viewpattern' is used. Note that you cannot use HTML. rendering.changelog.viewpattern={1} {2} # The pattern that is used for the pie chart, 2d filter statistics and single level group by. If not specified, the 'rendering.viewpattern' is used. Note that you cannot use HTML. rendering.statistics.viewpattern={1} {2}

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2015

If the connection is wrong, you should see errors in the log. If it's working, then the field will work.

Zawistowski Grzegorz December 9, 2015

Hello Nick. I find out a log error, abaut database name. Please help: at java.sql.DriverManager.getConnection(DriverManager.java:247) at java.sql.DriverManager.getConnection(DriverManager.java:689) java.sql.SQLException: No suitable driver found for jdbc:sqlserver:ServerName:DataBaseName 2015-12-09 15:59:31,876 http-bio-80-exec-19 ERROR MyLogini 959x32336x1 3s21vf 10.0.3.55 /secure/QuickCreateIssue.jspa [jira.plugin.databasevalues.DatabaseRowCache] No suitable driver found for jdbc:sqlserver:ServerName:DataBaseName

Zawistowski Grzegorz December 9, 2015

Nic would You know where is common\lib directory to put driver on it Please Help.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 10, 2015

Ah, ok. The driver needs to be the plain .jar file, and placed in the *Tomcat* lib directory (I'm assuming you're using a roughly default JIRA install, not installed in a different app server). So, <jira install>/lib

Zawistowski Grzegorz December 10, 2015

Can You Nick look at my answer screen please?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 10, 2015

Did you restart the Tomcat completely? Are there errors in the logs?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 10, 2015

Oh, hang on, you should be using the jtds driver too - Microsoft's jdbc drivers are awful bug-ridden junk...

Zawistowski Grzegorz December 10, 2015

Yes I restarted Tomcat completely, and I have got errors on the log. On localization as on screen I put thetwo drivers: jtds-1.2.4.jar and was a jtds-1.3.1.jar. Maybe it's better to put in another localizations. Or Ishould Register this files on Jira ? I only put tchem in catalog.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 10, 2015

That makes no sense. First, you need *one* version of the driver. If there's one already there, do NOT replace it with another, or have another version in there. I have no idea what you mean by "localization" - the locales have nothing to do with system drivers. Registering drivers in JIRA is nonsense, and I've got even less idea what you might mean by "catalog"

Zawistowski Grzegorz December 10, 2015

But the secound wos added on lib catalog or folder. So I must delete this ? Localisation I understand a lib catalog or folder. Idon't know why this don't work. If we tried to write It in Java with this driver it wos working.

Zawistowski Grzegorz December 10, 2015

If we tried with this driver programing by Java in Eclipse it was working.

Suggest an answer

Log in or Sign up to answer