Showing posts with label datasource. Show all posts
Showing posts with label datasource. Show all posts

Thursday, October 17, 2019

Thingsboard install_dev_db HSQLDB spring.datasource.hikari.maximumPoolSize problem

Thingsboard is a fantastic open source IoT data gathering and visualization platform. I was trying to setup the local development mode for Thingsboard and always step on the mines, so I just want to document the problem and solution for install_dev_db. When you check out the Thingsboard source from github, you need to build the project on your computer:

  • mvn clean install -DskipTests
Then you try to run the application by using your IDE to run java main file: org.thingsboard.server.ThingsboardServerApplication, you will get the following error:
Schema-validation: missing table [admin_settings]

This is an indication that you don't have the database setup, for running in dev mode, we need to swith the DB to HSQLDB by commenting out the Postgres DB configuration and plug in the HSQLDB configuration found here.

When you try to run the install_dev_db.bat you may run into the following error:

Error creating bean with name 'baseTimeseriesService': Unsatisfied dependency expressed through field 'timeseriesDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaTimeseriesDao': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.hikari.maximumPoolSize' in value "${spring.datasource.hikari.maximumPoolSize}"

To solve the aforementioned error, you need add the following configuration in your thingsboard.yml under the spring.datasource:


hikari:
  maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:50}"
This will let you successfully setup the dev DB for thingsboard.

Wednesday, December 07, 2011

How to currentSchema for DB2 DataSource in WebSphere

Without setting the currentSchema for DB2, you need to fully qualified the DB object (table, view etc) name.
According IBM documentation, currentSchema means "This allows the end user or application to name SQL objects without having to qualify them by schema name."

How to setup the crrentSchema for DB2 DataSource in Websphere?
Resources->JDBC->Click your Data Source name->Customer properties->currentSchema.
Restart your Websphere to make it take effective.
BTW: The DataSource currentSchema setting could be co-exist with the openjpa.jdbc.Schema setting in persistent.xml without intereference with each other.

Full Guide for using Bitnami Prometheus Operator Helm Chart with Additional Scrape Configuration

"The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of...