Database custom field plugin error

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

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

Restart helped me on this :) Many thanks.

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

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

<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"
/>

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?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 10 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

34 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you