How to configure JNDI names in plugins since upgrade to Jira 4.4.x

Thomas Pieber March 14, 2012

Hi.

I have some serious problem configuring the "database custom field" or the "SQLFeed" - plugin.
We are using Jira 4.4.4, where datasources have moved to the dbconfig.xml - file and were the XML structure of a datasource has changed too.

Currently there is following datasource configured in the dbconfig.xml file, but none of the name or delegator-name seems to work as JNDI name at the plugin config page:

<jira-database-config>
  <name>defaultDS</name>
  <delegator-name>default</delegator-name>
  <database-type>oracle10g</database-type>
  <jdbc-datasource>
    <url>jdbc:oracle:thin:@URL:1521:SID</url>
    <driver-class>oracle.jdbc.OracleDriver</driver-class>
    <username>name</username>
    <password>password</password>
    <pool-size>20</pool-size>
    <connection-properties>SetBigStringTryClob=true</connection-properties>
  </jdbc-datasource>
</jira-database-config> 

Nevertheless I tried to followed the instructions and added the Resource-tag at the context.xml or server.xml - file. But with the new tag the JIRA server won't even start !

<Resource
name="TestDB" auth="Container"
type="javax.sql.DataSource"
username="username"
password="password"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@URL:1521:SID"
connectionProperties="SetBigStringTryClob=true""
/>

catalina.out:org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute specifications, ">" or "/>".

What I'm doing wrong ? Is there any description missing how to deal with the changed datasource configuration ? Are there any differences since the new JIRA version, which are not documented yet ?

2 answers

1 accepted

1 vote
Answer accepted
Alice Paillard March 28, 2012

Hi Thomas,

I'm in charge of SQLFeed support at Valiantys.

1. Datasource name: if you want to query JIRA's own database you can leave the datasource name blank in SQLFeed administration menu.

But if you want to query another database with datasource "myDS" you must put "java:comp/env/jdbc/myDS" in SQLFeed administration menu.

2. I fixed recently a mistake in the documentation about the location of the "resource" tag: il your distribution type is standalone the tag must be located in "conf/server.xml", with EAR-WAR use the context file instead (usually called conf/Catalina/localhost/jira.xml or conf/Catalina/localhost/ROOT.xml).

Do not hesitate to create a support request on https://jira.valiantys.com/browse/SQLFEED if it still doesn't work.

1 vote
Radu Dumitriu
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 Leaders.
March 28, 2012
connectionProperties="SetBigStringTryClob=true"" ??
should be:
connectionProperties="SetBigStringTryClob=true" <<<<<<<!<<<<!<!<!<!<!

Suggest an answer

Log in or Sign up to answer