Custom plugin functions are not able to access data sources configured through the Admin Console. A NameNotfoundException error will be visible in the application server log in conjuction with an error for the custom function being used.
For example, when using the ExecuteStoredProcedure function, an error similar to what is shown below will be logged:
ExecuteStoredProcedure
ERROR com.appiancorp.ps.function.ExecuteStoredProcedureFunction - Error executing: javax.naming.NameNotFoundException: jdbc/AppianDS
Custom plugin functions currently do not have the ability to inject the initial context needed to utilize the application server connection pooling and communicate with the data sources configured through the Admin Console when using new InitialContext().
new InitialContext()
In the custom plugin, use javax.naming.Context instead.
javax.naming.Context
Configure the data sources using the traditional method found in Configuring Relational Databases.
This article applies to Appian 16.1 and later.
Last Reviewed: March 2017