Migration failed for TN data (upgrade from 9.10 to 10.5)

I could see below error while running migration utility for TN data. We do not have any issues while running DCC for TN and TNA database.

Failed migrations
Trading Networks data and configuration file Migrator : null
(0) com.wm.app.tn.db.DatastoreException: Database with alias:TNA does not contain proper Trading Network db tables version, expected version:v10.5 got:null

Hi Mohith,

did you provide the correct database parameters during installation of IS (& TN) for the TN database pool?

You can verify this under IntegrationServer/instances/default/config/jdbc/pool.
Also check if the pool is correctly assigned to the TN jdbc function in the function subdirectory (instead of the pool subdirectory).

Can you provide the directory listings for the config/jdbc subdirectories?
Can you provide some details how you have setup your database using DB Configurator?

In each database schema there is a table COMPONENT_VERSION, can you provide its content for TN and TNA schema?
It does track the installation and migration for the database components which are installed into this schema.

Regards,
Holger

Hi Holger

I tried upgrading 9.10 to 10.3 instead of 10.5. I got the same error for 10.3 on TNA.

com.wm.app.tn.db.DatastoreException: Database with alias:TNA does not contain proper Trading Network db tables version, expected version:80 got:null

Attaching directory listing for jdbc pool and function. And also DB component level details for TN and TNA schemas.

I’ve migrated schema using DCC migration commands and no errors during migration. Pool Alias working fine, but I could see below error in IS logs whenever I’m trying to access partner profiles from MWS .

2020-01-09 23:46:42 EST [ISU.0000.9999W] com.wm.app.b2b.server.ServiceException: The main connection to the data store has not been initialized. Check the Trading Networks JDBC connection pool.

TN_COMP_LEVEL.txt (2.05 KB)
TNA_COMP_LEVEL.txt (3.53 KB)
JDBC_Details.txt (2.39 KB)

Hi Mohith,

in this case go to the IS Admin UI under Settings -> JDBC Pools and test the connections (the pools)to TN and TNA.
At least one of them or both should give an error. If not or if the errors are fixed, then check the assignments of the pools to the functions.
After that, restart and test the functions.

When all is set up correctly, there should be no error messages related to this.

After that reload the WmTN package and try again.

Regards,
Holger

Hi Holger

Connections are working from IS Admin page(Test Connections), but JDBC connections pools are not initialized properly during IS startup. Is there something missing as part of DataDirect dirvers?

Below are error logs

2020-01-13 09:40:37 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool DocumentHistory:IS Internal
2020-01-13 09:40:37 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool ISCoreAudit:IS Core Audit
2020-01-13 09:40:37 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool Xref:IS Internal
2020-01-13 09:40:38 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool ProcessAudit:Process Audit
2020-01-13 09:40:38 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool Archiving:Archive
2020-01-13 09:40:38 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool TN:TN
2020-01-13 09:40:38 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool ISInternal:IS Internal
2020-01-13 09:40:38 EST [ISS.0096.0008I] JDBC Connection pool threshold exceeded, 0 available for pool ProcessEngine:Process Engine
2020-01-13 09:40:38 EST [ISS.0025.0024I] JDBC Connection Manager started


Whenever I try to reload WmTN package, I could see below error XML.


wm.tn.doctype:unregisterCategory

java.lang.IllegalStateException
The main connection to the data store has not been initialized. Check the Trading Networks JDBC connection pool.
java.lang.IllegalStateException: The main connection to the data store has not been initialized. Check the Trading Networks JDBC connection pool.
at com.wm.app.tn.db.impl.DefaultJdbcPoolManager.getConnection(DefaultJdbcPoolManager.java:164)
at com.wm.app.tn.db.Datastore.getConnection(Datastore.java:166)

Hi Mohith,

Do you have Deployer installed on the same machine ? If yes, then can you pls check if you have any tncore jar on the below path:

/package/WmDeployer/code/jars/static/

Thanks,
Yogesh

Hi Mohith,

can you share your pool definitions please.

min size should be set to 0 (instead of 1) and max size is 10 per default.

Error message indicates that there are more connections requested by the server than the pool can handle.

For historic reasons I have usually the following pools available:

TN - assigned to TN (I am currently on 9.12, there is only one TN-function which holds live data as well as archived data)
Archive - assigned to Archive (used by WmMonitor archiving services)
IS - assigned to all other functions where neeed (contains also ISCoreAudit & ProcessAudit as well as DocHist, XRef and ProcessEngine and ISInternal)
MWS - assigned to Central Users (used by Central User Managment; SSO via MWS user storage)

Regards,
Holger

Hi Holger

Issue resolved by adding TNA version record in TN database (COMPONENT_LEVEL) table.WmTN package is connecting to TN database and validating TN and TNA versions from TN database. Do we have any procedure to create TNA component on live TN database?

Issue is with TN JDBC connection pool. WmTN package is throwing below error. I’m not sure why TN and TNA were created 2 separate databses and TNA never used for 9.10 version.

020-01-13 10:16:11 EST [TNS.0000.2052D] Reported data model version in database: 9.0.
2020-01-13 10:16:12 EST [TNS.0002.1082C] Database with alias:TNA does not contain proper Trading Network db tables version, expected version:80 got:null

2020-01-13 10:16:12 EST [ISU.0000.9999C] com.wm.app.tn.db.DatastoreException: Database with alias:TNA does not contain proper Trading Network db tables version, expected version:80 got:null

Hi Mohith,

in DB Configurator there are two way to create database schema:
One is per Component and one is per Product.

When ever possible, I choose the Product as this applies all components alltogether which are relevant for this product.

For TN, this is TNS and TNA.
For MWS, this is MWS and CentralConfiguration.
For IS schema I usually combine Products BPM and IntegrationServer in one schema, which covers ProcessEngine, ProcessAudit, ISCoreAudit and ISInternal parts as well as DocHistory, XRef et al.

For Archive there is no Product, but using the Component is sufficient.
Remember to set the proper grants in your Audit schema and to point the archive schema to the audit schema.
See Monitor Users Guide for further information.

Regards,
Holger

Hi Holger

DCC should support both component wise schema as well product wise schema.

current version of WM (9.10 )uses component wise schema and migrate it to 10.3 with cloned DB than WmTN should supports both component as well as product wise.Whereas WmTN package is validating TN and TNA component levels from TN component (schema). If I don’t use product wise schema it will throw error.I could see this error in both 10.3 and 10.5 with component wise schema.

Is it mandate to use product wise schema for TN? Other side, we never used TNA component in 9.10

Hi,

I always used product wise schema creation and never had issues with missing database components.

When using component wise schema creation you should create both TN components to the same schema.

Regards,
Holger

We faced similar issue on an instance where we did not remove the tn-core-10.5.0-v0170.jar from packages/WmDeployer/code/jars/static folder after fix installation. This is a post fix installation step which needs to be performed.
Removing the jar and restarting the IS resolved the issue.