Database custom field plugin error

Sanu Soman
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.
August 28, 2013

Hi,

I just changed DB configuration (previously it was connecting to another DB and working fine) on conf/context.xml file to look new DB table but I'm not getting any values on custom field and also getting below log error

2013-08-29 15:51:42,979 http-bio-8080-exec-7 ERROR venkatsa 951x13417x1 v34vkb 151.191.52.35,151.191.75.11 /secure/IssueAction!default.jspa [commons.jira.kconfig.PluginConfiguration] Database JNDI >>NewDB<< is not defined
2013-08-29 15:51:42,980 http-bio-8080-exec-7 ERROR venkatsa 951x13417x1 v34vkb 151.191.52.35,151.191.75.11 /secure/IssueAction!default.jspa [databasecf.querydb.impl.QueryDatabaseImpl] Not connected. Possible database misconfiguration ?
2013-08-29 15:51:42,980 http-bio-8080-exec-7 ERROR venkatsa 951x13417x1 v34vkb 151.191.52.35,151.191.75.11 /secure/IssueAction!default.jspa [databasecf.querydb.impl.QueryDatabaseImpl] Could not execute SQL query >>select * from application<< on database NewDB.
java.sql.SQLException: Not connected. Possible database misconfiguration ?
at com.keplerrominfo.jira.plugins.databasecf.querydb.impl.QueryDatabaseImpl.getResults(QueryDatabaseImpl.java:66)
at com.keplerrominfo.jira.plugins.databasecf.querydb.impl.QueryServiceImpl.getResults(QueryServiceImpl.java:82)
at com.keplerrominfo.jira.plugins.databasecf.querydb.impl.QueryServiceImpl.getResultsAndSaveInSession(QueryServiceImpl.java:520)
at com.keplerrominfo.jira.plugins.databasecf.customfields.datacolumn.DatabaseCFType.getVelocityParameters(DatabaseCFType.java:106)
at com.atlassian.jira.issue.customfields.CustomFieldUtils.buildParams(CustomFieldUtils.java:387)
at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getEditHtml(CustomFieldTypeModuleDescriptorImpl.java:157)
at com.atlassian.jira.issue.fields.CustomFieldImpl.getEditHtml(CustomFieldImpl.java:977)
at com.atlassian.jira.issue.fields.screen.AbstractFieldScreenLayoutItem.getEditHtml(AbstractFieldScreenLayoutItem.java:78)
at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.getEditHtml(FieldScreenRenderLayoutItemImpl.java:62)
at com.atlassian.jira.issue.fields.rest.FieldHtmlFactoryImpl.getEditFields(FieldHtmlFactoryImpl.java:151) <+2>
at java.lang.reflect.Method.invoke(Unknown Source)
at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
at com.sun.proxy.$Proxy222.getEditFields(Unknown Source) <+2>
at java.lang.reflect.Method.invoke(Unknown Source)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
at com.sun.proxy.$Proxy222.getEditFields(Unknown Source)
at com.atlassian.jira.plugin.issuenav.viewissue.IssueFieldProvider.getEditFields(IssueFieldProvider.java:28)
at com.atlassian.jira.plugin.issuenav.action.IssueAction.populateIssueFields(IssueAction.java:147)
at com.atlassian.jira.plugin.issuenav.action.IssueAction.doDefault(IssueAction.java:132) <+2>
at java.lang.reflect.Method.invoke(Unknown Source)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) <+2> (ActionSupport.java:433) (ActionSupport.java:157)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) <+7> (DefaultInterceptorChain.java:39) (NestedInterceptorChain.java:31) (ChainedInterceptor.java:16) (DefaultInterceptorChain.java:35) (GenericDispatcher.java:225) (GenericDispatcher.java:154) (JiraWebworkActionDispatcher.java:151)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) <+14> (ApplicationFilterChain.java:305) (ApplicationFilterChain.java:210)

Please suggest.

5 answers

1 accepted

0 votes
Answer accepted
Alexandru_Iacob
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.
August 29, 2013

You need to restart Jira after editing the context.xml file, before you can use the new defined data source.

Sanu Soman
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.
August 29, 2013

Restart helped me on this :) Many thanks.

0 votes
Sanu Soman
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.
August 29, 2013

Difference I can find that both DB having different versions... 10g Enterprise Edition Release 10.2.0.4.0 (new one) & 11g Enterprise Edition Release 11.2.0.3.0 (old one, connected sucessfully) and we were using only one jdbc driver, ie ojdbc6.jar .

So please suggest is need to put any other JDBC driver for connecting this?

0 votes
Sanu Soman
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.
August 28, 2013

<Resource name="NewDB"
auth="Container" type="javax.sql.DataSource"
username="*****"
password="*****"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@servername:1534:dbname"
connectionProperties="SetBigStringTryClob=true"
/>

0 votes
Sanu Soman
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.
August 28, 2013

After editing context.xml file, do we need to restart the JIRA service?

0 votes
Alexandru_Iacob
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.
August 28, 2013

Can you please attach the new data source configuration from context.xml?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events