--- title: "Datasource and Configuration Issues" slug: "datasource-and-configuration-issues" description: "If there is an issue with the database connection configuration in DM or a problem connecting to the configured database, then Autoform DM will fail on startup." tags: ["Configuration", "SQL server", "Oracle", "Datasource", "Autoform DM"] updated: 2024-10-16T08:47:48Z published: 2024-10-16T08:47:48Z canonical: "kb.lasernetgroup.com/datasource-and-configuration-issues" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Datasource and Configuration Issues If there is an issue with the database connection configuration in DM or a problem connecting to the configured database, Autoform DM will fail on startup with an exception ending in the line: **Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set.** The database configuration itself can be found in **standalone.xml** and looks like this: ```xml    jdbc:jtds:sqlserver://localhost:1433/MYDB    jtds          10          20      false      false      FailingConnectionOnly              pdm      pdm              SELECT 1      true       ``` The **connection-url** and **security** sections are the important lines as they hold the database location and authentication. This article documents the failure behavior in order to help diagnose the actual underlying problem. ## General Symptoms A database configuration error will cause DM to fail to deploy correctly at startup and cause large amounts of error logging. Look for the following symptoms: - DM fails to deploy on startup - navigating to the web frontend results in a **404 - Not Found** error message. - Checking the server logs shows a large number of log lines, such as the following: ```plaintext service jboss.deployment.subunit."pdm_app_module.ear"."applicationservice-8.0.0-SNAPSHOT.jar".component.ClientApplicationServiceEJB.VIEW."com.efstech.pdm.applicationservice.ejb.se ssion.ClientApplicationService".LOCAL (missing) dependents: [service jboss.deployment.subunit."pdm_app_module.ear"."applicationservice-8.0.0-SNAPSHOT.jar".component.ClientApplicationSer viceEJB.START] ``` - Just before the deployment failure errors (as above), there is a stackstrace ending with the line: **Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set** ## Identify the Root Cause Should the above symptoms be apparent, then first search for a log line containing the text: **IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection** ### SQL Server If the following error logs are displayed, there is usually a cause and a way to fix the error, as follows: ```plaintext ... Caused by: java.sql.SQLException: Unknown server host name '' ... Caused by: java.net.UnknownHostException: ``` #### **Cause** Unable to resolve the hostname of the database server. #### **Fix** Check the hostname is correct and verify that you can ping it and resolve its DNS entry without issue. Depending on the network setup, you may need the **FQDN** (fully qualified domain name), for instance, **databasehost.some.domain.com**, rather than just **databasehost**. --- ```plaintext ... Caused by: java.sql.SQLException: Network error IOException: Connection refused ... Caused by: java.net.ConnectException: Connection refused ``` #### **Cause** Unable to connect to database server - most likely an issue with the port. #### **Fix** Verify the database server is running and available on the configured port. --- ```plaintext ... Caused by: java.sql.SQLException: Cannot open database "AFPDM8DPP" requested by the login. The login failed. ``` #### **Cause** The connection to the database server was successful, and the login credentials were valid, but the user was not able to access the configured database. #### **Fix** Check the database name is correct and that the user has the correct permissions to access and read the tables. --- ```plaintext ... Caused by: java.sql.SQLException: Login failed for user 'pdm'. ``` **Cause** The specified credentials for connecting to the database server are invalid. #### **Fix** Verify the username and password are correct, and the user has the correct permissions to connect to the database server and read the configured database. --- ### Oracle ```plaintext ... Caused by: java.sql.SQLRecoverableException: IO Error: Unknown host specified ... Caused by: oracle.net.ns.NetException: Unknown host specified ``` #### **Cause** Unable to resolve the hostname of the database server. #### **Fix** Check the hostname is correct and verify that you can ping it and resolve its DNS entry without issue. Depending on the network setup you may need the **FQDN** (fully qualified domain name), for instance **databasehost.some.domain.com** rather than just **databasehost**. --- ```plaintext ... Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection ... Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection ... Caused by: java.net.ConnectException: Connection refused ``` #### **Cause** Unable to connect to database server - most likely an issue with the port. #### **Fix** Verify the database server is running and available on the configured port. --- ```plaintext ... Caused by: java.sql.SQLException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor ... Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor ``` #### **Cause** Unable to locate Oracle database service - the connection to the Oracle database server has been established, but the specified Oracle database service is not valid. #### **Fix** Check the service name specified and verify that you are able to use another tool, such as SQL Developer, to connect. --- ```plaintext ... Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon denied ``` #### **Cause** The specified credentials for connecting to the database are invalid. #### **Fix** Verify the username and password are correct and the user has the correct permissions to be able to read and use the database service. --- ```plaintext ... WARN  [org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (ServerService Thread Pool -- 65) IJ030027: Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.T4CConnection@351298af: java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)   at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951) ... ``` #### **Cause** The SQL statement used to validate the connections in the connection pool is invalid. This will be because DM has been installed with a database type other than Oracle, so the wrong SQL has been configured. #### **Fix** 1. Edit the Wildfly configuration file (standalone.xml or domain.xml) or edit the database **datasource** connection via the management console. 2. Find the **check-valid-connection-sql** property and ensure it is: **SELECT 1 FROM DUAL** For example: ```plaintext          ...              SELECT 1 FROM DUAL        true             ```