Hi!!
I m trying to use ScriptRunner to validate a custom field against a database.
In my groovy script, I don t like store the user and password , and use JNDI looks a better approach.
So I had defined a JNDI in my context.xml like this:
<Resource name="JIRA_SupportDB"
auth="Container" type="javax.sql.DataSource"
username="sqljira"
password="*******"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://RICSQLPRE003/JIRA_Support;instance=INFOCAJA:1433"
/>
And in my script I have this sentences:
JndiTemplate template = new JndiTemplate();
DataSource ds = (DataSource)template.lookup("JIRA_SupportDB");
But when I execute the validator, a javax.naming.NameNotFoundException raises
I'm doing something wrong? is posible to use JNDI in Script Runner?
Thanks in advance
Mario Prada