KB Article #186180

[Best Practice] The metering tables are not created

Problem

If you have fulfilled the metering configuration the tables are not appearing in the Database and no errors are thrown in the logs. Please follow the below procedure before opening a support case:

Resolution

-Please check your organization if it was defined correctly and if there is no missing parameter that can reflect an issue while reporting the usage.

-Firstly, please check the grants and permission for the Database. For Oracle DBs, to accomplish the usage reporting B2Bi and Amplify should be using the same schemas only the user must be different, for the rest of B2Bi DBs the schema should be different the internal DB user should be the same as B2Bi.

-Depending on B2Bi architecture, we might obtain to make some additional actions:

  • Verify the existence of <B2Bi_Install_Dir>/Interchange/conf/events.xml if it contains the following sentence:
<EventRouter id="Message Summaries to Usage Tracker File" class="com.cyclonecommerce.collaboration.events.MessageSummaryUsageTrackerRouter" active="true">
  • If the above section is missing or the statement is set to "false" the metering service will not be capable of starting since this line is responsible for keeping the metering service or triggering the startup.
  • For cluster installation, the events.xml file should be placed in $SHARED/local_te/conf as any file that stands in this directory will be determined as the primary leader meaning that the file that is stored in <B2Bi_Install_Dir>/Interchange/conf will be ignored
  • In a cluster environment, another possible cause might be caused by the absence of the following lines that weren't substituted in $SHARED/local_te/conf/jvmArguments.xml.

<Property key="axway.b2bi.metering.agentConfigFileLocal">${axway.interchange.home}/conf/meteringAgentLocal.properties</Property>
<Property key="axway.cluster.canGenerateKeyStoresForTLS">true</Property>

//The above actions may have a solvable effect depending on the B2Bi version or Database used or other implementations.

The above lines should be inserted at the beginning of the CN node sections. An example was illustrated below:

<NodeType type="CN" class="com.axway.clusterold.startup.Boot">
    ..............................
    ... some other properties ....
    ..............................
    <Property key="java.security.auth.login.config">../conf/jaas.config</Property>
    <Property key="log4j.configurationFile">${axway.interchange.conf.log4j2}</Property>
    <Property key="java.util.logging.config.file">../conf/logging/java.util.logging.properties</Property>
    <Property key="derby.system.home">../derby</Property>
    <Property key="axway.syncAgent.configFile">${axway.interchange.home}/conf/multicluster/agent.properties</Property>
    <Property key="java.ext.dirs"></Property>  <!-- Avoid cocoon warning "Could not expand Directory:null" when running on Java 11 -->
    <Property key="axway.b2bi.metering.agentConfigFile">${axway.b2bi.shared.folder}/local_te/conf/metering/meteringAgent.properties</Property>
    <Property key="axway.b2bi.metering.agentConfigFileLocal">${axway.interchange.home}/conf/meteringAgentLocal.properties</Property>
    <Property key="axway.cluster.canGenerateKeyStoresForTLS">true</Property>
</NodeType>