By continuing you indicate that you have read and agree to our Terms of service and Privacy policy
 by  h2database Java Version: version-2.1.212 License: Non-SPDX
 by  h2database Java Version: version-2.1.212 License: Non-SPDX
Download this library from
Support
Quality
Security
License
Reuse
kandi has reviewed h2database and discovered the below as its top functions. This is intended to give you an instant insight into h2database implemented functionality, and help decide if they suit your requirements.
Very fast, open source, JDBC API
Embedded and server modes; disk-based or in-memory databases
Transaction support, multi-version concurrency
Browser based Console application
Encrypted databases
Fulltext search
Pure Java with small footprint: around 2.5 MB jar file size
ODBC driver
Downloads
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.210</version>
</dependency>
Upgrading from springboot version 2.3.8.RELEASE to 2.4.0 and getting these errors for junit tests
implementation "org.springframework.boot:spring-boot-starter-actuator"
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
-----------------------
implementation "org.springframework.boot:spring-boot-starter-actuator"
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
Problem setting up H2 init runscript. File is not found when script is not in classpath root folder while using java modular system
module myAppModule {
exports desktop.core.database;
opens desktop.core.database;
requires java.sql;
requires org.junit.jupiter.api;
}
Spring Boot Logging to a File
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.formatter = org.springframework.boot.logging.java.SimpleFormatter
-----------------------
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.formatter = org.springframework.boot.logging.java.SimpleFormatter
nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
mvn deploy
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
</dependency>
</dependencies>
</plugin>
-----------------------
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
mvn deploy
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
</dependency>
</dependencies>
</plugin>
SpringBoot + Lombok + MapStruct not sorking together
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</path>
<!-- additional annotation processor required as of Lombok 1.18.16 -->
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.1.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
New H2 version breaks liquibase
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.6.5.Final</version>
</dependency>
Execution optimizations have been disabled for task ':compileGsonViews'
tasks.named('bootWarMainClassName') {
it.mustRunAfter(tasks.named('compileGsonViews'))
}
Failed to load ApplicationContext for a java based config test
@Configuration
public class ExternalConfig {
private static final String SECRET_ID_EVEN_TOKEN = "evenToken";
@Bean
public EvenClient webClient( AWSSecretsManagerService awsSecretsManagerService,
@Value("${even.url}") String url) {
String token = awsSecretsManagerService.getSecretValue().get(SECRET_ID_EVEN_TOKEN);
WebClient webClient = WebClient.builder()
.exchangeStrategies(ExchangeStrategies.builder()
.codecs(configurer -> configurer
.defaultCodecs()
.maxInMemorySize(100 * 1024 * 1024) // default is 256 KB (262144 B), changed it to 100MB
).build())
.baseUrl(url)
.defaultHeaders(h -> h.setBearerAuth(token))
.build();
return new EvenClient(webClient);
}
}
-----------------------
@org.springframework.boot.test.mock.mockito.MockBean
private ExternalConfig externalConfig;
How to change database from h2 to MySql in JBPM
To switch to MySQL use the following command when the server is stopped
<JBOSS_HOME>/bin/jboss-cli.sh --file=jbpm-mysql-config.cli (Unix / Linux)
<JBOSS_HOME>\bin\jboss-cli.bat --file=jbpm-mysql-config.cli (Windows)
dependency-check-maven - suppression not working
<suppress>
<notes>
<![CDATA[
file name: h2-1.4.200.jar
]]>
</notes>
<packageUrl regex="true">^pkg:maven/com\.h2database/h2@.*$</packageUrl>
<vulnerabilityName>CVE-2021-23463</vulnerabilityName>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: h2-1.4.200.jar
]]>
</notes>
<filePath regex="true">.*\/h2database.*\.jar</filePath>
<vulnerabilityName>CVE-2021-23463</vulnerabilityName>
</suppress>
-----------------------
<suppress>
<notes>
<![CDATA[
file name: h2-1.4.200.jar
]]>
</notes>
<packageUrl regex="true">^pkg:maven/com\.h2database/h2@.*$</packageUrl>
<vulnerabilityName>CVE-2021-23463</vulnerabilityName>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: h2-1.4.200.jar
]]>
</notes>
<filePath regex="true">.*\/h2database.*\.jar</filePath>
<vulnerabilityName>CVE-2021-23463</vulnerabilityName>
</suppress>
QUESTION
SpringBoot H2 Database loosing data in the every execute
Asked 2022-Mar-31 at 07:55I connected to h2 database and i'm posting the entity while using postman. But I loose the data everytime when I rerun the my code.
spring.h2.console.enabled=true
spring.datasource.url = jdbc:h2:mem:crm/db_;DB_CLOSE_DELAY=-1
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=update
Is there anyway to storage data in H2Database?
ANSWER
Answered 2022-Mar-31 at 07:55Your datasource url specifies it as an in-memory database (h2:mem). You can specify it to store data in a file (in embedded mode) - see http://www.h2database.com/html/cheatSheet.html.
QUESTION
SpringBoot H2 setup issue
Asked 2022-Mar-27 at 05:08Configuration Details
I have created a spring boot application with plugins as
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>guru.springframework</groupId>
<artifactId>spring5webapp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>spring5webapp</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.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-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
application.properties
spring.h2.console.enabled=true
spring.datasource.url=jdbc:h2:mem:AS;
spring.datasource.driverClassName=org.h2.Driver
spring.h2.console.settings.trace=true
commandLineRunner
@Component
public class BootStrapData implements CommandLineRunner {
private final AuthorRepository authorRepository;
private final BookRepository bookRepository;
private final PublisherRepository publisherRepository;
public BootStrapData(AuthorRepository authorRepository, BookRepository bookRepository,
PublisherRepository publisherRepository) {
this.authorRepository = authorRepository;
this.bookRepository = bookRepository;
this.publisherRepository = publisherRepository;
}
@Override
public void run(String... args) throws Exception {
Author eric = new Author("Eric", "Evans");
authorRepository.save(eric);
System.out.println("Started in bootstrap");
System.out.println("Number of Authors " + authorRepository.count());
}
}
authorRepository.java
public interface AuthorRepository extends CrudRepository<Author, Long> {
}
Author.java (Pojo)
package guru.springframework.spring5webapp.domain;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
@Entity
public class Author {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String firstName;
private String lastName;
@ManyToMany(mappedBy = "authors")
private Set<Book> books = new HashSet<>();
public Author() {
}
public Author(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Set<Book> getBooks() {
return books;
}
public void setBooks(Set<Book> books) {
this.books = books;
}
@Override
public String toString() {
return "Author{" +
"id=" + id +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", books=" + books +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Author author = (Author) o;
return id != null ? id.equals(author.id) : author.id == null;
}
@Override
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
}
When I am starting the application and go to http://localhost:8080/h2-console, I see a JDBC Url of jdbc:h2:~/test instead of jdbc:h2:mem:AS. Logging in the console I do not see the Author table.
I have seen the content of following posts in stackoverflow but of no use
My github project is at here it has further more interaction of Pojos What is the mistake in the project?
ANSWER
Answered 2022-Mar-27 at 05:08As mentioned by user g00glen00b in comments, one has to explicitly enter the URL in the H2 console.
QUESTION
Building Docker image from spring maven project for arm64 platform
Asked 2022-Mar-24 at 00:10I'm in a Spring course, and I have a maven application (downloaded from the course resources) built from spring initializr. I can build a local Docker image with mvn spring-boot:build-image
(no Dockerfile in the project). By default a Docker image is built as linux/amd64, but I am working with a M1 Apple Silicon chip (arm64). I've been looking many workarounds but with no success. Lastly, I found that maybe adding a Dockerfile and specifying the platform it would build the image accordingly.
My goal is to build a docker image for arm64 architecture.
So, I created a Dockerfile:
FROM --platform=linux/arm64 maven:3.8.4-jdk-11 AS build
COPY src /home/path_to_app/src
COPY pom.xml /home/path_to_app
RUN mvn -f /home/path_to_app/pom.xml spring-boot:build-image -DskipTests
My project structure is:
In terminal, at same pom.xml directory I run: docker buildx build --platform linux/arm64 --tag <mytag> .
Logs successful until =>Building image 'docker.io/myusername/myimage:mytag', then an exception occurs and build fails.
#8 125.7 [INFO]
#8 125.7 [INFO] <<< spring-boot-maven-plugin:2.5.0:build-image (default-cli) < package @ currency-exchange-service <<<
#8 125.7 [INFO]
#8 125.7 [INFO]
#8 125.7 [INFO] --- spring-boot-maven-plugin:2.5.0:build-image (default-cli) @ currency-exchange-service ---
#8 125.8 [INFO] Building image 'docker.io/myname/myimage:0.0.1-SNAPSHOT'
#8 125.8 [INFO]
#8 125.8 [INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [2] No such file or directory
#8 125.8 [INFO] Retrying request to {}->docker://localhost:2376
#8 125.8 [INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [2] No such file or directory
#8 125.8 [INFO] Retrying request to {}->docker://localhost:2376
#8 125.8 [INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [2] No such file or directory
#8 125.8 [INFO] Retrying request to {}->docker://localhost:2376
#8 125.9 [INFO] ------------------------------------------------------------------------
#8 125.9 [INFO] BUILD FAILURE
#8 125.9 [INFO] ------------------------------------------------------------------------
#8 125.9 [INFO] Total time: 02:04 min
#8 125.9 [INFO] Finished at: 2022-03-22T21:08:20Z
#8 125.9 [INFO] ------------------------------------------------------------------------
#8 125.9 [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.0:build-image
(default-cli) on project currency-exchange-service: Execution default-cli
of goal org.springframework.boot:spring-boot-maven-plugin:2.5.0:build-image
failed: Connection to the Docker daemon at 'localhost' failed with error "[2]
No such file or directory"; ensure the Docker daemon is running and accessible:
com.sun.jna.LastErrorException: [2] No such file or directory -> [Help 1]
My pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.somename.microservices</groupId>
<artifactId>mymicroservice-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>mymicroservice-service-docker</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
<spring-cloud.version>2020.0.2</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<name>myusername/myprefix${project.artifactId}:${project.version}</name>
</image>
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
</project>
My docker daemon is running. Can't figure out why it tries to reach localhost:2376 (There is no such port in my project). My DOCKER_HOST is set to unix:///var/run/docker.sock and works fine. Tried to add to daemon.json:
{
"hosts": ["tcp://127.0.0.1:2376", "unix:///var/run/docker.sock"]
}
but docker daemon can't initialize (binding error, port already in use)
I don't know where does com.sun.jna.LastErrorException
come from.
I suspect that maybe Docker in docker (dind) is needed, but I don't know how to set it up in my Dockerfile. Or maybe a port binding configuration.
Thank in advance for any help!!!
Note: I just want to build the image locally. I don't wish pushing to docker registry. I don't want any other stages in the build process.
ANSWER
Answered 2022-Mar-24 at 00:10Building an ARM-based image is not currently possible with mvn spring-boot:build-image
, because the Cloud Native Buildpacks builders that Spring Boot integrates with do not support this. This is one of the possible items of focus on the Paketo buildpacks 2022 roadmap, which you can cast votes for.
CNB documents a work-around for this, but it's not simple to set up and run.
RUN mvn -f /home/path_to_app/pom.xml spring-boot:build-image -DskipTests
You would need Docker-in-Docker to make something like this work, since the CNB builder processes that would run inside the Docker container need to talk to the Docker daemon. Regardless, this would not allow you to build an ARM image for the reasons stated above.
QUESTION
Upgrading from springboot version 2.3.8.RELEASE to 2.4.0 and getting these errors for junit tests
Asked 2022-Mar-09 at 14:28I am new to springboot and trying to upgrade from 2.3.8.RELEASE to 2.4.0 and my test cases are failing. I am getting these error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration$HikariDataSourceMetricsConfiguration': Injection of autowired dependencies failed; nested exception is java.lang.NoClassDefFoundError: org/LatencyUtils/PauseDetector
Caused by: java.lang.NoClassDefFoundError: org/LatencyUtils/PauseDetector
Caused by: java.lang.ClassNotFoundException: org.LatencyUtils.PauseDetector
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)
I tried googling them but solutions there didn't help me. Can you please let me know what could be it's root cause and how to resolve them?
Edit: my build.gradle is here:
dependencies {
// spring
compileOnly "org.springframework.boot:spring-boot-starter-web"
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
compileOnly "org.springframework.boot:spring-boot-starter-data-jpa"
compileOnly "org.springframework.boot:spring-boot-starter-thymeleaf"
compileOnly "org.springframework.security.oauth" +
".boot:spring-security-oauth2-autoconfigure:$springSecurityOauth2Autoconfigure"
compileOnly "org.springframework.security.oauth:spring-security-oauth:$springSecurityOauth"
compileOnly "org.springframework.retry:spring-retry"
compileOnly "org.hibernate:hibernate-core:5.4.24.Final"
compileOnly "org.modelmapper:modelmapper:$modelmapperVersion"
compileOnly "org.cache2k:cache2k-core:$cache2kVersion"
compileOnly "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion"
compileOnly "com.fasterxml.jackson.core:jackson-core:$jacksonDatabindVersion"
compileOnly "com.fasterxml.jackson.core:jackson-annotations:$jacksonDatabindVersion"
compileOnly "org.flywaydb:flyway-core:5.2.4"
compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.6.4'
compileOnly "org.springframework.boot:spring-boot-starter-freemarker"
testImplementation "org.junit.jupiter:junit-jupiter:5.5.1"
testImplementation "org.springframework.security:spring-security-test"
testImplementation "org.springframework.restdocs:spring-restdocs-mockmvc"
testImplementation("org.springframework.cloud:spring-cloud-stream-test-support") {
exclude group: "junit", module: "junit"
}
testImplementation "com.h2database:h2"
testImplementation "org.mockito:mockito-junit-jupiter"
testAnnotationProcessor "org.projectlombok:lombok"
}
ANSWER
Answered 2022-Mar-09 at 14:28I also face the same issue while migrating from springboot 2.3.8.RELEASE to 2.4.13 and I fixed it using
implementation "org.springframework.boot:spring-boot-starter-actuator"
instead of
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
Explaination: If you don't need module in run-time use "compileOnly" to reduce memory usage but the module is required at runtime then we use "implementation".
QUESTION
How to reference a project definition in a parent build.sbt file?
Asked 2022-Feb-27 at 18:25I'm playing around with the scala-forklift
library and wanted to test an idea by modifying the code in the library and example project.
This is how the project is structured:
/build.sbt
-> Contains definition of scala-forklift-slick
project (including its dependencies) in the form of:lazy val slickMigrationProject =
Project("scala-forklift-slick", file(...))
.dependsOn(...)
.settings(...)
...
/example/build.sbt
-> References scala-forklift-slick
via its Maven package.My goal is to replace the scala-forklift-slick
Maven package reference with a reference to the code in the parent directory, perhaps via .dependsOn(slickMigrationProject)
?
According to the documentation:
Any .sbt files in foo, say foo/build.sbt, will be merged with the build definition for the entire build, but scoped to the hello-foo project.
But this does not seem to apply to lazy val
values, as I can't access slickMigrationProject
from the parent project directly.
I have been successful copying the entire contents of /example/build.sbt
into /build.sbt
and tweaking things a bit, but I was wondering if there was a better "one-liner" kind of solution instead.
Here is what my combined /build.sbt
file looks like:
val repoKind = SettingKey[String]("repo-kind",
"Maven repository kind (\"snapshots\" or \"releases\")")
lazy val slickVersion = "3.3.3"
lazy val scala212 = "2.12.11"
lazy val scala213 = "2.13.1"
lazy val supportedScalaVersions = List(scala212, scala213)
lazy val coreDependencies = libraryDependencies ++= List(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"com.typesafe" % "config" % "1.3.2",
"org.eclipse.jgit" % "org.eclipse.jgit" % "4.0.1.201506240215-r"
)
lazy val slickDependencies = List(
"com.typesafe.slick" %% "slick" % slickVersion,
"com.typesafe.slick" %% "slick-codegen" % slickVersion,
"io.github.nafg" %% "slick-migration-api" % "0.7.0",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.0.0"
)
lazy val slickDependenciesWithTests = slickDependencies ++ List(
"org.scalatest" %% "scalatest" % "3.1.0",
"com.lihaoyi" %% "ammonite-ops" % "2.0.4",
"commons-io" % "commons-io" % "2.6",
"com.typesafe.slick" %% "slick-hikaricp" % slickVersion,
"com.h2database" % "h2" % "1.4.200",
"org.xerial" % "sqlite-jdbc" % "3.8.11.2",// 3.30.1 crashes SQLiteCommandTests
"mysql" % "mysql-connector-java" % "5.1.38",
"org.postgresql" % "postgresql" % "42.2.9",
"org.hsqldb" % "hsqldb" % "2.5.0",
"org.apache.derby" % "derby" % "10.14.2.0",
"ch.qos.logback" % "logback-classic" % "1.2.3"
).map(_ % "test")
lazy val commonSettings = Seq(
organization := "com.liyaos",
licenses := Seq("Apache 2.0" ->
url("https://github.com/lastland/scala-forklift/blob/master/LICENSE")),
homepage := Some(url("https://github.com/lastland/scala-forklift")),
scalaVersion := scala213,
scalacOptions += "-deprecation",
scalacOptions += "-feature",
resolvers += Resolver.jcenterRepo,
publishMavenStyle := true,
publishArtifact in Test := false,
repoKind := { if (version.value.trim.endsWith("SNAPSHOT")) "snapshots"
else "releases" },
publishTo := { repoKind.value match {
case "snapshots" => Some("snapshots" at
"https://oss.sonatype.org/content/repositories/snapshots")
case "releases" => Some("releases" at
"https://oss.sonatype.org/service/local/staging/deploy/maven2")
}},
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
pomExtra := (
<scm>
<url>git@github.com:lastland/scala-forklift.git</url>
<connection>scm:git:git@github.com:lastland/scala-forklift.git</connection>
</scm>
<developers>
<developer>
<id>lastland</id>
<name>Yao Li</name>
</developer>
</developers>))
// Derby is running is secured mode since version 10.12.1.1, so security manager must be disabled for tests
// https://stackoverflow.com/questions/48008343/sbt-test-does-not-work-for-spark-test
// https://issues.apache.org/jira/browse/DERBY-6648
Test / testOptions += Tests.Setup(() => System.setSecurityManager(null))
lazy val root = Project(
"scala-forklift", file(".")).settings(
crossScalaVersions := Nil,
publishArtifact := false).aggregate(
coreProject, slickMigrationProject, plainMigrationProject, gitToolProject, example)
lazy val coreProject = Project(
"scala-forklift-core", file("core")).settings(
commonSettings:_*).settings {Seq(
crossScalaVersions := supportedScalaVersions,
coreDependencies
)}
lazy val slickMigrationProject = Project(
"scala-forklift-slick", file("migrations/slick")).dependsOn(
coreProject).settings(commonSettings:_*).settings { Seq(
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= slickDependenciesWithTests
)}
lazy val plainMigrationProject = Project(
"scala-forklift-plain", file("migrations/plain")).dependsOn(
coreProject).settings(commonSettings:_*).settings(crossScalaVersions := supportedScalaVersions)
lazy val gitToolProject = Project(
"scala-forklift-git-tools", file("tools/git")).dependsOn(
coreProject).settings(commonSettings:_*).settings(crossScalaVersions := supportedScalaVersions)
///////////////////////////////////////////////
name := "forklift-slick-example"
addCommandAlias("mgm", "example/migration_manager/run")
addCommandAlias("mg", "example/migrations/run")
lazy val exampleCommonSettings = Seq(
organization := "com.liyaos",
version := "2.0",
scalaVersion := "2.13.1",
scalacOptions += "-deprecation",
scalacOptions += "-feature",
resolvers += Resolver.sonatypeRepo("snapshots"),
resolvers += Resolver.jcenterRepo,
)
lazy val loggingDependencies = List(
"org.slf4j" % "slf4j-nop" % "1.6.4" // <- disables logging
)
lazy val exampleSlickDependencies = List(
"com.typesafe.slick" %% "slick" % slickVersion
)
lazy val dbDependencies = List(
"com.typesafe.slick" %% "slick-hikaricp" % slickVersion
,"com.h2database" % "h2" % "1.4.200"
)
lazy val forkliftDependencies = List(
// "com.liyaos" %% "scala-forklift-slick" % forkliftVersion
)
lazy val appDependencies = dbDependencies ++ loggingDependencies
lazy val migrationsDependencies =
dbDependencies ++ forkliftDependencies ++ loggingDependencies
lazy val migrationManagerDependencies = dbDependencies ++ forkliftDependencies
lazy val example = Project("example", file("example")).aggregate(
app, migrations, migrationManager, generatedCode, tools).settings(
exampleCommonSettings:_*)
lazy val app = Project("app", file("example/app"))
.dependsOn(generatedCode)
.settings(exampleCommonSettings:_*)
.settings {libraryDependencies ++= appDependencies}
lazy val migrationManager = Project("migration_manager", file("example/migration_manager"))
.dependsOn(slickMigrationProject)
.settings(exampleCommonSettings:_*)
.settings {libraryDependencies ++= migrationManagerDependencies}
lazy val migrations = Project("migrations", file("example/migrations"))
.dependsOn(generatedCode, migrationManager, slickMigrationProject)
.settings(exampleCommonSettings:_*)
.settings {libraryDependencies ++= migrationsDependencies}
lazy val tools = Project("git-tools", file("example/tools/git"))
.dependsOn(slickMigrationProject, gitToolProject)
.settings(commonSettings:_*)
.settings {
libraryDependencies ++= forkliftDependencies ++ List(
// "com.liyaos" %% "scala-forklift-git-tools" % forkliftVersion,
"com.typesafe" % "config" % "1.3.0",
"org.eclipse.jgit" % "org.eclipse.jgit" % "4.0.1.201506240215-r"
)
}
lazy val generatedCode = Project("generate_code", file("example/generated_code"))
.settings(exampleCommonSettings:_*)
.settings {libraryDependencies ++= exampleSlickDependencies}
Is there a simple way I can replace the scala-forklift-slick
Maven package reference in /example/build.sbt
with a link to the existing scala-forklift-slick
project definition in the parent directory's build.sbt
so I can use .dependsOn(...)
instead?
Or maybe it's better to do something like build scala-forklift-slick
and use a local disk package resolver?
ANSWER
Answered 2022-Feb-27 at 18:25Luis Miguel MejÃa Suárez's comment worked perfectly and was the easier approach.
In the context of this project, all I had to do was:
-SNAPSHOT
to the version in /version.sbt
(should not be needed normally but for this project I had to do this)sbt publishLocal
in the parent project.After this, the example project (which already targets the -SNAPSHOT
version) is able to pick up the locally built package.
QUESTION
Problem setting up H2 init runscript. File is not found when script is not in classpath root folder while using java modular system
Asked 2022-Feb-16 at 16:28Following accepted answer for question regarding how to init runscript from resources folder: problem with INIT=RUNSCRIPT and relative paths.
Connection String:
jdbc:h2:mem:;INIT=RUNSCRIPT FROM 'classpath:desktop/core/database/databaseCreation.sql'
org.h2.jdbc.JdbcSQLNonTransientException: IO Exception: "java.io.FileNotFoundException: resource /desktop/core/database/databaseCreation.sql"; "classpath:desktop/core/database/databaseCreation.sql"; SQL statement:
RUNSCRIPT FROM 'classpath:desktop/core/database/databaseCreation.sql' [90031-210]
at com.h2database@2.1.210/org.h2.message.DbException.getJdbcSQLException(DbException.java:573)
at com.h2database@2.1.210/org.h2.message.DbException.getJdbcSQLException(DbException.java:496)
at com.h2database@2.1.210/org.h2.message.DbException.get(DbException.java:216)
at com.h2database@2.1.210/org.h2.message.DbException.convertIOException(DbException.java:461)
at com.h2database@2.1.210/org.h2.command.dml.ScriptBase.openInput(ScriptBase.java:168)
at com.h2database@2.1.210/org.h2.command.dml.RunScriptCommand.update(RunScriptCommand.java:52)
at com.h2database@2.1.210/org.h2.command.CommandContainer.update(CommandContainer.java:174)
at com.h2database@2.1.210/org.h2.command.Command.executeUpdate(Command.java:252)
at com.h2database@2.1.210/org.h2.engine.Engine.openSession(Engine.java:279)
at com.h2database@2.1.210/org.h2.engine.Engine.createSession(Engine.java:201)
at com.h2database@2.1.210/org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338)
at com.h2database@2.1.210/org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122)
at com.h2database@2.1.210/org.h2.Driver.connect(Driver.java:59)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:252)
at ispfdesktop/desktop.core.database.DatabaseManager.connectToInMemoryDatabase(DatabaseManager.java:184)
at ispfdesktop/desktop.core.database.CRUDTests.setUpBeforeClass(CRUDTests.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$9(ClassBasedTestDescriptor.java:384)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:382)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:196)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:84)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.io.FileNotFoundException: resource /desktop/core/database/databaseCreation.sql
at com.h2database@2.1.210/org.h2.store.fs.disk.FilePathDisk.newInputStream(FilePathDisk.java:386)
at com.h2database@2.1.210/org.h2.store.fs.FileUtils.newInputStream(FileUtils.java:267)
at com.h2database@2.1.210/org.h2.command.dml.ScriptBase.openInput(ScriptBase.java:166)
... 69 more
Trying to access file using getResource (DatabaseManager class is in desktop.core.database package) tells that file exists:
String file = DatabaseManager.class.getResource("databaseCreation.sql").getFile();
boolean yes = new File(file).exists(); // yes is true
Tried on both Windows(10) and Linux (Kubuntu) platform and using h2 of version 2.1.210.
UPDATE #1
File is found when it is in root classpath folder classpath:databaseCreation.sql
, but still not when under some subfolder like desktop/core/database.
Appending '/' before first subfolder does not work.
Tried to put sql file to all folders.
'classpath:desktop/core/database/databaseCreation.sql'
does not work
'classpath:desktop/core/databaseCreation.sql'
does not work
'classpath:desktop/databaseCreation.sql'
does not work
only this works
'classpath:databaseCreation.sql'
Without using classpath:
Without using classpath, the file can be in any subfolders, but this way, i need to use absolute path to the file:
jdbc:h2:mem:;INIT=RUNSCRIPT FROM '<absolute path here>'
Leaving the question open since the referenced question has outdated answer, which is not working on current H2 version and want to know how to get it work using classpath
.
UPDATE #2
In order to replicate, you need to use java modular system (module-info.java) in the project.
ANSWER
Answered 2022-Feb-16 at 16:28UPDATE: (module-info.java)
Per your comment, your original setup used JDK 9+ modules. That's a complex and confusing topic. It would be easiest to simply remove module-info.java and not use modules. If you intend to use modules and keep resources in a separate directory (module), there are multiple options with no one clear choice. Perhaps the easiest option would be to open the "package" containing the resource. Something like this worked in my local test:
module myAppModule {
exports desktop.core.database;
opens desktop.core.database;
requires java.sql;
requires org.junit.jupiter.api;
}
More info:
ORIGINAL
I could not replicate your problem using a very simple maven setup with only the H2 runtime as a dependency (same version, 2.1.210) along with JUnit 5. It worked as expected.
The stack trace shows this is being run as a test from within Eclipse. I could replicate your issue exactly in Eclipse if I manually added src/main/resources
as a Java Build Path source folder, but with an exclusion of **/
which would exclude subdirectories of resources.
If you are using maven, perhaps try running on command line with mvn test
to verify that it is not your Eclipse setup.
Otherwise, you will need to post more info to get help.
QUESTION
Spring Boot Logging to a File
Asked 2022-Feb-16 at 14:49In my application config i have defined the following properties:
logging.file.name = application.logs
When i run my application it's creating two files application.logs.0
and application.logs.0.lck
and the content of file as follow
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2022-02-16T12:55:05.656986Z</date>
<millis>1645016105656</millis>
<nanos>986000</nanos>
<sequence>0</sequence>
<logger>org.apache.catalina.core.StandardService</logger>
<level>INFO</level>
<class>org.apache.catalina.core.StandardService</class>
<method>startInternal</method>
<thread>1</thread>
<message>Starting service [Tomcat]</message>
</record>
<record>
<date>2022-02-16T12:55:05.671696Z</date>
<millis>1645016105671</millis>
<nanos>696000</nanos>
<sequence>1</sequence>
<logger>org.apache.catalina.core.StandardEngine</logger>
<level>INFO</level>
<class>org.apache.catalina.core.StandardEngine</class>
<method>startInternal</method>
<thread>1</thread>
<message>Starting Servlet engine: [Apache Tomcat/9.0.48]</message>
</record>
It's not properly printing logs and don't want to output in the xml format
My Dependency Tree:
[INFO] com.walmart.uss:trigger:jar:0.0.1-SNAPSHOT
[INFO] +- com.google.cloud:google-cloud-logging:jar:3.0.0:compile
[INFO] | +- com.google.guava:guava:jar:31.0.1-jre:compile
[INFO] | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | +- org.checkerframework:checker-qual:jar:3.8.0:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.8.1:compile
[INFO] | +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] | +- io.grpc:grpc-api:jar:1.41.0:compile
[INFO] | +- io.grpc:grpc-context:jar:1.41.0:compile
[INFO] | +- io.grpc:grpc-stub:jar:1.41.0:compile
[INFO] | +- io.grpc:grpc-protobuf:jar:1.41.0:compile
[INFO] | +- io.grpc:grpc-protobuf-lite:jar:1.41.0:compile
[INFO] | +- com.google.api:api-common:jar:2.0.5:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- com.google.auto.value:auto-value-annotations:jar:1.8.2:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:3.18.1:compile
[INFO] | +- com.google.protobuf:protobuf-java-util:jar:3.18.1:compile
[INFO] | +- com.google.code.gson:gson:jar:2.8.7:compile
[INFO] | +- com.google.api.grpc:proto-google-common-protos:jar:2.6.0:compile
[INFO] | +- com.google.api.grpc:proto-google-cloud-logging-v2:jar:0.92.0:compile
[INFO] | +- com.google.api:gax:jar:2.6.1:compile
[INFO] | +- io.opencensus:opencensus-api:jar:0.28.0:compile
[INFO] | +- com.google.api:gax-grpc:jar:2.6.1:compile
[INFO] | +- io.grpc:grpc-auth:jar:1.41.0:compile
[INFO] | +- com.google.auth:google-auth-library-credentials:jar:1.2.1:compile
[INFO] | +- io.grpc:grpc-netty-shaded:jar:1.41.0:compile
[INFO] | +- io.grpc:grpc-alts:jar:1.41.0:compile
[INFO] | +- io.grpc:grpc-grpclb:jar:1.41.0:compile
[INFO] | +- org.conscrypt:conscrypt-openjdk-uber:jar:2.5.1:compile
[INFO] | +- org.threeten:threetenbp:jar:1.5.1:compile
[INFO] | +- com.google.cloud:google-cloud-core-grpc:jar:2.2.0:compile
[INFO] | +- com.google.auth:google-auth-library-oauth2-http:jar:1.2.1:compile
[INFO] | +- com.google.http-client:google-http-client-gson:jar:1.40.1:compile
[INFO] | +- com.google.http-client:google-http-client:jar:1.40.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | +- commons-codec:commons-codec:jar:1.15:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
[INFO] | +- io.opencensus:opencensus-contrib-http-util:jar:0.28.0:compile
[INFO] | +- io.grpc:grpc-core:jar:1.41.0:compile
[INFO] | +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] | +- org.codehaus.mojo:animal-sniffer-annotations:jar:1.20:runtime
[INFO] | +- io.perfmark:perfmark-api:jar:0.23.0:runtime
[INFO] | +- com.google.cloud:google-cloud-core:jar:2.2.0:compile
[INFO] | \- com.google.api.grpc:proto-google-iam-v1:jar:1.1.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.5.2:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.5.2:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.5.2:compile
[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | +- org.springframework:spring-core:jar:5.3.8:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.3.8:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.28:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.5.2:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.5.2:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.5.2:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.5.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.4.7:compile
[INFO] | | \- net.minidev:accessors-smart:jar:2.4.7:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] | +- org.assertj:assertj-core:jar:3.19.0:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.7.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.7.2:test
[INFO] | | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.7.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.7.2:test
[INFO] | +- org.mockito:mockito-core:jar:3.9.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.22:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.22:test
[INFO] | | \- org.objenesis:objenesis:jar:3.2:compile
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.9.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-test:jar:5.3.8:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.8.2:test
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.5.2:compile
[INFO] | +- org.thymeleaf:thymeleaf-spring5:jar:3.0.12.RELEASE:compile
[INFO] | | \- org.thymeleaf:thymeleaf:jar:3.0.12.RELEASE:compile
[INFO] | | +- org.attoparser:attoparser:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile
[INFO] | \- org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:5.3.8:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.8:compile
[INFO] | +- org.springframework:spring-beans:jar:5.3.8:compile
[INFO] | +- org.springframework:spring-context:jar:5.3.8:compile
[INFO] | +- org.springframework:spring-expression:jar:5.3.8:compile
[INFO] | \- org.springframework:spring-web:jar:5.3.8:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.5.2:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.5.1:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.5.1:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:5.5.1:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.5.1:compile
[INFO] +- org.springframework.data:spring-data-jpa:jar:2.5.2:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.5.2:compile
[INFO] | +- org.springframework:spring-orm:jar:5.3.8:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.3.8:compile
[INFO] | +- org.springframework:spring-tx:jar:5.3.8:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.9.6:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.31:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.5.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.5.2:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.5.2:compile
[INFO] | | \- com.zaxxer:HikariCP:jar:4.0.3:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.4.32.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.4.2.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.27.0-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.2.3.Final:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final:compile
[INFO] | | \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.4:compile
[INFO] | | +- org.glassfish.jaxb:txw2:jar:2.3.4:compile
[INFO] | | +- com.sun.istack:istack-commons-runtime:jar:3.0.12:compile
[INFO] | | \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] | \- org.springframework:spring-aspects:jar:5.3.8:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.12:provided
[INFO] +- com.h2database:h2:jar:1.4.190:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.5.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.5.2:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.12.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.3:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.12.3:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-tomcat:jar:2.5.2:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.48:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.48:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.48:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] +- org.springframework.integration:spring-integration-core:jar:5.5.3:compile
[INFO] | +- org.springframework:spring-messaging:jar:5.3.8:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:1.3.1:compile
[INFO] | \- io.projectreactor:reactor-core:jar:3.4.7:compile
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] +- org.apache.commons:commons-text:jar:1.9:compile
[INFO] | \- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.3:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.12.3:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.12.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.5.2:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.5.2:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:2.5.2:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.7.1:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1:compile
[INFO] | +- org.apache.maven:maven-plugin-api:jar:3.0:compile
[INFO] | | +- org.apache.maven:maven-model:jar:3.0:compile
[INFO] | | \- org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
[INFO] | | \- org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
[INFO] | | \- org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
[INFO] | +- org.apache.maven:maven-artifact:jar:3.0:compile
[INFO] | | \- org.codehaus.plexus:plexus-utils:jar:2.0.4:compile
[INFO] | +- org.apache.maven:maven-core:jar:3.0:compile
[INFO] | | +- org.apache.maven:maven-settings:jar:3.0:compile
[INFO] | | +- org.apache.maven:maven-settings-builder:jar:3.0:compile
[INFO] | | +- org.apache.maven:maven-repository-metadata:jar:3.0:compile
[INFO] | | +- org.apache.maven:maven-model-builder:jar:3.0:compile
[INFO] | | +- org.apache.maven:maven-aether-provider:jar:3.0:runtime
[INFO] | | +- org.sonatype.aether:aether-impl:jar:1.7:compile
[INFO] | | | \- org.sonatype.aether:aether-spi:jar:1.7:compile
[INFO] | | +- org.sonatype.aether:aether-api:jar:1.7:compile
[INFO] | | +- org.sonatype.aether:aether-util:jar:1.7:compile
[INFO] | | +- org.codehaus.plexus:plexus-interpolation:jar:1.14:compile
[INFO] | | +- org.codehaus.plexus:plexus-classworlds:jar:2.2.3:compile
[INFO] | | +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] | | \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[INFO] | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] | +- org.apache.maven.shared:maven-shared-utils:jar:3.2.1:compile
[INFO] | | \- commons-io:commons-io:jar:2.5:compile
[INFO] | +- org.apache.maven.shared:maven-shared-incremental:jar:1.1:compile
[INFO] | +- org.codehaus.plexus:plexus-java:jar:0.9.10:compile
[INFO] | | +- org.ow2.asm:asm:jar:6.2:compile
[INFO] | | \- com.thoughtworks.qdox:qdox:jar:2.0-M8:compile
[INFO] | +- org.codehaus.plexus:plexus-compiler-api:jar:2.8.4:compile
[INFO] | +- org.codehaus.plexus:plexus-compiler-manager:jar:2.8.4:compile
[INFO] | \- org.codehaus.plexus:plexus-compiler-javac:jar:2.8.4:runtime
[INFO] +- org.postgresql:postgresql:jar:42.2.23:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] +- org.springframework.boot:spring-boot-loader:jar:2.5.6:compile
[INFO] +- com.google.cloud:google-cloud-dataproc:jar:2.2.2:compile
[INFO] | \- com.google.api.grpc:proto-google-cloud-dataproc-v1:jar:2.2.2:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.25:compile
[INFO] +- com.google.cloud:google-cloud-bigquery:jar:2.3.3:compile
[INFO] | +- com.google.cloud:google-cloud-core-http:jar:2.2.0:compile
[INFO] | +- com.google.api-client:google-api-client:jar:1.32.2:compile
[INFO] | +- com.google.oauth-client:google-oauth-client:jar:1.32.1:compile
[INFO] | +- com.google.http-client:google-http-client-apache-v2:jar:1.40.1:compile
[INFO] | +- com.google.http-client:google-http-client-appengine:jar:1.40.1:compile
[INFO] | +- com.google.api:gax-httpjson:jar:0.91.1:compile
[INFO] | +- com.google.http-client:google-http-client-jackson2:jar:1.40.1:compile
[INFO] | +- org.checkerframework:checker-compat-qual:jar:2.5.5:compile
[INFO] | \- com.google.apis:google-api-services-bigquery:jar:v2-rev20211017-1.32.1:compile
[INFO] +- org.apache.spark:spark-core_2.12:jar:3.1.0:compile
[INFO] | +- com.thoughtworks.paranamer:paranamer:jar:2.8:compile
[INFO] | +- org.apache.avro:avro:jar:1.8.2:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | +- org.apache.commons:commons-compress:jar:1.8.1:compile
[INFO] | | \- org.tukaani:xz:jar:1.5:compile
[INFO] | +- org.apache.avro:avro-mapred:jar:hadoop2:1.8.2:compile
[INFO] | | \- org.apache.avro:avro-ipc:jar:1.8.2:compile
[INFO] | +- com.twitter:chill_2.12:jar:0.9.5:compile
[INFO] | | \- com.esotericsoftware:kryo-shaded:jar:4.0.2:compile
[INFO] | | \- com.esotericsoftware:minlog:jar:1.3.0:compile
[INFO] | +- com.twitter:chill-java:jar:0.9.5:compile
[INFO] | +- org.apache.xbean:xbean-asm7-shaded:jar:4.15:compile
[INFO] | +- org.apache.hadoop:hadoop-client:jar:3.2.0:compile
[INFO] | | +- org.apache.hadoop:hadoop-common:jar:3.2.0:compile
[INFO] | | | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | | | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | | +- org.eclipse.jetty:jetty-servlet:jar:9.4.42.v20210604:compile
[INFO] | | | | +- org.eclipse.jetty:jetty-security:jar:9.4.42.v20210604:compile
[INFO] | | | | \- org.eclipse.jetty:jetty-util-ajax:jar:9.4.42.v20210604:compile
[INFO] | | | +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
[INFO] | | | +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | | | +- org.apache.commons:commons-configuration2:jar:2.1.1:compile
[INFO] | | | +- com.google.re2j:re2j:jar:1.1:compile
[INFO] | | | +- org.apache.hadoop:hadoop-auth:jar:3.2.0:compile
[INFO] | | | | \- com.nimbusds:nimbus-jose-jwt:jar:9.10:compile
[INFO] | | | | \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] | | | +- org.apache.curator:curator-client:jar:2.12.0:compile
[INFO] | | | +- org.apache.htrace:htrace-core4:jar:4.1.0-incubating:compile
[INFO] | | | +- org.apache.kerby:kerb-simplekdc:jar:1.0.1:compile
[INFO] | | | | +- org.apache.kerby:kerb-client:jar:1.0.1:compile
[INFO] | | | | | +- org.apache.kerby:kerby-config:jar:1.0.1:compile
[INFO] | | | | | +- org.apache.kerby:kerb-core:jar:1.0.1:compile
[INFO] | | | | | | \- org.apache.kerby:kerby-pkix:jar:1.0.1:compile
[INFO] | | | | | | +- org.apache.kerby:kerby-asn1:jar:1.0.1:compile
[INFO] | | | | | | \- org.apache.kerby:kerby-util:jar:1.0.1:compile
[INFO] | | | | | +- org.apache.kerby:kerb-common:jar:1.0.1:compile
[INFO] | | | | | | \- org.apache.kerby:kerb-crypto:jar:1.0.1:compile
[INFO] | | | | | +- org.apache.kerby:kerb-util:jar:1.0.1:compile
[INFO] | | | | | \- org.apache.kerby:token-provider:jar:1.0.1:compile
[INFO] | | | | \- org.apache.kerby:kerb-admin:jar:1.0.1:compile
[INFO] | | | | +- org.apache.kerby:kerb-server:jar:1.0.1:compile
[INFO] | | | | | \- org.apache.kerby:kerb-identity:jar:1.0.1:compile
[INFO] | | | | \- org.apache.kerby:kerby-xdr:jar:1.0.1:compile
[INFO] | | | +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | | | +- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] | | | \- dnsjava:dnsjava:jar:2.1.7:compile
[INFO] | | +- org.apache.hadoop:hadoop-hdfs-client:jar:3.2.0:compile
[INFO] | | | \- com.squareup.okhttp:okhttp:jar:2.7.5:compile
[INFO] | | | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] | | +- org.apache.hadoop:hadoop-yarn-api:jar:3.2.0:compile
[INFO] | | | \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | | | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | | +- org.apache.hadoop:hadoop-yarn-client:jar:3.2.0:compile
[INFO] | | +- org.apache.hadoop:hadoop-mapreduce-client-core:jar:3.2.0:compile
[INFO] | | | \- org.apache.hadoop:hadoop-yarn-common:jar:3.2.0:compile
[INFO] | | | +- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] | | | +- org.eclipse.jetty:jetty-util:jar:9.4.42.v20210604:compile
[INFO] | | | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.12.3:compile
[INFO] | | | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.12.3:compile
[INFO] | | | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.12.3:compile
[INFO] | | +- org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:3.2.0:compile
[INFO] | | | \- org.apache.hadoop:hadoop-mapreduce-client-common:jar:3.2.0:compile
[INFO] | | \- org.apache.hadoop:hadoop-annotations:jar:3.2.0:compile
[INFO] | +- org.apache.spark:spark-launcher_2.12:jar:3.1.0:compile
[INFO] | +- org.apache.spark:spark-kvstore_2.12:jar:3.1.0:compile
[INFO] | | \- org.fusesource.leveldbjni:leveldbjni-all:jar:1.8:compile
[INFO] | +- org.apache.spark:spark-network-common_2.12:jar:3.1.0:compile
[INFO] | +- org.apache.spark:spark-network-shuffle_2.12:jar:3.1.0:compile
[INFO] | +- org.apache.spark:spark-unsafe_2.12:jar:3.1.0:compile
[INFO] | +- javax.activation:activation:jar:1.1.1:compile
[INFO] | +- org.apache.curator:curator-recipes:jar:2.13.0:compile
[INFO] | | \- org.apache.curator:curator-framework:jar:2.13.0:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.14:compile
[INFO] | | \- org.apache.yetus:audience-annotations:jar:0.5.0:compile
[INFO] | +- jakarta.servlet:jakarta.servlet-api:jar:4.0.4:compile
[INFO] | +- org.apache.commons:commons-math3:jar:3.4.1:compile
[INFO] | +- org.slf4j:jul-to-slf4j:jar:1.7.31:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.31:compile
[INFO] | +- com.ning:compress-lzf:jar:1.0.3:compile
[INFO] | +- org.xerial.snappy:snappy-java:jar:1.1.8.2:compile
[INFO] | +- org.lz4:lz4-java:jar:1.7.1:compile
[INFO] | +- com.github.luben:zstd-jni:jar:1.4.8-1:compile
[INFO] | +- org.roaringbitmap:RoaringBitmap:jar:0.9.0:compile
[INFO] | | \- org.roaringbitmap:shims:jar:0.9.0:runtime
[INFO] | +- commons-net:commons-net:jar:3.1:compile
[INFO] | +- org.scala-lang.modules:scala-xml_2.12:jar:1.2.0:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.12.10:compile
[INFO] | +- org.scala-lang:scala-reflect:jar:2.12.10:compile
[INFO] | +- org.json4s:json4s-jackson_2.12:jar:3.7.0-M5:compile
[INFO] | | \- org.json4s:json4s-core_2.12:jar:3.7.0-M5:compile
[INFO] | | +- org.json4s:json4s-ast_2.12:jar:3.7.0-M5:compile
[INFO] | | \- org.json4s:json4s-scalap_2.12:jar:3.7.0-M5:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.33:compile
[INFO] | | +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[INFO] | | \- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.33:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.33:compile
[INFO] | | \- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.33:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.33:compile
[INFO] | +- org.glassfish.jersey.inject:jersey-hk2:jar:2.33:compile
[INFO] | | \- org.glassfish.hk2:hk2-locator:jar:2.6.1:compile
[INFO] | | +- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.6.1:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.6.1:compile
[INFO] | | \- org.glassfish.hk2:hk2-utils:jar:2.6.1:compile
[INFO] | +- io.netty:netty-all:jar:4.1.65.Final:compile
[INFO] | +- com.clearspring.analytics:stream:jar:2.9.6:compile
[INFO] | +- io.dropwizard.metrics:metrics-core:jar:4.1.24:compile
[INFO] | +- io.dropwizard.metrics:metrics-jvm:jar:4.1.24:compile
[INFO] | +- io.dropwizard.metrics:metrics-json:jar:4.1.24:compile
[INFO] | +- io.dropwizard.metrics:metrics-graphite:jar:4.1.24:compile
[INFO] | +- io.dropwizard.metrics:metrics-jmx:jar:4.1.24:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-scala_2.12:jar:2.12.3:compile
[INFO] | +- org.apache.ivy:ivy:jar:2.4.0:compile
[INFO] | +- oro:oro:jar:2.0.8:compile
[INFO] | +- net.razorvine:pyrolite:jar:4.30:compile
[INFO] | +- net.sf.py4j:py4j:jar:0.10.9:compile
[INFO] | +- org.apache.spark:spark-tags_2.12:jar:3.1.0:compile
[INFO] | +- org.apache.commons:commons-crypto:jar:1.1.0:compile
[INFO] | \- org.spark-project.spark:unused:jar:1.0.0:compile
[INFO] +- org.apache.spark:spark-streaming_2.12:jar:3.1.0:compile
[INFO] +- org.apache.spark:spark-streaming-kafka-0-10_2.12:jar:3.1.0:compile
[INFO] | +- org.apache.spark:spark-token-provider-kafka-0-10_2.12:jar:3.1.0:compile
[INFO] | \- org.apache.kafka:kafka-clients:jar:2.7.1:compile
[INFO] +- org.apache.spark:spark-avro_2.12:jar:3.1.0:compile
[INFO] +- org.apache.spark:spark-sql-kafka-0-10_2.12:jar:3.1.0:compile
[INFO] | \- org.apache.commons:commons-pool2:jar:2.9.0:compile
[INFO] +- org.codehaus.janino:janino:jar:3.0.8:compile
[INFO] +- org.codehaus.janino:commons-compiler:jar:3.0.8:compile
[INFO] +- org.apache.spark:spark-sql_2.12:jar:3.1.0:compile
[INFO] | +- com.univocity:univocity-parsers:jar:2.9.0:compile
[INFO] | +- org.apache.spark:spark-sketch_2.12:jar:3.1.0:compile
[INFO] | +- org.apache.spark:spark-catalyst_2.12:jar:3.1.0:compile
[INFO] | | +- org.scala-lang.modules:scala-parser-combinators_2.12:jar:1.1.2:compile
[INFO] | | +- org.antlr:antlr4-runtime:jar:4.8-1:compile
[INFO] | | +- org.apache.arrow:arrow-vector:jar:2.0.0:compile
[INFO] | | | +- org.apache.arrow:arrow-format:jar:2.0.0:compile
[INFO] | | | +- org.apache.arrow:arrow-memory-core:jar:2.0.0:compile
[INFO] | | | \- com.google.flatbuffers:flatbuffers-java:jar:1.9.0:compile
[INFO] | | \- org.apache.arrow:arrow-memory-netty:jar:2.0.0:compile
[INFO] | +- org.apache.orc:orc-core:jar:1.5.12:compile
[INFO] | | +- org.apache.orc:orc-shims:jar:1.5.12:compile
[INFO] | | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- io.airlift:aircompressor:jar:0.10:compile
[INFO] | | \- org.threeten:threeten-extra:jar:1.5.0:compile
[INFO] | +- org.apache.orc:orc-mapreduce:jar:1.5.12:compile
[INFO] | +- org.apache.hive:hive-storage-api:jar:2.7.2:compile
[INFO] | +- org.apache.parquet:parquet-column:jar:1.10.1:compile
[INFO] | | +- org.apache.parquet:parquet-common:jar:1.10.1:compile
[INFO] | | \- org.apache.parquet:parquet-encoding:jar:1.10.1:compile
[INFO] | \- org.apache.parquet:parquet-hadoop:jar:1.10.1:compile
[INFO] | +- org.apache.parquet:parquet-format:jar:2.4.0:compile
[INFO] | \- org.apache.parquet:parquet-jackson:jar:1.10.1:compile
[INFO] +- org.springframework.kafka:spring-kafka:jar:2.8.2:compile
[INFO] +- com.google.cloud:google-cloud-storage:jar:2.1.9:compile
[INFO] | \- com.google.apis:google-api-services-storage:jar:v1-rev20210918-1.32.1:compile
[INFO] \- za.co.absa:abris_2.12:jar:6.0.0:compile
[INFO] +- io.confluent:kafka-avro-serializer:jar:6.2.1:compile
[INFO] | +- io.confluent:kafka-schema-serializer:jar:6.2.1:compile
[INFO] | \- io.confluent:common-utils:jar:6.2.1:compile
[INFO] +- io.confluent:kafka-schema-registry-client:jar:6.2.1:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.6.2:compile
[INFO] | \- io.swagger:swagger-core:jar:1.6.2:compile
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.12.3:compile
[INFO] | \- io.swagger:swagger-models:jar:1.6.2:compile
[INFO] \- za.co.absa.commons:commons_2.12:jar:1.0.0:compile
My Spark Integration with Spring boot is causing the issue, i am not able to dependency which is causing it
ANSWER
Answered 2022-Feb-16 at 13:12Acording to this answer: https://stackoverflow.com/a/51236918/16651073 tomcat falls back to default logging if it can resolve the location
Can you try to save the properties without the spaces.
Like this:
logging.file.name=application.logs
QUESTION
nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing
Asked 2022-Feb-11 at 22:39This worked fine for me be building under Java 8. Now under Java 17.01 I get this when I do mvn deploy.
mvn install works fine. I tried 3.6.3 and 3.8.4 and updated (I think) all my plugins to the newest versions.
Any ideas?
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @149f5761
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.sproket</groupId>
<artifactId>persism</artifactId>
<version>2.0.0</version>
<packaging>jar</packaging>
<build>
<sourceDirectory>./src</sourceDirectory>
<testSourceDirectory>./test</testSourceDirectory>
<testResources>
<testResource>
<directory>./test</directory>
<!-- <includes>-->
<!-- <include>*.*</include>-->
<!-- </includes>-->
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<!-- MSSQL does not seem to able to connect with 16 -->
<configuration>
<source>17</source>
<target>17</target>
<!-- <compilerArgs>-->
<!-- <arg>-parameters</arg>-->
<!-- </compilerArgs>-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<excludePackageNames>net.sf.persism.log*;net.sf.persism.logging.*</excludePackageNames>
<source>17</source>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<excludedGroups>net.sf.persism.categories.ExternalDB,net.sf.persism.categories.TestContainerDB
</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<name>persism</name>
<description>A zero ceremony ORM for Java</description>
<url>https://github.com/sproket/Persism</url>
<properties>
<java.version>17</java.version>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<licenses>
<license>
<name>BSD-3-Clause License</name>
<url>https://github.com/sproket/Persism/blob/master/license.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Dan Howard</name>
<email>--------------------------</email>
<organization>io.github</organization>
<organizationUrl>https://sproket.github.io/Persism/</organizationUrl>
</developer>
</developers>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<scm>
<connection>scm:git:git://github.com/sproket/Persism.git</connection>
<developerConnection>scm:git:ssh://github.com/sproket/Persism.git</developerConnection>
<url>https://github.com/sproket/Persism</url>
</scm>
<profiles>
<profile>
<id>include-test-containers-db</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<excludedGroups>net.sf.persism.categories.ExternalDB</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>exclude-test-containers-db</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<excludedGroups>net.sf.persism.categories.TestContainerDB</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<release>17</release>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.carrotsearch</groupId>
<artifactId>junit-benchmarks</artifactId>
<version>0.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.14.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.14.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird</artifactId>
<version>4.0.2.java8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.firebirdsql</groupId>
<artifactId>firebird-testcontainers-java</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- using older version as 2.5.1 collides with ucanaccess -->
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.5.1</version>
<scope>test</scope>
<!-- <classifier>debug</classifier>-->
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.8.2.2</version>
<scope>test</scope>
</dependency>
<!-- OR -Djdk.tls.client.protocols=TLSv1 -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>8.4.1.jre8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mssqlserver</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.23</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.3.0.0</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.oracle</groupId>-->
<!-- <artifactId>ojdbc6</artifactId>-->
<!-- <version>11.2.0.4</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.2-1004-jdbc41</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.34.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.ucanaccess</groupId>
<artifactId>ucanaccess</artifactId>
<version>5.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>informix-jdbc-complete</artifactId>
<version>4.50.4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.toddfast.typeconverter</groupId>
<artifactId>typeconverter</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.11</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin -->
<!-- DOES NOT WORK with JAVA 8 + -->
<!-- <dependency>-->
<!-- <groupId>org.codehaus.mojo</groupId>-->
<!-- <artifactId>cobertura-maven-plugin</artifactId>-->
<!-- <version>2.7</version>-->
<!-- <scope>test</scope>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>com.sun</groupId>-->
<!-- <artifactId>tools</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
</dependencies>
</project>
ANSWER
Answered 2022-Feb-11 at 22:39Update: Version 1.6.9 has been released and should fix this issue! 🎉
This is actually a known bug, which is now open for quite a while: OSSRH-66257. There are two known workarounds:
As a workaround, use --add-opens
to give the library causing the problem access to the required classes:
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
mvn deploy
Or you can update the library that causes the problem:
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
</dependency>
</dependencies>
</plugin>
QUESTION
SpringBoot + Lombok + MapStruct not sorking together
Asked 2022-Jan-31 at 10:08I'm trying to configure SpringBoot (v2.6.2) with Lombok and MapStruct, already configured the maven compiler plugin and the lombok-mapstruct-binding (annotationProcessorPaths) but the lombok classes aren't being created:
pom.xml
*<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>io.knowledge</groupId>
<artifactId>knowledge</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>knowledge</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<version.mapstruct>1.4.1.Final</version.mapstruct>
</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-web</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${version.mapstruct}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${version.mapstruct}</version>
</path>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</dependency>
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>
-Amapstruct.defaultComponentModel=spring
</compilerArg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>*
Always getting an uninitialised variable error when trying to use DI:
variable xxxx might not have been initialized
ANSWER
Answered 2022-Jan-12 at 17:46Just double checked everything, I was missing some intelliJ configurations.
QUESTION
New H2 version breaks liquibase
Asked 2022-Jan-31 at 03:56New version of H2 seems to have broken liquibase and JPA
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.h2test</groupId>
<artifactId>h2test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>h2test</name>
<description>h2test</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.7.1</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.210</version>
<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>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
application.properties
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
classes:
package com.h2test.h2test.domain;
import lombok.Data;
import javax.persistence.*;
@Entity
@Data
public class Person {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column
private String firstName;
@Column
private String lastName;
}
package com.h2test.h2test.repository;
import com.h2test.h2test.domain.Person;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface PersonRepository extends JpaRepository<Person, Long> {
}
@RestController
public class SomethingController {
@Autowired
private PersonRepository personRepository;
@GetMapping
public String test() {
Person person = new Person();
person.setFirstName("first name");
person.setLastName("last name");
personRepository.save(person);
return "hello";
}
}
Liquibase file:
databaseChangeLog:
- changeSet:
id: createTable-example
author: liquibase-docs
changes:
- createTable:
tableName: person
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
nullable: false
- column:
name: first_name
type: varchar(50)
- column:
name: last_name
type: varchar(50)
constraints:
nullable: false
When triggering the REST ENDPOINT localhost:8080 that creates and saves the Person entity I get the following error:
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "ID"; SQL statement: insert into person (id, first_name, last_name) values (null, ?, ?) [23502-202] at org.h2.message.DbException.getJdbcSQLException(DbException.java:508) ~[h2-2.0.202.jar:2.0.202] at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.0.202.jar:2.0.202]
This seems to only happen in the newer versions of H2. Any help is appreciated
ANSWER
Answered 2022-Jan-31 at 03:56Version 2.6.3 of spring-boot-starter-data-jpa
has org.hibernate:hibernate-core:5.6.4.Final
in its dependencies. This version doesn't support H2 2.x.y. You need to use 5.6.5:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.6.5.Final</version>
</dependency>
Also something is wrong with your classpath. You have H2 2.1.210 in dependencies, but exception in your question has error code 23502-202, it means it was produced by H2 2.0.202, you shouldn't use this outdated version, Hibernate ORM may have some problems with it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Explore Related Topics
Share this Page
redis
by redis
rethinkdb
by rethinkdb
cockroach
by cockroachdb
rocksdb
by facebook
mongo
by mongodb
See all Database Libraries
h2database.github.io
by h2database HTML
See all Libraries by this author
redis
by redis
ClickHouse
by ClickHouse
rocksdb
by facebook
liquibase
by liquibase
flyway
by flyway
See all Database Libraries
Save this library and start creating your kit