Debezium Engine not catching changes on my MySQL Database - mysql

I have a Spring Boot Application with Debezium Api embbeded to catch changes no my MySQL Database.
I'm trying to make Debezium Engine Api (v1.1.2) catch any changes on my MySQL local database.
But, for some reason, Embedded Debezium its not able to catch when any change happen.
Does anyone have any tip to help me?
Here's my configuration code
import io.debezium.engine.ChangeEvent;
import io.debezium.engine.DebeziumEngine;
import io.debezium.engine.format.Json;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.io.IOException;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
#Configuration
public class InstalaCoreDatabaseConnectorConfiguration {
#Value("${instala.datasource.serverid}")
private String databaseServerId;
#Value("${instala.datasource.host}")
private String databaseHost;
#Value("${instala.datasource.databasename.core}")
private String coreDatabaseName;
#Value("${instala.datasource.port}")
private String databasePort;
#Value("${instala.datasource.username}")
private String databaseUserName;
#Value("${instala.datasource.password}")
private String databasePassword;
private final String[] coreDatabaseWhitelistTables = {
//"SERVC_ORD_EVNT",
//"SERVC_ORD_ITEM",
"test_dev_core.servc_prvdr"
//"SERVC_PRVDR_AGNT"
};
#Bean
public void coreDatabaseConnector() throws IOException {
final Properties props = new Properties();
props.setProperty("name", "instala-core");
props.setProperty("connector.class", "io.debezium.connector.mysql.MySqlConnector");
props.setProperty("offset.storage", "org.apache.kafka.connect.storage.FileOffsetBackingStore");
props.setProperty("offset.storage.file.filename", "/tmp/offsets.dat");
props.setProperty("offset.flush.interval.ms", "60000");
/* begin connector properties */
props.setProperty("database.hostname", databaseHost);
props.setProperty("database.port", databasePort);
props.setProperty("database.user", databaseUserName);
props.setProperty("database.password", databasePassword);
props.setProperty("database.server.id", databaseServerId);
props.setProperty("database.server.name", "instalacore");
props.setProperty("database.history", "io.debezium.relational.history.FileDatabaseHistory");
props.setProperty("database.history.file.filename", "/tmp/dbhistory.dat");
props.setProperty("table.whitelist", String.join(",", coreDatabaseWhitelistTables));
// Create the engine with this configuration ...
try (DebeziumEngine<ChangeEvent<String, String>> engine = DebeziumEngine.create(Json.class)
.using(props)
.notifying(record -> {
System.out.println(record);
}).build()
) {
Executors.newSingleThreadExecutor().execute(engine);
// Run the engine asynchronously ...
ExecutorService executor = Executors.newSingleThreadExecutor();
executor.execute(engine);
// Do something else or wait for a signal or an event
}
}
}
And here is my pom.xml dependencies
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-api</artifactId>
<version>1.1.2.Final</version>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-embedded</artifactId>
<version>1.1.2.Final</version>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-connector-mysql</artifactId>
<version>1.1.2.Final</version>
</dependency>
And the grants for my user is
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `admin`#`localhost` WITH GRANT OPTION'
'GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin`#`localhost` WITH GRANT OPTION'
'GRANT ALL PRIVILEGES ON `dev_core`.* TO `admin`#`localhost`'
'GRANT SELECT ON `dev_core`.`servc_prvdr` TO `admin`#`localhost`'
Here is my Spring Boot start-up application logs
2020-06-25 17:08:34.613 INFO 2625 --- [ main] com.test.cdc.CDCRelayApplication : Starting CDCRelayApplication on bruno-Inspiron-7580 with PID 2625 (/var/www/html/cdc-relay/target/classes started by bruno in /var/www/html/cdc-relay)
2020-06-25 17:08:34.615 INFO 2625 --- [ main] com.test.cdc.CDCRelayApplication : No active profile set, falling back to default profiles: default
2020-06-25 17:08:35.560 INFO 2625 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-06-25 17:08:35.571 INFO 2625 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-06-25 17:08:35.571 INFO 2625 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.27]
2020-06-25 17:08:35.671 INFO 2625 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-06-25 17:08:35.671 INFO 2625 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1016 ms
2020-06-25 17:08:35.869 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = key
schemas.cache.size = 1000
schemas.enable = true
2020-06-25 17:08:35.871 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = value
schemas.cache.size = 1000
schemas.enable = false
2020-06-25 17:08:35.875 INFO 2625 --- [ main] i.d.e.EmbeddedEngine$EmbeddedConfig : EmbeddedConfig values:
access.control.allow.methods =
access.control.allow.origin =
bootstrap.servers = [localhost:9092]
client.dns.lookup = default
config.providers = []
connector.client.config.override.policy = None
header.converter = class org.apache.kafka.connect.storage.SimpleHeaderConverter
internal.key.converter = class org.apache.kafka.connect.json.JsonConverter
internal.value.converter = class org.apache.kafka.connect.json.JsonConverter
key.converter = class org.apache.kafka.connect.json.JsonConverter
listeners = null
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
offset.flush.interval.ms = 60000
offset.flush.timeout.ms = 5000
offset.storage.file.filename = /tmp/offsets.dat
offset.storage.partitions = null
offset.storage.replication.factor = null
offset.storage.topic =
plugin.path = null
rest.advertised.host.name = null
rest.advertised.listener = null
rest.advertised.port = null
rest.extension.classes = []
rest.host.name = null
rest.port = 8083
ssl.client.auth = none
task.shutdown.graceful.timeout.ms = 5000
value.converter = class org.apache.kafka.connect.json.JsonConverter
2020-06-25 17:08:35.875 INFO 2625 --- [ main] o.a.kafka.connect.runtime.WorkerConfig : Worker configuration property 'internal.key.converter' is deprecated and may be removed in an upcoming release. The specified value 'org.apache.kafka.connect.json.JsonConverter' matches the default, so this property can be safely removed from the worker configuration.
2020-06-25 17:08:35.876 INFO 2625 --- [ main] o.a.kafka.connect.runtime.WorkerConfig : Worker configuration property 'internal.value.converter' is deprecated and may be removed in an upcoming release. The specified value 'org.apache.kafka.connect.json.JsonConverter' matches the default, so this property can be safely removed from the worker configuration.
2020-06-25 17:08:35.878 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = key
schemas.cache.size = 1000
schemas.enable = true
2020-06-25 17:08:35.878 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = value
schemas.cache.size = 1000
schemas.enable = true
2020-06-25 17:08:35.880 INFO 2625 --- [ main] io.debezium.embedded.EmbeddedEngine : Stopping the embedded engine
2020-06-25 17:08:35.881 INFO 2625 --- [ main] io.debezium.embedded.EmbeddedEngine : Waiting for PT5M for connector to stop
2020-06-25 17:08:35.884 INFO 2625 --- [pool-2-thread-1] o.a.k.c.storage.FileOffsetBackingStore : Starting FileOffsetBackingStore with file /tmp/offsets.dat
2020-06-25 17:08:35.920 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : Starting MySqlConnectorTask with configuration:
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : connector.class = io.debezium.connector.mysql.MySqlConnector
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.history.file.filename = /tmp/dbhistory.dat
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.user = admin
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : offset.storage = org.apache.kafka.connect.storage.FileOffsetBackingStore
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.server.id = 1
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.server.name = instalacore
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.port = 3306
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : table.whitelist = test_dev_core.servc_prvdr
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : offset.flush.interval.ms = 60000
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : offset.storage.file.filename = /tmp/offsets.dat
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.hostname = localhost
2020-06-25 17:08:35.924 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.password = ********
2020-06-25 17:08:35.924 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : name = instala-core
2020-06-25 17:08:35.924 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.history = io.debezium.relational.history.FileDatabaseHistory
2020-06-25 17:08:36.194 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Found no existing offset, so preparing to perform a snapshot
2020-06-25 17:08:36.222 INFO 2625 --- [pool-2-thread-1] io.debezium.util.Threads : Requested thread factory for connector MySqlConnector, id = instalacore named = binlog-client
2020-06-25 17:08:36.231 INFO 2625 --- [pool-2-thread-1] io.debezium.util.Threads : Requested thread factory for connector MySqlConnector, id = instalacore named = snapshot
2020-06-25 17:08:36.231 INFO 2625 --- [pool-2-thread-1] io.debezium.util.Threads : Creating thread debezium-mysqlconnector-instalacore-snapshot
2020-06-25 17:08:36.232 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : Starting snapshot for jdbc:mysql://localhost:3306/?useInformationSchema=true&nullCatalogMeansCurrent=false&useSSL=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&connectTimeout=30000 with user 'admin' with locking mode 'minimal'
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : Stopping down connector
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Stopping MySQL connector task
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.ChainedReader : ChainedReader: Stopping the snapshot reader
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.SnapshotReader : Discarding 0 unsent record(s) due to the connector shutting down
2020-06-25 17:08:36.233 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.SnapshotReader : Discarding 0 unsent record(s) due to the connector shutting down
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : Snapshot is using user 'admin' with these MySQL grants:
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `admin`#`localhost` WITH GRANT OPTION
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin`#`localhost` WITH GRANT OPTION
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT ALL PRIVILEGES ON `test_dev_core`.* TO `admin`#`localhost`
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT SELECT ON `test_dev_core`.`servc_prvdr` TO `admin`#`localhost`
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : MySQL server variables related to change data capture:
2020-06-25 17:08:36.238 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Connector task finished all work and is now shutdown
2020-06-25 17:08:36.239 INFO 2625 --- [pool-2-thread-1] o.a.k.c.storage.FileOffsetBackingStore : Stopped FileOffsetBackingStore
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_cache_size = 32768
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_checksum = CRC32
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_direct_non_transactional_updates = OFF
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_encryption = OFF
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_error_action = ABORT_SERVER
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_expire_logs_seconds = 2592000
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_format = ROW
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_group_commit_sync_delay = 0
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_group_commit_sync_no_delay_count = 0
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_gtid_simple_recovery = ON
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_max_flush_queue_time = 0
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_order_commits = ON
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_rotate_encryption_master_key_at_startup = OFF
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_event_max_size = 8192
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_image = FULL
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_metadata = MINIMAL
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_value_options =
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_rows_query_log_events = OFF
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_stmt_cache_size = 32768
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_compression = OFF
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_compression_level_zstd = 3
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_dependency_history_size = 25000
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_dependency_tracking = COMMIT_ORDER
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_client = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_connection = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_database = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_filesystem = binary
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_results = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_server = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_system = utf8
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_sets_dir = /usr/share/mysql-8.0/charsets/
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : collation_connection = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : collation_database = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : collation_server = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : default_collation_for_utf8mb4 = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : enforce_gtid_consistency = OFF
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_executed =
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_executed_compression_period = 1000
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_mode = OFF
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_next = AUTOMATIC
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_owned =
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_purged =
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : immediate_server_version = 999999
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : innodb_api_enable_binlog = OFF
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : innodb_version = 8.0.20
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : log_statements_unsafe_for_binlog = ON
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : max_binlog_cache_size = 18446744073709547520
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : max_binlog_size = 1073741824
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : max_binlog_stmt_cache_size = 18446744073709547520
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : original_server_version = 999999
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : protocol_version = 10
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : session_track_gtids = OFF
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : slave_type_conversions =
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : sync_binlog = 1
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : system_time_zone = -03
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : time_zone = SYSTEM
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : tls_version = TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version = 8.0.20
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_comment = MySQL Community Server - GPL
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_compile_machine = x86_64
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_compile_os = Linux
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_compile_zlib = 1.2.11
2020-06-25 17:08:36.332 INFO 2625 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-25 17:08:36.486 INFO 2625 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-06-25 17:08:36.527 INFO 2625 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-06-25 17:08:36.529 INFO 2625 --- [ main] com.test.cdc.CDCRelayApplication : Started CDCRelayApplication in 2.236 seconds (JVM running for 2.484)
Anyone have any idea on why this is happening?
Thanks everyone!

the whitelist table is in format <databasename>.<tablename>. You have only table name part.

Looking at your config the offsets.dat will create after 60 seconnds when the offsets are committed. You can reduce the offset.flush.interval.ms for test purposes.
What conecnerns me more is
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : Stopping down connector
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Stopping MySQL connector task
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.ChainedReader : ChainedReader: Stopping the snapshot reader
You create the engine in try block so it is stopped (closed) as soon as the block left. You code should stay in that block.

Related

HikariPool-1 - Exception during pool initialization , Unknown database 'cafemanagementsystem;'

When I run the code, It gives the above-mentioned error. Even though it indicates an error, the code is running in the terminal without terminating.
It shows that "Unknown database 'cafemanagementsystem;'" . Therefore, I checked with my database also. It has been properly created.
Below you can see my application.properties file code
spring.datasource.url=jdbc:mysql://localhost:3306/cafemanagementsystem;
spring.datasource.username=root
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.format_sql=true
Another thing is,
When I changed this line (which is in the application.properties file) like this spring.jpa.hibernate.ddl-auto=update execution is terminated.
Exception that I have recieved,
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.3)
2022-09-21 08:56:03.228 INFO 7364 --- [ main]
C.CafeManagementSystemBackendApplication : Starting
CafeManagementSystemBackendApplication using Java 1.8.0_281 on LAPTOP-9934KKKF with PID 7364 (E:\L3\L3S1\E\EAD\Practicals\Cafe-Management-System\Cafe_Management_System_Backend\target\classes started by Acer in E:\L3\L3S1\E\EAD\Practicals\Cafe-Management-System\Cafe_Management_System_Backend)
2022-09-21 08:56:03.234 INFO 7364 --- [ main] C.CafeManagementSystemBackendApplication : No active profile set, falling back to 1 default profile: "default"
2022-09-21 08:56:03.898 INFO 7364 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-09-21 08:56:03.910 INFO 7364 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 4 ms. Found 0 JPA repository interfaces.
2022-09-21 08:56:04.291 INFO 7364 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-09-21 08:56:04.304 INFO 7364 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-09-21 08:56:04.304 INFO 7364 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-09-21 08:56:04.433 INFO 7364 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-09-21 08:56:04.434 INFO 7364 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1140 ms
2022-09-21 08:56:04.550 INFO 7364 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-09-21 08:56:04.589 INFO 7364 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.10.Final
2022-09-21 08:56:04.709 INFO 7364 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-09-21 08:56:04.783 INFO 7364 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-09-21 08:56:06.257 ERROR 7364 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
java.sql.SQLSyntaxErrorException: Unknown database 'cafemanagementsystem;'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) [HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) [HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) [HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) [HikariCP-4.0.3.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
at com.example.CafeManagementSystemBackend.CafeManagementSystemBackendApplication.main(CafeManagementSystemBackendApplication.java:10) ~[classes/:na]
2022-09-21 08:56:06.262 WARN 7364 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata
java.sql.SQLSyntaxErrorException: Unknown database 'cafemanagementsystem;'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-4.0.3.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
at com.example.CafeManagementSystemBackend.CafeManagementSystemBackendApplication.main(CafeManagementSystemBackendApplication.java:10) ~[classes/:na]
2022-09-21 08:56:06.271 INFO 7364 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2022-09-21 08:56:06.656 INFO 7364 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-09-21 08:56:06.665 INFO 7364 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-09-21 08:56:06.694 WARN 7364 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-09-21 08:56:06.956 INFO 7364 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-09-21 08:56:06.967 INFO 7364 --- [ main] C.CafeManagementSystemBackendApplication : Started CafeManagementSystemBackendApplication in 4.177 seconds (JVM running for 5.03)
If you need further information to come across my problem, please let me know.
Thank you.
Your database name is being seen as 'cafemanagementsystem;', remove the semi colon ';'

Not able to start embedded server for Kafka for Junit testing

I am trying to workout already implemented example from github for understanding of Springboot Kafka unit testing through Junit.
I am new to testing.
I am using this code Github
When i try to run it as Junit then it gives me error mentioned below:
2021-06-16 18:14:15.907 INFO 9864 --- [ main] o.a.k.clients.producer.KafkaProducer : [Producer clientId=producer-1] Closing the Kafka producer with timeoutMillis = 0 ms.
2021-06-16 18:14:15.918 INFO 9864 --- [ -C-1] o.a.k.c.c.internals.ConsumerCoordinator : [Consumer clientId=consumer-sender-1, groupId=sender] Revoke previously assigned partitions UpdatedBrandEvent-0, UpdatedBrandEvent-1
2021-06-16 18:14:15.918 INFO 9864 --- [ -C-1] o.s.k.l.KafkaMessageListenerContainer : sender: partitions revoked: [UpdatedBrandEvent-0, UpdatedBrandEvent-1]
2021-06-16 18:14:15.918 INFO 9864 --- [ -C-1] o.a.k.c.c.internals.AbstractCoordinator : [Consumer clientId=consumer-sender-1, groupId=sender] Member consumer-sender-1-95af1165-2ad8-4ea4-896b-28fbd9cef316 sending LeaveGroup request to coordinator localhost:60727 (id: 2147483647 rack: null) due to the consumer unsubscribed from all topics
2021-06-16 18:14:15.920 INFO 9864 --- [ -C-1] o.a.k.clients.consumer.KafkaConsumer : [Consumer clientId=consumer-sender-1, groupId=sender] Unsubscribed all topics or patterns and assigned partitions
2021-06-16 18:14:15.920 INFO 9864 --- [ -C-1] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService
2021-06-16 18:14:15.924 INFO 9864 --- [quest-handler-0] k.coordinator.group.GroupCoordinator : [GroupCoordinator 0]: Member[group.instance.id None, member.id consumer-sender-1-95af1165-2ad8-4ea4-896b-28fbd9cef316] in group sender has left, removing it from the group
2021-06-16 18:14:15.924 INFO 9864 --- [quest-handler-0] k.coordinator.group.GroupCoordinator : [GroupCoordinator 0]: Preparing to rebalance group sender in state PreparingRebalance with old generation 1 (__consumer_offsets-0) (reason: removing member consumer-sender-1-95af1165-2ad8-4ea4-896b-28fbd9cef316 on LeaveGroup)
2021-06-16 18:14:15.926 INFO 9864 --- [quest-handler-0] k.coordinator.group.GroupCoordinator : [GroupCoordinator 0]: Group sender with generation 2 is now empty (__consumer_offsets-0)
2021-06-16 18:14:15.936 INFO 9864 --- [ -C-1] essageListenerContainer$ListenerConsumer : sender: Consumer stopped
2021-06-16 18:14:15.964 INFO 9864 --- [ main] kafka.server.KafkaServer : [KafkaServer id=0] shutting down
2021-06-16 18:14:15.965 INFO 9864 --- [ main] kafka.server.KafkaServer : [KafkaServer id=0] Starting controlled shutdown
2021-06-16 18:14:15.982 INFO 9864 --- [er-event-thread] kafka.controller.KafkaController : [Controller id=0] Shutting down broker 0
2021-06-16 18:14:15.988 INFO 9864 --- [er-event-thread] state.change.logger : [Controller id=0 epoch=1] Sending UpdateMetadata request to brokers HashSet() for 0 partitions
2021-06-16 18:14:15.993 INFO 9864 --- [ main] kafka.server.KafkaServer : [KafkaServer id=0] Controlled shutdown succeeded
2021-06-16 18:14:16.002 INFO 9864 --- [ main] icationListener$ChangeEventProcessThread : [/config/changes-event-process-thread]: Shutting down
2021-06-16 18:14:16.003 INFO 9864 --- [-process-thread] icationListener$ChangeEventProcessThread : [/config/changes-event-process-thread]: Stopped
2021-06-16 18:14:16.003 INFO 9864 --- [ main] icationListener$ChangeEventProcessThread : [/config/changes-event-process-thread]: Shutdown completed
2021-06-16 18:14:16.003 INFO 9864 --- [ main] kafka.network.SocketServer : [SocketServer brokerId=0] Stopping socket server request processors
2021-06-16 18:14:16.012 INFO 9864 --- [ main] kafka.network.SocketServer : [SocketServer brokerId=0] Stopped socket server request processors
2021-06-16 18:14:16.013 INFO 9864 --- [ main] kafka.server.KafkaRequestHandlerPool : [data-plane Kafka Request Handler on Broker 0], shutting down
2021-06-16 18:14:16.016 INFO 9864 --- [ main] kafka.server.KafkaRequestHandlerPool : [data-plane Kafka Request Handler on Broker 0], shut down completely
2021-06-16 18:14:16.020 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-AlterAcls]: Shutting down
2021-06-16 18:14:16.220 INFO 9864 --- [per-0-AlterAcls] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-AlterAcls]: Stopped
2021-06-16 18:14:16.220 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-AlterAcls]: Shutdown completed
2021-06-16 18:14:16.221 INFO 9864 --- [ main] kafka.server.KafkaApis : [KafkaApi-0] Shutdown complete.
2021-06-16 18:14:16.222 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-topic]: Shutting down
2021-06-16 18:14:16.309 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-topic]: Shutdown completed
2021-06-16 18:14:16.309 INFO 9864 --- [nReaper-0-topic] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-topic]: Stopped
2021-06-16 18:14:16.312 INFO 9864 --- [ main] k.c.transaction.TransactionCoordinator : [TransactionCoordinator id=0] Shutting down.
2021-06-16 18:14:16.313 INFO 9864 --- [ main] k.c.transaction.ProducerIdManager : [ProducerId Manager 0]: Shutdown complete: last producerId assigned 0
2021-06-16 18:14:16.314 INFO 9864 --- [ main] k.c.transaction.TransactionStateManager : [Transaction State Manager 0]: Shutdown complete
2021-06-16 18:14:16.314 INFO 9864 --- [ main] k.c.t.TransactionMarkerChannelManager : [Transaction Marker Channel Manager 0]: Shutting down
2021-06-16 18:14:16.318 INFO 9864 --- [rSenderThread-0] k.c.t.TransactionMarkerChannelManager : [Transaction Marker Channel Manager 0]: Stopped
2021-06-16 18:14:16.318 INFO 9864 --- [ main] k.c.t.TransactionMarkerChannelManager : [Transaction Marker Channel Manager 0]: Shutdown completed
2021-06-16 18:14:16.319 INFO 9864 --- [ main] k.c.transaction.TransactionCoordinator : [TransactionCoordinator id=0] Shutdown complete.
2021-06-16 18:14:16.320 INFO 9864 --- [ main] k.coordinator.group.GroupCoordinator : [GroupCoordinator 0]: Shutting down.
2021-06-16 18:14:16.321 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Heartbeat]: Shutting down
2021-06-16 18:14:16.510 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Heartbeat]: Shutdown completed
2021-06-16 18:14:16.510 INFO 9864 --- [per-0-Heartbeat] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Heartbeat]: Stopped
2021-06-16 18:14:16.511 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Rebalance]: Shutting down
2021-06-16 18:14:16.544 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Rebalance]: Shutdown completed
2021-06-16 18:14:16.544 INFO 9864 --- [per-0-Rebalance] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Rebalance]: Stopped
2021-06-16 18:14:16.545 INFO 9864 --- [ main] k.coordinator.group.GroupCoordinator : [GroupCoordinator 0]: Shutdown complete.
2021-06-16 18:14:16.545 INFO 9864 --- [ main] kafka.server.ReplicaManager : [ReplicaManager broker=0] Shutting down
2021-06-16 18:14:16.546 INFO 9864 --- [ main] k.s.ReplicaManager$LogDirFailureHandler : [LogDirFailureHandler]: Shutting down
2021-06-16 18:14:16.546 INFO 9864 --- [rFailureHandler] k.s.ReplicaManager$LogDirFailureHandler : [LogDirFailureHandler]: Stopped
2021-06-16 18:14:16.546 INFO 9864 --- [ main] k.s.ReplicaManager$LogDirFailureHandler : [LogDirFailureHandler]: Shutdown completed
2021-06-16 18:14:16.546 INFO 9864 --- [ main] kafka.server.ReplicaFetcherManager : [ReplicaFetcherManager on broker 0] shutting down
2021-06-16 18:14:16.548 INFO 9864 --- [ main] kafka.server.ReplicaFetcherManager : [ReplicaFetcherManager on broker 0] shutdown completed
2021-06-16 18:14:16.548 INFO 9864 --- [ main] kafka.server.ReplicaAlterLogDirsManager : [ReplicaAlterLogDirsManager on broker 0] shutting down
2021-06-16 18:14:16.548 INFO 9864 --- [ main] kafka.server.ReplicaAlterLogDirsManager : [ReplicaAlterLogDirsManager on broker 0] shutdown completed
2021-06-16 18:14:16.548 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Fetch]: Shutting down
2021-06-16 18:14:16.618 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Fetch]: Shutdown completed
2021-06-16 18:14:16.618 INFO 9864 --- [nReaper-0-Fetch] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Fetch]: Stopped
2021-06-16 18:14:16.618 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Produce]: Shutting down
2021-06-16 18:14:16.726 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Produce]: Shutdown completed
2021-06-16 18:14:16.726 INFO 9864 --- [eaper-0-Produce] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Produce]: Stopped
2021-06-16 18:14:16.726 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-DeleteRecords]: Shutting down
2021-06-16 18:14:16.744 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-DeleteRecords]: Shutdown completed
2021-06-16 18:14:16.744 INFO 9864 --- [0-DeleteRecords] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-DeleteRecords]: Stopped
2021-06-16 18:14:16.744 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-ElectLeader]: Shutting down
2021-06-16 18:14:16.945 INFO 9864 --- [r-0-ElectLeader] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-ElectLeader]: Stopped
2021-06-16 18:14:16.945 INFO 9864 --- [ main] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-ElectLeader]: Shutdown completed
2021-06-16 18:14:16.956 INFO 9864 --- [ main] kafka.server.ReplicaManager : [ReplicaManager broker=0] Shut down completely
2021-06-16 18:14:16.957 INFO 9864 --- [ main] kafka.log.LogManager : Shutting down.
2021-06-16 18:14:16.959 INFO 9864 --- [ main] kafka.log.LogCleaner : Shutting down the log cleaner.
2021-06-16 18:14:16.960 INFO 9864 --- [ main] kafka.log.LogCleaner : [kafka-log-cleaner-thread-0]: Shutting down
2021-06-16 18:14:16.961 INFO 9864 --- [leaner-thread-0] kafka.log.LogCleaner : [kafka-log-cleaner-thread-0]: Stopped
2021-06-16 18:14:16.961 INFO 9864 --- [ main] kafka.log.LogCleaner : [kafka-log-cleaner-thread-0]: Shutdown completed
2021-06-16 18:14:17.129 INFO 9864 --- [pool-8-thread-1] kafka.log.ProducerStateManager : [ProducerStateManager partition=__consumer_offsets-0] Writing producer snapshot at offset 2
2021-06-16 18:14:17.280 INFO 9864 --- [ main] kafka.log.LogManager : Shutdown complete.
2021-06-16 18:14:17.280 INFO 9864 --- [ main] rollerEventManager$ControllerEventThread : [ControllerEventThread controllerId=0] Shutting down
2021-06-16 18:14:17.281 INFO 9864 --- [ main] rollerEventManager$ControllerEventThread : [ControllerEventThread controllerId=0] Shutdown completed
2021-06-16 18:14:17.281 INFO 9864 --- [er-event-thread] rollerEventManager$ControllerEventThread : [ControllerEventThread controllerId=0] Stopped
2021-06-16 18:14:17.285 INFO 9864 --- [ main] k.controller.ZkPartitionStateMachine : [PartitionStateMachine controllerId=0] Stopped partition state machine
2021-06-16 18:14:17.286 INFO 9864 --- [ main] kafka.controller.ZkReplicaStateMachine : [ReplicaStateMachine controllerId=0] Stopped replica state machine
2021-06-16 18:14:17.287 INFO 9864 --- [ main] kafka.controller.RequestSendThread : [RequestSendThread controllerId=0] Shutting down
2021-06-16 18:14:17.287 INFO 9864 --- [r-0-send-thread] kafka.controller.RequestSendThread : [RequestSendThread controllerId=0] Stopped
2021-06-16 18:14:17.287 INFO 9864 --- [ main] kafka.controller.RequestSendThread : [RequestSendThread controllerId=0] Shutdown completed
2021-06-16 18:14:17.288 INFO 9864 --- [ main] kafka.controller.KafkaController : [Controller id=0] Resigned
2021-06-16 18:14:17.289 INFO 9864 --- [ main] kafka.zookeeper.ZooKeeperClient : [ZooKeeperClient Kafka server] Closing.
2021-06-16 18:14:17.395 INFO 9864 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn : EventThread shut down for session: 0x1000683bf6a0000
2021-06-16 18:14:17.395 INFO 9864 --- [ main] org.apache.zookeeper.ZooKeeper : Session: 0x1000683bf6a0000 closed
2021-06-16 18:14:17.396 INFO 9864 --- [ main] kafka.zookeeper.ZooKeeperClient : [ZooKeeperClient Kafka server] Closed.
2021-06-16 18:14:17.396 INFO 9864 --- [ main] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Fetch]: Shutting down
2021-06-16 18:14:17.447 INFO 9864 --- [ main] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Fetch]: Shutdown completed
2021-06-16 18:14:17.447 INFO 9864 --- [nelReaper-Fetch] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Fetch]: Stopped
2021-06-16 18:14:17.447 INFO 9864 --- [ main] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Produce]: Shutting down
2021-06-16 18:14:18.447 INFO 9864 --- [lReaper-Produce] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Produce]: Stopped
2021-06-16 18:14:18.447 INFO 9864 --- [ main] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Produce]: Shutdown completed
2021-06-16 18:14:18.447 INFO 9864 --- [ main] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Request]: Shutting down
2021-06-16 18:14:18.453 INFO 9864 --- [ main] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Request]: Shutdown completed
2021-06-16 18:14:18.453 INFO 9864 --- [lReaper-Request] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Request]: Stopped
2021-06-16 18:14:18.454 INFO 9864 --- [ main] kafka.network.SocketServer : [SocketServer brokerId=0] Shutting down socket server
2021-06-16 18:14:18.482 INFO 9864 --- [ main] kafka.network.SocketServer : [SocketServer brokerId=0] Shutdown completed
2021-06-16 18:14:18.485 INFO 9864 --- [ main] kafka.server.KafkaServer : [KafkaServer id=0] shut down completed
2021-06-16 18:14:18.509 INFO 9864 --- [nnectionExpirer] o.a.z.server.NIOServerCnxnFactory : ConnnectionExpirerThread interrupted
2021-06-16 18:14:18.509 INFO 9864 --- [electorThread-1] o.a.z.server.NIOServerCnxnFactory : selector thread exitted run method
2021-06-16 18:14:18.509 INFO 9864 --- [ad:/127.0.0.1:0] o.a.z.server.NIOServerCnxnFactory : accept thread exitted run method
2021-06-16 18:14:18.510 INFO 9864 --- [electorThread-0] o.a.z.server.NIOServerCnxnFactory : selector thread exitted run method
2021-06-16 18:14:18.510 INFO 9864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : shutting down
2021-06-16 18:14:18.511 INFO 9864 --- [ main] o.a.zookeeper.server.SessionTrackerImpl : Shutting down
2021-06-16 18:14:18.511 INFO 9864 --- [ main] o.a.z.server.PrepRequestProcessor : Shutting down
2021-06-16 18:14:18.511 INFO 9864 --- [ main] o.a.z.server.SyncRequestProcessor : Shutting down
2021-06-16 18:14:18.511 INFO 9864 --- [0 cport:60719):] o.a.z.server.PrepRequestProcessor : PrepRequestProcessor exited loop!
2021-06-16 18:14:18.511 INFO 9864 --- [ SyncThread:0] o.a.z.server.SyncRequestProcessor : SyncRequestProcessor exited!
2021-06-16 18:14:18.511 INFO 9864 --- [ main] o.a.z.server.FinalRequestProcessor : shutdown of request processor complete
2021-06-16 18:14:19.207 INFO 9864 --- [ SessionTracker] o.a.zookeeper.server.SessionTrackerImpl : SessionTrackerImpl exited loop!
Please help me here as i am running this on my local.Do i need to modify any other configuration files in bin for that.
That project is using an old, unsupported, version of Boot. I had problems with Zookeeper with that version on my Mac.
You are also missing spring: in the application.yml.
Here is what I did to get the test to pass.
Change the pom to use a supported Boot:
...
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.12.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
...
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<scope>test</scope>
</dependency>
...
Fix the Yaml (main)
spring:
kafka:
bootstrap-servers: localhost:9092
Fix the Yaml (test)
spring:
kafka:
bootstrap-servers: ${spring.embedded.kafka.brokers}
Fix the KafkaProducerConfiguration
#Value("${spring.kafka.bootstrap-servers}")
private String bootstrapServers;
If you used a boot-aware IDE (such as the Spring Tool Suite or IntelliJ you would have seen warnings about the bad YAML.

Why repositories in jpa with mysql is returning nothing?

I have implemented an application in spring with jpa and mysql, but #repositories is not working, the method findAll returns Arraylist of size 0.
application.properties:
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://localhost:3306/usuarios?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=
Entity:
https://pastebin.com/XqwdPhYj
Controller:
https://pastebin.com/TPgiwrx2
Repositories:
https://pastebin.com/J5u08wRU
Service:
https://pastebin.com/XAJRuBi6
Fascade:
https://pastebin.com/pTNeCZun
Demo Application:
https://pastebin.com/vTmBHTaH
console log:
:: Spring Boot :: (v2.1.5.BUILD-SNAPSHOT)
2019-04-24 23:51:55.209 INFO 400 --- [ restartedMain] DemoApplication : Starting DemoApplication on DESKTOP-B85SDDT with PID 400 (C:\Users\adminUser\Desktop\demo\target\classes started by adminUser in C:\Users\adminUser\Desktop\demo)
2019-04-24 23:51:55.213 INFO 400 --- [ restartedMain] DemoApplication : No active profile set, falling back to default profiles: default
2019-04-24 23:51:55.269 INFO 400 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-04-24 23:51:55.269 INFO 400 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2019-04-24 23:51:56.137 INFO 400 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-04-24 23:52:13.106 INFO 400 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 16963ms. Found 1 repository interfaces.
2019-04-24 23:52:13.664 INFO 400 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$dd8cb8a5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-24 23:52:13.686 INFO 400 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration$$EnhancerBySpringCGLIB$$5d0d05d7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-24 23:52:14.127 INFO 400 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-04-24 23:52:14.155 INFO 400 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-04-24 23:52:14.156 INFO 400 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.19]
2019-04-24 23:52:14.263 INFO 400 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-04-24 23:52:14.263 INFO 400 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 18994 ms
2019-04-24 23:52:14.562 INFO 400 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2019-04-24 23:52:14.679 INFO 400 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2019-04-24 23:52:14.742 INFO 400 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2019-04-24 23:52:14.816 INFO 400 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.3.9.Final}
2019-04-24 23:52:14.817 INFO 400 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-04-24 23:52:14.930 INFO 400 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-04-24 23:52:15.048 INFO 400 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-04-24 23:52:15.356 INFO 400 --- [ restartedMain] org.hibernate.tuple.PojoInstantiator : HHH000182: No default (no-argument) constructor for class: entidades.Clientes (class must be instantiated by Interceptor)
2019-04-24 23:52:15.607 INFO 400 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#77c69f90'
2019-04-24 23:52:15.609 INFO 400 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-04-24 23:52:15.703 INFO 400 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2019-04-24 23:52:16.549 INFO 400 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-04-24 23:52:16.784 WARN 400 --- [ restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2019-04-24 23:52:17.166 INFO 400 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-04-24 23:52:17.171 INFO 400 --- [ restartedMain] DemoApplication : Started DemoApplication in 22.376 seconds (JVM running for 22.691)

Why spring boot application doesn't generate tables from entity in Postgresql?

I have tryed everything what I have found here and in every relevant google match on my searches. I'm stuck with this problem for 2 days now, first I thought the problem might be with MySQL so tried Postgres but still nothing.
The database is connected with the application, when i create a new table i can see in Postgres and if I delete it there it disappears from Intellij also.
But from Entities it generates nothing and doesn't even throw any error.
application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres_demo
spring.datasource.username= postgres
spring.datasource.password=1234
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto = create
spring.jpa.generate-ddl = true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
PostgresDemoApplication clsaa:
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
#EnableJpaAuditing
#SpringBootApplication
#EntityScan(basePackages = "models")
public class PostgresDemoApplication {
public static void main(String[] args) {
SpringApplication.run(PostgresDemoApplication.class, args);
}
}
model class:
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
#Entity
#Table(name = "question")
public class Question extends AuditModel {
#Id
#GeneratedValue(generator = "question_generator")
#SequenceGenerator(
name = "question_generator",
sequenceName = "question_generator",
initialValue = 1000
)
private Long id;
#NotBlank
#Size(min = 3, max = 100)
private String title;
#Column(columnDefinition = "text")
private String description;
Spring boot
2018-09-09 14:11:35.261 INFO 2140 --- [ restartedMain] c.i.p.PostgresDemoApplication : Starting PostgresDemoApplication on DESKTOP-5Q2LCCO with PID 2140 (D:\Isshae\Java\postgres-demo\out\production\classes started by asus in D:\Isshae\Java\postgres-demo)
2018-09-09 14:11:35.262 INFO 2140 --- [ restartedMain] c.i.p.PostgresDemoApplication : No active profile set, falling back to default profiles: default
2018-09-09 14:11:35.338 INFO 2140 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#44c035dd: startup date [Sun Sep 09 14:11:35 CEST 2018]; root of context hierarchy
2018-09-09 14:11:36.467 INFO 2140 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$41d31d19] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-09-09 14:11:36.908 INFO 2140 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2018-09-09 14:11:36.925 INFO 2140 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-09-09 14:11:36.925 INFO 2140 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.32
2018-09-09 14:11:36.929 INFO 2140 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_181\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\asus\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\asus\AppData\Local\Programs\Python\Python37-32\;C:\Users\asus\AppData\Local\Microsoft\WindowsApps;;.]
2018-09-09 14:11:37.052 INFO 2140 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-09-09 14:11:37.052 INFO 2140 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1717 ms
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-09-09 14:11:37.242 INFO 2140 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2018-09-09 14:11:37.498 INFO 2140 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2018-09-09 14:11:37.534 INFO 2140 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-09-09 14:11:37.534 INFO 2140 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2018-09-09 14:11:37.675 INFO 2140 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2018-09-09 14:11:37.677 INFO 2140 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-09-09 14:11:37.707 INFO 2140 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-09-09 14:11:37.809 INFO 2140 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2018-09-09 14:11:37.829 INFO 2140 --- [ restartedMain] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000422: Disabling contextual LOB creation as connection was null
2018-09-09 14:11:37.829 INFO 2140 --- [ restartedMain] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType#4ab9bbe7
2018-09-09 14:11:38.554 INFO 2140 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#7d8c0ef6'
2018-09-09 14:11:38.554 INFO 2140 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-09-09 14:11:38.724 INFO 2140 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-09 14:11:38.974 INFO 2140 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#44c035dd: startup date [Sun Sep 09 14:11:35 CEST 2018]; root of context hierarchy
2018-09-09 14:11:38.999 WARN 2140 --- [ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2018-09-09 14:11:39.052 INFO 2140 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-09-09 14:11:39.053 INFO 2140 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-09-09 14:11:39.076 INFO 2140 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-09 14:11:39.076 INFO 2140 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-09 14:11:39.123 WARN 2140 --- [ restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2018-09-09 14:11:39.371 INFO 2140 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-09-09 14:11:39.394 INFO 2140 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-09-09 14:11:39.399 INFO 2140 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-09-09 14:11:39.403 INFO 2140 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-09-09 14:11:39.435 INFO 2140 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2018-09-09 14:11:39.436 INFO 2140 --- [ restartedMain] c.i.p.PostgresDemoApplication : Started PostgresDemoApplication in 4.503 seconds (JVM running for 5.399)

Spring Boot with MySQL is shutting down immedietly

My first Spring Boot application with MySQL and JPA is shutting down immediately and I do not have any clue on the reasons.
2018-08-15 16:24:42.050 INFO 10960 --- [ restartedMain] com.classpath.SampleAppApplication : Starting SampleAppApplication on LAPTOP-MAI0FJBD with PID 10960 (C:\Users\classpath\projects\sample-app\target\classes started by classpath in C:\Users\classpath\projects\sample-app)
2018-08-15 16:24:42.065 INFO 10960 --- [ restartedMain] com.classpath.SampleAppApplication : No active profile set, falling back to default profiles: default
2018-08-15 16:24:42.160 INFO 10960 --- [ restartedMain] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#699320b1: startup date [Wed Aug 15 16:24:42 IST 2018]; root of context hierarchy
2018-08-15 16:24:43.978 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2018-08-15 16:24:44.245 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2018-08-15 16:24:44.291 INFO 10960 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-08-15 16:24:44.307 INFO 10960 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2018-08-15 16:24:44.369 INFO 10960 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2018-08-15 16:24:44.369 INFO 10960 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-08-15 16:24:44.416 INFO 10960 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-08-15 16:24:44.526 INFO 10960 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-08-15 16:24:45.246 INFO 10960 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#49cf4e94'
2018-08-15 16:24:45.262 INFO 10960 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-08-15 16:24:46.058 INFO 10960 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-08-15 16:24:46.089 INFO 10960 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-08-15 16:24:46.089 INFO 10960 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-08-15 16:24:46.089 INFO 10960 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-08-15 16:24:46.105 INFO 10960 --- [ restartedMain] com.classpath.SampleAppApplication : Started SampleAppApplication in 4.437 seconds (JVM running for 4.942)
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#699320b1: startup date [Wed Aug 15 16:24:42 IST 2018]; root of context hierarchy
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
Process finished with exit code 0
Below is the dependencies added in the pom.xml file.
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.classpath
sample-app
0.0.1-SNAPSHOT
jar
<name>sample-app</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I am also adding the SpringBoot annotated class below
package com.classpath;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class SampleAppApplication {
public static void main(String[] args) {
SpringApplication.run(SampleAppApplication.class, args);
}
}
Please let me know where I am going wrong and how to debug this issue. Seems like Spring is doing too much magic here.
What about your database dependency? Configure an embedded database (H2, HSQL or Derby) or another relational database like oracle or mysql dependency inside pom.xml.
Example:
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>