Error creating bean with name 'primaryDataSourceConfig' while starting JBOSS 6.4 on appian 17.1

Hi

I'm getting many error messages in console output while starting jboss. 

The firsts ones says:

 

20:42:01,830 INFO [stdout] (ServerService Thread Pool -- 56) 2017-04-19 20:42:01,827 [ServerService Thread Pool -- 56] ERROR com.appiancorp.kougar.driver.Connections.sec - An error occurred while trying to read the security token from "/home/appian_user/Programs/appian/ear/suite.ear/conf/appian.sec". No security token will be sent when connecting to engines.
20:42:04,823 INFO [stdout] (ServerService Thread Pool -- 56) 2017-04-19 20:42:04,822 [ServerService Thread Pool -- 56] INFO com.appiancorp.rdbms.config.PrimaryDataSourceConfig - Validating and initializing the Appian data source: java:/jdbc/AppianDS
20:42:05,821 INFO [stdout] (ServerService Thread Pool -- 56) 2017-04-19 20:42:05,819 [ServerService Thread Pool -- 56] ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: java:/jdbc/AppianDS

 

Full output in atacched file.

 

Any suggestions please?

console_output_starting_jboss.txt

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    Line 295 of your logs says:

    Caused by: javax.naming.NameNotFoundException: jdbc/AppianDS

    Are you sure you've got the primary datasource configured correctly?
  • check your standalone.xml or module.xml inside <JBossHome>/modules/MySQL folder and look for Java flag in data source configuration. If this flag is true, java: is prefixed to the data source name specified. since your real data source is not java:, turn off that java flag.
  • 0
    Certified Lead Developer
    Verify the data source names in custom.properties , appian-ds.xml .
    While restarting please make sure you delete the JBOSS temp folder, (data folder , if required) and also check the suite.ear and appian-ds.xml is deployed successfully.
  • If I&#x27;m using configuration script, this flag should i look for it in <REPO_HOME> also, or only in <JBOSS_HOME> or both?
  • In <REPO_HOME>/Configuration/ear/suite.ear/conf/custom.properties.dev

     

    ######################
    #### Data Sources ####
    ######################

    ## Appian must have a dedicated data source. Set the value to the JNDI name of
    ## the data source that will be used as the Appian data source.
    ## Note: This data source must point to a separate tablespace than any listed
    ## in the conf.data.datasources configuration.
    conf.data.APPIAN_DATA_SOURCE=java:/jdbc/AppianDS
    ## Comma-separated list of JNDI names of data sources on the application server
    ## that will be used to store business data. This list is used by the Query
    ## Database smart service and Data Stores.
    conf.data.datasources=<AppianDevDS>

     

    In <REPO_HOME>/Configuration/bin/jboss/jboss-eap-6.4/standalone/deployments/appian-mysql-ds.xml.dev

    <?xml version="1.0" encoding="UTF-8"?>
    <datasources xmlns="www.jboss.org/.../schema">
    <!-- System Datasource -->
    <xa-datasource
    jndi-name="jdbc/AppianDS"
    pool-name="MySqlDS"
    enabled="true"
    use-java-context="false">
    <xa-datasource-property name="URL">jdbc:mysql://appian1.serverdomain.com:3306/appian_dev_data?useOldAliasMetadataBehavior=true</xa-datasource-property>
    <xa-datasource-property name="useUnicode">true</xa-datasource-property>
    <xa-datasource-property name="characterEncoding">UTF-8</xa-datasource-property>
    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
    <driver>com.mysql.jdbc</driver>
    <security>
    <security-domain>ds-name-security-appian</security-domain>
    </security>
    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
    <xa-pool>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    </xa-pool>
    <timeout>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>5</idle-timeout-minutes>
    </timeout>
    </xa-datasource>
    <xa-datasource
    jndi-name="jdbc/AppianDevDS"
    pool-name="MySqlDevDS"
    enabled="true"
    use-java-context="false">
    <xa-datasource-property name="URL">jdbc:mysql://appian1.serverdomain.com:3306/appian_dev?useOldAliasMetadataBehavior=true</xa-datasource-property>
    <xa-datasource-property name="useUnicode">true</xa-datasource-property>
    <xa-datasource-property name="characterEncoding">UTF-8</xa-datasource-property>
    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
    <driver>com.mysql.jdbc</driver>
    <security>
    <security-domain>ds-name-security-primary</security-domain>
    </security>
    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
    <xa-pool>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    </xa-pool>
    <timeout>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>5</idle-timeout-minutes>
    </timeout>
    </xa-datasource>
    </datasources>

     

    I'm lost, do you see any misconfiguration?

  • +1
    Certified Associate Developer
    in reply to rogeliog

    Update the <xa-datasource
    jndi-name="jdbc/AppianDS"
    pool-name="MySqlDS"
    enabled="true"
    use-java-context="false">  
    tag to <xa-datasource
    jndi-name="jdbc/AppianDS"
    pool-name="MySqlDS"
    enabled="true"
    use-java-context="true">

    This should solve your problem.

  • Did so, tur on java flag., it appears thar solves problem by half.

    When tunning jboss, and stops sendidn messages in console, i accees via web browser to

    h t t p : / / a ppian . myserver . com : 8080 /suite/designer  

    and

    https : / / appian . myserver . com : 443 /suite/designer

    And console starts givin more uotput once again showing errors in something that has todo with de data source.

    This is what it is shown after trying to access via web browser to suite.

     

    Full output here atacched again.

    What i did and ist shown in full output

    • appian/server/bin/start-engine.sh
    • appian/search-server/bin/start.sh
    • EAP-6.4.0/bin/standalone.sh 
    • appian/server/bin/diagnostic/checkengine.sh
    • EAP-6.4.0/bin/standalone.sh 

    log nuevo.txt

  • +1
    Certified Associate Developer
    in reply to rogeliog

    ## Comma-separated list of JNDI names of data sources on the application server

    ## that will be used to store business data. This list is used by the Query

    ## Database smart service and Data Stores.

    conf.data.datasources=jdbc/AppianDevDS

     

    Appian is looking for the business datasource, which you have configured as <AppianDevDS>.

  • In appian-mysql-ds.xml.dev I have two <xa-datasource> tags, 

     

    The Appian Data Source must be the first one: jndi-name="jdbc/AppianDS" pool-name="MySqlDS"

    The Business Data Source must be the second onejndi-name="jdbc/AppianDevDS" pool-name="MySqlDevDS"

     

    In custom.properties.dev it Appian Data Source is indicated like so:

    ## Appian must have a dedicated data source. Set the value to the JNDI name of
    ## the data source that will be used as the Appian data source.
    ## Note: This data source must point to a separate tablespace than any listed
    ## in the conf.data.datasources configuration.
    conf.data.APPIAN_DATA_SOURCE=java:/jdbc/AppianDS

     

    And Business Data Source like this:

    ## Comma-separated list of JNDI names of data sources on the application server
    ## that will be used to store business data. This list is used by the Query
    ## Database smart service and Data Stores.
    conf.data.datasources=<AppianDevDS>

     

    In installation instructions says:
    "
    NOTE: DO NOT include the Appian data source in the list of business data sources. This configuration is not supported and will be explicitly prevented in a future release."

    That is why i didn't put it like: conf.data.datasources=<AppianDS>,<AppianDevDS>

     

    Is that correct? I don't understand how it should be indicated 

    In addition, should both  <xa-datasource> have the same or different pool-name?

    Thanks in advance

  • +1
    Certified Associate Developer
    in reply to rogeliog

    You are correct in not including the Appian DS (in your case the datasource that has a jndi of jdbc/AppianDS) in the conf.data.datasources property within the custom.properties.  However the logs indicate that you have the incorrect value for the conf.data.datasources property.  It should be jdbc/AppianDevDS.  The proper value for the conf.data.datasources property is one or more JNDI names for business datasources not <AppianDevDS>.

    I'm not aware of any use of the pool-name attribute of the xa-datasource attribute.  I think it just a descriptor of the mbean instrumentation.