KB-1009 "Could not find datasource" error thrown during JBoss startup

Symptoms

In some instances, JBoss fails to start up and the login page is not displayed when attempting to access Appian. In addition, the application server log contains the following message:

Could not find datasource: jdbc/AppianPrimaryDS
...
javax.naming.NameNotFoundException: jdbc/AppianPrimaryDS

Cause

JBoss

  • The custom.properties file is using a JNDI name that is not in the appian-ds.xml file. The data source details may not be configured in appian-ds.xml file at all.
  • The custom.properties file is using a JNDI name that does not match what is in the appian-ds.xml file. There could be a spelling error.
  • Either the custom.properties file or the appian-ds.xml file is using Java context (but not both), causing the inconsistency.
  • JBoss did not deploy the appian-ds.xml file due to the presence of either an appian-ds.xml.failed or appian-ds.xml.undeployed marker file in the <JBOSS_HOME>/standalone/deployments folder.

To confirm if JBoss is not deploying the data source properly, check for the following message in the application server log:

JBAS010400: Bound data source [java:/jdbc/AppianPrimaryDS]
If this message is not present, it means that the appian-ds.xml file is not visible to Appian and it was never deployed to JBoss. In this case, it does not matter whether or not the JNDI names in custom.properties and appian-ds.xml match.

Tomcat

  • The custom.properties file is using a JNDI name that is not in the suite.xml file. The data source details may not be configured in suite.xml file at all.
  • The custom.properties file is using a JNDI name that does not match what is in the suite.xml file. There could be a spelling error.
  • Either the custom.properties file or the suite.xml file is using Java context (but not both), causing the inconsistency.

Action

JBoss

  1. Stop JBoss.
  2. Stop the Appian engines.
  3. Make sure the appian-ds.xml.dodeploy file is present in <JBOSS_HOME>/standalone/deployments.
  4. Verify the names are correct in both custom.properties and appian-ds.xml.
  5. In <JBOSS_HOME>/standalone/deployments, check to see if there is an appian-ds.xml.failed or appian-ds.xml.undeployed file. If there is, rename it to appian-ds.xml.dodeploy.
  6. In <APPIAN_HOME>/ear, check to see if there is an suite.ear.failed file. If there is, rename it to suite.ear.dodeploy.
  7. Start the Appian engines.
  8. Start JBoss.

Tomcat

  1. Stop Tomcat.
  2. Stop the Appian engines.
  3. Verify the names are correct in both custom.properties and suite.xml. If you plan to use the configure script to deploy configuration from repo to <APPIAN_HOME>, ensure that the datasource name is correct in tomcatResouce.xml.<ENVIRONMENT_NAME> file.
  4. Start the Appian engiens.
  5. Start Tomcat.

Affected Versions

This article applies to all versions of Appian using JBoss EAP or Tomcat as an application server.

Last Reviewed: October 2018

Related
Recommended