cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Not able to start Thingworx8.4.1 with H2persistence provider

tsharma
10-Marble

Not able to start Thingworx8.4.1 with H2persistence provider

Hi Team,

I have installed TWRX 8.4.1 with H2 persistence provider, but is not able to start the WebApp on tomcat.The following error is displayed:

 

Not able to get connection from the underlying database.

 

I suppose starting from Thingworx 8.4+, a username & password is required in the platform-settings.json file for H2 persistence provider also.Below is the related content of my platform-settings.json file:

 

"PersistenceProviderPackageConfigs":{ 
"H2PersistenceProviderPackage":{ 
"ConnectionInformation":{ 
"password":"twadmin",
"username":"twadmin"
}
}
}

 

Please help regarding what is the default username & password for H2 provider.

10 REPLIES 10
mnarang
17-Peridot
(To:tsharma)

If possible can you attach complete application log and platform-settings.json ? 

I believe you have downloaded and placed the H2 specific war in webapps .

 

 

 

Thanks ,

Mukul Narang 

tsharma
10-Marble
(To:mnarang)

Mukul, 

Thanks for the prompt reply, the application log & settings file is attached for your reference. Also, as informed earlier i think the issue is with the new setting of username & password required for H2 provider for TWRX 8.4+ versions as i am able to run TWRX Postgres 8.4.1 without any issues on the same machine.

 

Below is the platfomr-settings.json file:

 

{  
   "PlatformSettingsConfig":{  
      "AdministratorUserSettings":{  
         "InitialPassword":"<initial-password>"
      },
	  "ContentTypeSettings": {
"supportedMediaEntityContentTypes" : ["image/svg+xml","image/png","image/gif","image/bmp","image/jpeg","application/pdf","image/vnd.microsoft.icon"]
}
   },
   "ExtensionPackageImportPolicy":{  
      "importEnabled":"true",
      "allowJarResources":"true",
      "allowJavascriptResources":"true",
      "allowCSSResources":"true",
      "allowJSONResources":"true",
      "allowWebAppResources":"true",
      "allowEntities":"true",
      "allowExtensibleEntities":"true"
   },
   "PersistenceProviderPackageConfigs":{  
      "H2PersistenceProviderPackage":{  
         "ConnectionInformation":{  
            "password":"twadmin",
            "username":"twadmin"
         }
      }
   },
   "LicensingConnectionSettings":{  
      "username":"<ptc-username>",
      "password":"<ptc-password>"
   }
}
mnarang
17-Peridot
(To:tsharma)

I don't think there is actually a problem with H2 DB username/pass .One thing i noticed is the structure of your json file ,Extension package import policy comes under platform settings config only ,but you have put it outside config block .I am attaching my working json for 8.4 H2 only ,kindly see this for reference and make changes in your json .

The attached file is in .txt as it does not allow to attach json .

 

Thanks ,

Mukul Narang 

tsharma
10-Marble
(To:mnarang)

Hi Mukul,

 

Changed my platform-settings.json as per your suggestion, but gwtting the same error as before:

 

ERROR: java.sql.SQLException: Connections could not be acquired from the underlying database!

ERROR: Wrong username or password.

 

Java: 8u202

Tomcat: 9.0.14

 

My platform-settings.json file:

{  
   "PlatformSettingsConfig":{  
      "ExtensionPackageImportPolicy":{  
         "importEnabled":"true",
         "allowJarResources":"true",
         "allowJavascriptResources":"true",
         "allowCSSResources":"true",
         "allowJSONResources":"true",
         "allowWebAppResources":"true",
         "allowEntities":"true",
         "allowExtensibleEntities":"true"
      },
      "AdministratorUserSettings":{  
         "InitialPassword":"admin@123456789"
      },
      "ContentTypeSettings":{  
         "supportedMediaEntityContentTypes":[  
            "image/svg+xml",
            "image/png",
            "image/gif",
            "image/bmp",
            "image/jpeg",
            "application/pdf",
            "image/vnd.microsoft.icon"
         ]
      },
      "LicensingConnectionSettings":{  
         "username":"<ptc-username>",
         "password":"<ptc-password>"
      }
   },
   "PersistenceProviderPackageConfigs":{  
      "H2PersistenceProviderPackage":{  
         "ConnectionInformation":{  
            "password":"password",
            "username":"twadmin"
         }
      }
   }
}

Please suggest.

slangley
23-Emerald II
(To:tsharma)

Hi @tsharma.

 

Try taking out the section for "PersistenceProviderPackageConfigs."  If that doesn't work, move platform-settings.json to another location and restart Tomcat to see if ThingWorx comes up without it.  This will validate that the persistence provider is not needed in the .json and you can then just add back the settings needed.  Remember to validate the contents by using a json validator such as this one.

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @tshara.

 

If one of the previous responses provided a solution to your issue, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

priyag3
5-Regular Member
(To:tsharma)

@tsharma  were you able to resolve the issue?

I am also facing the same issue. Please assist

Did u get a solution?
slangley
23-Emerald II
(To:priyag3)

Hi @priyag3 and @vieirac1.

 

If you are experiencing an issue, please provide some details around your configuration:

 

  • What version of ThingWorx?
  • What method are you using for the installation?
  • If you are running one of the foundation installers, which one?
  • Have you validated the requirements?

We would need to check your platform-settings.json for errors there.  Do you have logs that you can share?

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @priyag3 and @vieirac1.

 

If you have resolved your installation issues, please post an update with the solution.  This will benefit others on the community experiencing similar issues.

 

Regards.

 

--Sharon

Announcements


Top Tags