embedded neo4j webadmin not working - java

I'm having some problems with running neo4j (in embedded mode) with WebAdmin - version 1.6.
I initialize the DB and webadmin as follows:
graphDb = new EmbeddedGraphDatabase( DB_PATH);
srv = new WrappingNeoServerBootstrapper( graphDb);
srv.start();
registerShutdownHook( graphDb, srv );
which is just usual way described in Neo4j documentation.
And my Maven dependencies are:
<dependencies>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>${neo4j-version}</version>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>${neo4j-version}</version>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<classifier>static-web</classifier>
<version>${neo4j-version}</version>
</dependency>
</dependencies>
The error I get when trying to access http://localhost:7474 is:
Problem accessing /. Reason:
javax.servlet.http.HttpServletRequest.getRequestURL()Ljava/lang/StringBuffer;
Caused by:
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getRequestURL()Ljava/lang/StringBuffer;
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:638)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)

Despite my dependencies and my dependency:tree output looking like this:
[INFO] neo4j-starter:neo4j-starter:jar:0.0.1-SNAPSHOT
[INFO] +- commons-configuration:commons-configuration:jar:1.4:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
[INFO] | +- commons-lang:commons-lang:jar:2.3:compile
[INFO] | +- commons-logging:commons-logging-api:jar:1.0.4:compile
[INFO] | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1:compile
[INFO] | | +- logkit:logkit:jar:1.0.1:compile
[INFO] | | \- avalon-framework:avalon-framework:jar:4.1.3:compile
[INFO] | +- commons-beanutils:commons-beanutils-core:jar:1.7.0:compile
[INFO] | +- commons-codec:commons-codec:jar:1.3:compile
[INFO] | \- commons-jxpath:commons-jxpath:jar:1.2:compile
[INFO] | +- xerces:xerces:jar:1.2.3:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.2:compile
[INFO] | +- ant:ant-optional:jar:1.5.1:compile
[INFO] | +- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | \- jdom:jdom:jar:b9:compile
[INFO] +- org.neo4j:neo4j:jar:1.6.M03:compile
[INFO] | +- org.neo4j:neo4j-kernel:jar:1.6.M03:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] | +- org.neo4j:neo4j-lucene-index:jar:1.6.M03:compile
[INFO] | | \- org.apache.lucene:lucene-core:jar:3.5.0:compile
[INFO] | +- org.neo4j:neo4j-graph-algo:jar:1.6.M03:compile
[INFO] | +- org.neo4j:neo4j-udc:jar:1.6.M03:compile
[INFO] | +- org.neo4j:neo4j-graph-matching:jar:1.6.M03:compile
[INFO] | +- org.neo4j:neo4j-cypher:jar:1.6.M03:compile
[INFO] | | \- org.scala-lang:scala-library:jar:2.9.0-1:compile
[INFO] | \- org.neo4j:neo4j-jmx:jar:1.6.M03:compile
[INFO] +- org.neo4j.app:neo4j-server:jar:1.6.M03:compile
[ INFO] | +- org.neo4j:neo4j:pom:1.6.M03:compile
[INFO] | +- org.neo4j:server-api:jar:1.6.M03:compile
[INFO] | | \- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] | +- org.slf4j:log4j-over-slf4j:jar:1.6.1:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
[INFO] | +- org.mortbay.jetty:jetty:jar:6.1.25:compile
[INFO] | | +- org.mortbay.jetty:jetty-util:jar:6.1.25:compile
[INFO] | | \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:compile
[INFO] | +- com.sun.jersey:jersey-server:jar:1.9:compile
[INFO] | | +- asm:asm:jar:3.1:compile
[INFO] | | \- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] | +- commons-io:commons-io:jar:1.4:compile
[INFO] | +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile
[INFO] | | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile
[INFO] | +- com.tinkerpop.gremlin:gremlin-groovy:jar:1.4:compile
[INFO] | | +- com.tinkerpop.gremlin:gremlin-java:jar:1.4:compile
[INFO] | | +- com.tinkerpop:pipes:jar:0.9:compile
[INFO] | | +- org.codehaus.groovy:groovy:jar:1.8.4:compile
[INFO] | | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | | +- asm:asm-commons:jar:3.2:compile
[INFO] | | | +- asm:asm-util:jar:3.2:compile
[INFO] | | | +- asm:asm-analysis:jar:3.2:compile
[INFO] | | | \- asm:asm-tree:jar:3.2:compile
[INFO] | | \- org.fusesource.jansi:jansi:jar:1.5:compile
[INFO] | +- com.tinkerpop.blueprints:blueprints-neo4j-graph:jar:1.1:compile
[INFO] | | \- com.tinkerpop.blueprints:blueprints-core:jar:1.1:compile
[INFO] | | \- org.codehaus.jettison:jettison:jar:1.3:compile
[INFO] | | \- stax:stax-api:jar:1.0.1:compile
[INFO] | +- org.rrd4j:rrd4j:jar:2.0.7:compile
[INFO] | +- com.sun.jersey.contribs:jersey-multipart:jar:1.9:compile
[INFO] | | \- org.jvnet:mimepull:jar:1.6:compile
[INFO] | \- org.neo4j:neo4j-shell:jar:1.6.M03:compile
[INFO] | \- org.apache.servicemix.bundles:org.apache.servicemix.bundles.jline:jar:0.9.94_1:compile
[INFO] +- org.neo4j.app:neo4j-server:jar:static-web:1.6.M03:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.4:compile
[INFO] | \- log4j:log4j:jar:1.2.16:compile
[INFO] \- junit:junit:jar:4.8:compile
I needed to include newer version of servlet-api
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
</dependency>

Related

Java / Maven Loader Constraint Violation with Apache Kafka with org.slf4j

i'm currently struggling with a java.lang.LinkageError: loader constraint violation.
I'm developing a Jira Server App with the Atlassian Jira SDK that will include a Apache Kafka Producer. I added a dependency for Kafka in my pom.xml but i receive this error:
java.lang.RuntimeException: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature. Listener: com.rse.atlassian.kafka.jira.eventlistener.MasterListener event: com.atlassian.jira.event.issue.IssueEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:53)...
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:423)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.kafka.common.utils.Utils.<clinit>(Utils.java:99)
at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:318)
I read that this might originate from the org.slf4j dependency being both in Kafka and Atlassian Jira, so i used statements in my pom.xml. See the relevant part here:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>2.8.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<scope>provided</scope>
</dependency>
By this point i think i tried two dozen different permutations of this... but no luck so far.
Here is also my mvn dependency:tree
[INFO] +- com.atlassian.jira:jira-api:jar:8.20.1:provided
[INFO] | +- com.atlassian.annotations:atlassian-annotations:jar:3.0.3:provided
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:provided
[INFO] | | \- org.checkerframework:checker-qual:jar:2.8.1:provided
[INFO] | +- com.atlassian.ofbiz:entityengine-share:jar:1.5.0:provided
[INFO] | | \- xerces:xercesImpl:jar:2.12.0:provided
[INFO] | | \- xml-apis:xml-apis:jar:1.4.01:provided
[INFO] | +- com.atlassian.ofbiz:entityengine:jar:1.5.0:provided
[INFO] | | \- jta:jta:jar:1.0.1:provided
[INFO] | +- com.atlassian.collectors:atlassian-collectors-util:jar:1.1:provided
[INFO] | +- opensymphony:webwork:jar:1.4-atlassian-30:provided
[INFO] | | \- com.atlassian.html:atlassian-html-encoder:jar:1.4:provided
[INFO] | +- webwork:pell-multipart-request:jar:1.31.0:provided
[INFO] | +- com.atlassian.core:atlassian-core:jar:7.0.4:provided
[INFO] | | +- commons-collections:commons-collections:jar:3.2.2:provided
[INFO] | | +- dom4j:dom4j:jar:1.6.1-atlassian-2:provided
[INFO] | | \- com.atlassian.image:atlassian-image-consumer:jar:1.0.1:provided
[INFO] | +- com.atlassian.core:atlassian-core-user:jar:7.0.4:provided
[INFO] | +- com.atlassian.core:atlassian-core-thumbnail:jar:7.0.4:provided
[INFO] | | +- com.twelvemonkeys.imageio:imageio-jpeg:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.imageio:imageio-core:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.imageio:imageio-metadata:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.common:common-lang:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.common:common-io:jar:3.4.1:provided
[INFO] | | | \- com.twelvemonkeys.common:common-image:jar:3.4.1:provided
[INFO] | | \- com.twelvemonkeys.imageio:imageio-tiff:jar:3.4.1:provided
[INFO] | +- com.atlassian.extras:atlassian-extras:jar:3.4.6:provided
[INFO] | | +- commons-codec:commons-codec:jar:1.11:provided
[INFO] | | \- com.atlassian.extras:atlassian-extras-key-manager:jar:3.4.6:provided
[INFO] | | \- com.atlassian.extras:atlassian-extras-common:jar:3.4.6:provided
[INFO] | | \- com.atlassian.extras:atlassian-extras-api:jar:3.4.6:provided
[INFO] | +- com.atlassian.velocity:atlassian-velocity:jar:1.3:provided
[INFO] | | +- opensymphony:oscore:jar:2.2.7:provided
[INFO] | | \- org.apache.velocity:velocity:jar:1.6.4:provided
[INFO] | +- osworkflow:osworkflow:jar:2.9.0-atlassian-1:provided
[INFO] | +- opensymphony:propertyset:jar:1.5:provided
[INFO] | +- com.atlassian.cache:atlassian-cache-api:jar:5.1.3:provided
[INFO] | | \- com.atlassian.instrumentation:atlassian-instrumentation-core:jar:3.0.0:provided
[INFO] | +- com.atlassian.beehive:beehive-api:jar:4.0.4:provided
[INFO] | +- com.atlassian.tenancy:atlassian-tenancy-api:jar:3.0.1:provided
[INFO] | | \- com.atlassian.event:atlassian-event:jar:4.0.0:provided
[INFO] | +- com.atlassian.upgrade:upgrade-task-framework-api:jar:2.0.2:provided
[INFO] | +- com.atlassian.crowd:embedded-crowd-api:jar:4.3.6-743967e012:provided
[INFO] | +- com.google.guava:guava:jar:26.0-jre:provided
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.1.3:provided
[INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.1:provided
[INFO] | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:provided
[INFO] | +- com.atlassian.fugue:fugue:jar:2.7.0:provided
[INFO] | +- io.atlassian.fugue:fugue:jar:4.7.2:provided
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13-atlassian-6:provided
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13-atlassian-6:provided
[INFO] | +- com.sun.mail:jakarta.mail:jar:1.6.5-atlassian-2:provided
[INFO] | | \- com.sun.activation:jakarta.activation:jar:1.2.1:provided
[INFO] | +- com.atlassian.mail:atlassian-mail:jar:5.1.2:provided
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.9.4:provided
[INFO] | | \- commons-digester:commons-digester:jar:1.8.1:provided
[INFO] | +- oro:oro:jar:2.0.7:provided
[INFO] | +- com.atlassian.threadlocal:atlassian-threadlocal:jar:1.3:provided
[INFO] | +- com.google.javascript:closure-compiler-unshaded:jar:v20181008:provided
[INFO] | | +- com.google.javascript:closure-compiler-externs:jar:v20181008:provided
[INFO] | | +- args4j:args4j:jar:2.0.26:provided
[INFO] | | \- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
[INFO] | +- com.google.protobuf:protobuf-java:jar:3.4.0:provided
[INFO] | +- com.atlassian.velocity.htmlsafe:velocity-htmlsafe:jar:3.2.0:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-api:jar:5.3.13:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment:jar:5.3.2:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment-api:jar:5.3.2:provided
[INFO] | +- com.atlassian.ozymandias:atlassian-plugin-point-safety:jar:1.0.0:provided
[INFO] | +- jfree:jfreechart:jar:1.0.13:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webresource:jar:4.3.6:provided
[INFO] | | +- com.atlassian.plugins:atlassian-plugins-webresource-spi:jar:4.3.6:provided
[INFO] | | +- com.atlassian.plugins:atlassian-plugins-webresource-api:jar:4.3.6:provided
[INFO] | | +- org.tuckey:urlrewritefilter:jar:4.0.4:provided
[INFO] | | \- com.atlassian.sourcemap:sourcemap:jar:1.7.7:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webresource-compiler-gcc:jar:4.3.6:provided
[INFO] | +- jfree:jcommon:jar:1.0.8:provided
[INFO] | +- com.atlassian.gadgets:atlassian-gadgets-api:jar:7.0.3:provided
[INFO] | +- com.atlassian.johnson:atlassian-johnson-core:jar:4.0.0:provided
[INFO] | | \- com.atlassian.plugins:atlassian-plugins-servlet:jar:5.0.0:provided
[INFO] | +- joda-time:joda-time:jar:2.10.5:provided
[INFO] | +- commons-lang:commons-lang:jar:2.6:provided
[INFO] | +- org.apache.commons:commons-lang3:jar:3.9:provided
[INFO] | +- commons-io:commons-io:jar:2.8.0:provided
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1-atlassian-2:provided
[INFO] | +- com.atlassian.profiling:atlassian-profiling:jar:3.2.0:provided
[INFO] | +- com.atlassian.scheduler:atlassian-scheduler-api:jar:3.0.1:provided
[INFO] | +- com.atlassian.analytics:analytics-api:jar:6.1.12:provided
[INFO] | +- com.atlassian.application:atlassian-application-api:jar:2.0.0:provided
[INFO] | +- javax.validation:validation-api:jar:2.0.1.Final:provided
[INFO] | +- javax.inject:javax.inject:jar:1:provided
[INFO] | \- com.atlassian:lucene-extras:jar:7.3.1-atlassian-4:provided
[INFO] +- junit:junit:jar:4.10:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- com.atlassian.plugins:atlassian-plugins-osgi-javaconfig:jar:0.2.0:compile
[INFO] +- org.apache.felix:org.apache.felix.framework:jar:4.0.0:provided
[INFO] +- org.springframework:spring-beans:jar:4.2.5.RELEASE:provided
[INFO] | \- org.springframework:spring-core:jar:4.2.5.RELEASE:provided
[INFO] | \- commons-logging:commons-logging:jar:1.2:provided
[INFO] +- org.springframework:spring-context:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-aop:jar:4.2.5.RELEASE:provided
[INFO] | | \- aopalliance:aopalliance:jar:1.0:provided
[INFO] | \- org.springframework:spring-expression:jar:4.2.5.RELEASE:provided
[INFO] +- com.atlassian.plugins:atlassian-plugins-osgi-testrunner:jar:2.0.2:test
[INFO] | +- org.apache.wink:wink-client:jar:1.1.3-incubating:test
[INFO] | | +- org.apache.wink:wink-common:jar:1.1.3-incubating:test
[INFO] | | | \- org.apache.geronimo.specs:geronimo-annotation_1.1_spec:jar:1.0:test
[INFO] | | +- javax.xml.bind:jaxb-api:jar:2.2:test
[INFO] | | | \- javax.xml.stream:stax-api:jar:1.0-2:test
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.1.1:test
[INFO] | | \- javax.activation:activation:jar:1.1:test
[INFO] | \- com.atlassian.upm:upm-api:jar:2.15:test
[INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:provided
[INFO] +- com.google.code.gson:gson:jar:2.2.2-atlassian-1:compile
[INFO] +- com.atlassian.applinks:applinks-api:jar:8.0.7:provided
[INFO] +- com.atlassian.applinks:applinks-spi:jar:8.0.7:provided
[INFO] +- com.atlassian.applinks:applinks-host:jar:8.0.7:provided
[INFO] +- com.atlassian.applinks:applinks-plugin:jar:8.0.7:provided
[INFO] | +- com.atlassian.applinks:applinks-common:jar:8.0.7:provided
[INFO] | | +- com.atlassian.security:atlassian-secure-xml:jar:3.2.14:provided
[INFO] | | +- io.swagger:swagger-annotations:jar:1.5.24:provided
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.3:provided
[INFO] | | \- com.fasterxml.jackson.core:jackson-databind:jar:2.12.3:provided
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.12.3:provided
[INFO] | \- com.atlassian.frontend:atlassian-frontend-runtime-plugin:jar:0.3.0:provided
[INFO] +- com.atlassian.templaterenderer:atlassian-template-renderer-api:jar:4.1.5:provided
[INFO] +- com.atlassian.servicedesk:jira-servicedesk-api:jar:4.13.3:provided
[INFO] | +- jakarta.mail:jakarta.mail-api:jar:1.6.5:provided
[INFO] | \- io.atlassian.util.concurrent:atlassian-util-concurrent:jar:4.0.1:provided
[INFO] +- com.atlassian.plugin:atlassian-spring-scanner-annotation:jar:2.2.0:provided
[INFO] +- com.atlassian.sal:sal-api:jar:3.0.0:provided
[INFO] +- org.apache.kafka:kafka-clients:jar:2.8.0:compile
[INFO] | +- com.github.luben:zstd-jni:jar:1.4.9-1:compile
[INFO] | +- org.lz4:lz4-java:jar:1.7.1:compile
[INFO] | \- org.xerial.snappy:snappy-java:jar:1.1.8.1:compile
[INFO] \- org.slf4j:slf4j-api:jar:1.7.30:provided
Thanks in advance for all answers!
Your error is coming from org.apache.felix:org.apache.felix.framework, so you should try adding that as a dependency with its own slf4j exclusion as well.
Then, try again, and repeat as needed, based on each package name that is shown in the error.
Alternatively, you could see if adding the maven-shade-plugin will help to rename the kafka-clients packages and not have conflicting classes.

Could not initialize class LoggerContext after upgrading to log4j 2.17.1

I have just tried to upgrade the log4j library from version 2.3 to 2.17.1 to fix the well-known vulnerabilities that were discovered a few weeks ago. I am new to Maven, so I have little idea of what I am doing.
First, I changed my pom.xml project file and added all the log4j dependencies that I needed. I might have gone a little too far and only needed log4j-core and log4j-api, but just in case I added all of these:
...
<dependencies>
...
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>2.17.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.17.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.17.1</version>
<type>pom</type>
</dependency>
...
</dependencies>
...
After doing this, the project compiles successfully if I run mvn clean package -U -Dmaven.test.skip=true. However, if I try to run the tests, I get the following error:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.core.LoggerContext
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.createContext(ClassLoaderContextSelector.java:254)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:218)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:140)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:123)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:230)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:176)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:666)
at org.apache.logging.log4j.LogManager.getRootLogger(LogManager.java:700)
at org.mycomp.myproj.utils.TestUtils.removeLogFile(Unknown Source)
at org.mycomp.myproj.docs2tmx.AppTest.check(AppTest.java:48)
at org.mycomp.myproj.docs2tmx.AppTest.testApp(AppTest.java:30)
I tried to modify the scope of the dependencies to runtime or test, but it does not seem to change anything. Do any of you know how to solve this? If you further loggings, don't hesitate to comment.
[EDIT]
Here is my mvn dependency:tree -Dlog4j:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] myproj_Docs2TMX
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myproj_Docs2TMX 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # myproj_Docs2TMX ---
[INFO] org.mycomp.myproj:myproj_Docs2TMX:jar:0.0.1
[INFO] +- org.mycomp.myproj:myproj_Utils:jar:0.0.1:compile
[INFO] | +- org.mycomp.processor:PLBase:jar:2.0.1myproj:compile
[INFO] | | +- org.mycomp.processor:PLogger:jar:2.0.1:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-1.2-api:jar:2.3:compile
[INFO] | | | \- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.7.2:compile
[INFO] | | | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.7.2:compile
[INFO] | | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | | +- com.beust:jcommander:jar:1.48:compile
[INFO] | | \- com.googlecode.juniversalchardet:juniversalchardet:jar:1.0.3:compile
[INFO] | +- com.ctc.wstx:woodstox-osgi:jar:3.2.1.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] | \- net.java.dev.stax-utils:stax-utils:jar:20070216:compile
[INFO] +- org.mycomp.processor:PLDocument:jar:2.0.1myproj:compile
[INFO] | +- org.apache.tika:tika-core:jar:1.20:compile
[INFO] | +- org.apache.tika:tika-parsers:jar:1.20:compile
[INFO] | | +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] | | | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | | | +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] | | | +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] | | | +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] | | | \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] | | +- com.sun.activation:javax.activation:jar:1.2.0:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | | +- org.gagravarr:vorbis-java-tika:jar:0.8:compile
[INFO] | | +- org.tallison:jmatio:jar:1.5:compile
[INFO] | | +- org.apache.james:apache-mime4j-core:jar:0.8.2:compile
[INFO] | | +- org.apache.james:apache-mime4j-dom:jar:0.8.2:compile
[INFO] | | +- org.apache.commons:commons-compress:jar:1.18:compile
[INFO] | | +- org.tukaani:xz:jar:1.8:compile
[INFO] | | +- com.epam:parso:jar:2.0.10:compile
[INFO] | | +- org.brotli:dec:jar:0.1.2:compile
[INFO] | | +- commons-codec:commons-codec:jar:1.11:compile
[INFO] | | +- org.apache.pdfbox:pdfbox:jar:2.0.13:compile
[INFO] | | | \- org.apache.pdfbox:fontbox:jar:2.0.13:compile
[INFO] | | +- org.apache.pdfbox:pdfbox-tools:jar:2.0.13:compile
[INFO] | | +- org.apache.pdfbox:jempbox:jar:1.8.16:compile
[INFO] | | +- org.bouncycastle:bcmail-jdk15on:jar:1.60:compile
[INFO] | | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] | | +- org.bouncycastle:bcprov-jdk15on:jar:1.60:compile
[INFO] | | +- org.apache.poi:poi:jar:4.0.1:compile
[INFO] | | | +- org.apache.commons:commons-collections4:jar:4.2:compile
[INFO] | | | \- org.apache.commons:commons-math3:jar:3.6.1:compile
[INFO] | | +- org.apache.poi:poi-scratchpad:jar:4.0.1:compile
[INFO] | | +- org.apache.poi:poi-ooxml:jar:4.0.1:compile
[INFO] | | | +- org.apache.poi:poi-ooxml-schemas:jar:4.0.1:compile
[INFO] | | | \- com.github.virtuald:curvesapi:jar:1.05:compile
[INFO] | | +- com.healthmarketscience.jackcess:jackcess:jar:2.1.12:compile
[INFO] | | | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.healthmarketscience.jackcess:jackcess-encrypt:jar:2.1.4:compile
[INFO] | | +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] | | +- org.ow2.asm:asm:jar:7.0:compile
[INFO] | | +- com.googlecode.mp4parser:isoparser:jar:1.1.22:compile
[INFO] | | +- com.drewnoakes:metadata-extractor:jar:2.11.0:compile
[INFO] | | | \- com.adobe.xmp:xmpcore:jar:5.1.3:compile
[INFO] | | +- de.l3s.boilerpipe:boilerpipe:jar:1.1.0:compile
[INFO] | | +- com.rometools:rome:jar:1.12.0:compile
[INFO] | | | \- com.rometools:rome-utils:jar:1.12.0:compile
[INFO] | | +- org.gagravarr:vorbis-java-core:jar:0.8:compile
[INFO] | | +- org.codelibs:jhighlight:jar:1.0.3:compile
[INFO] | | +- com.pff:java-libpst:jar:0.8.1:compile
[INFO] | | +- com.github.junrar:junrar:jar:2.0.0:compile
[INFO] | | +- org.apache.cxf:cxf-rt-rs-client:jar:3.2.7:compile
[INFO] | | | +- org.apache.cxf:cxf-rt-transports-http:jar:3.2.7:compile
[INFO] | | | +- org.apache.cxf:cxf-core:jar:3.2.7:compile
[INFO] | | | | +- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] | | | | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.3:compile
[INFO] | | | \- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.2.7:compile
[INFO] | | | \- javax.ws.rs:javax.ws.rs-api:jar:2.1.1:compile
[INFO] | | +- org.apache.commons:commons-exec:jar:1.3:compile
[INFO] | | +- commons-io:commons-io:jar:2.6:compile
[INFO] | | +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | | +- com.github.openjson:openjson:jar:1.0.10:compile
[INFO] | | +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | | +- edu.ucar:netcdf4:jar:4.5.5:compile
[INFO] | | | \- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] | | +- edu.ucar:grib:jar:4.5.5:compile
[INFO] | | | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
[INFO] | | | \- org.itadaki:bzip2:jar:0.9.1:compile
[INFO] | | +- net.java.dev.jna:jna:jar:5.1.0:compile
[INFO] | | +- org.jsoup:jsoup:jar:1.11.3:compile
[INFO] | | +- edu.ucar:cdm:jar:4.5.5:compile
[INFO] | | | +- edu.ucar:udunits:jar:4.5.5:compile
[INFO] | | | +- joda-time:joda-time:jar:2.2:compile
[INFO] | | | +- org.quartz-scheduler:quartz:jar:2.2.0:compile
[INFO] | | | | \- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] | | | +- net.sf.ehcache:ehcache-core:jar:2.6.2:compile
[INFO] | | | \- com.google.guava:guava:jar:17.0:compile
[INFO] | | +- edu.ucar:httpservices:jar:4.5.5:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] | | +- org.apache.httpcomponents:httpmime:jar:4.5.6:compile
[INFO] | | +- org.apache.commons:commons-csv:jar:1.6:compile
[INFO] | | +- org.apache.sis.core:sis-utility:jar:0.8:compile
[INFO] | | | \- javax.measure:unit-api:jar:1.0:compile
[INFO] | | +- org.apache.sis.storage:sis-netcdf:jar:0.8:compile
[INFO] | | | +- org.apache.sis.storage:sis-storage:jar:0.8:compile
[INFO] | | | | \- org.apache.sis.core:sis-feature:jar:0.8:compile
[INFO] | | | \- org.apache.sis.core:sis-referencing:jar:0.8:compile
[INFO] | | +- org.apache.sis.core:sis-metadata:jar:0.8:compile
[INFO] | | +- org.opengis:geoapi:jar:3.0.1:compile
[INFO] | | +- edu.usc.ir:sentiment-analysis-parser:jar:0.1:compile
[INFO] | | +- org.apache.uima:uimafit-core:jar:2.4.0:compile
[INFO] | | +- org.apache.uima:uimaj-core:jar:3.0.1:compile
[INFO] | | | +- org.bitbucket.mstrobel:procyon-compilertools:jar:0.5.32:compile
[INFO] | | | \- org.bitbucket.mstrobel:procyon-core:jar:0.5.32:compile
[INFO] | | +- org.jdom:jdom2:jar:2.0.6:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.7:compile
[INFO] | | +- org.apache.pdfbox:jbig2-imageio:jar:3.0.2:compile
[INFO] | | \- com.github.jai-imageio:jai-imageio-core:jar:1.4.0:compile
[INFO] | +- org.mycomp:poi-sooxml-schemas:jar:4.0.1:compile
[INFO] | | \- org.apache.xmlbeans:xmlbeans:jar:3.0.2:compile
[INFO] | \- org.xerial:sqlite-jdbc:jar:3.25.2:compile
[INFO] +- org.mycomp.processor:PLModel:jar:2.0.1myproj:compile
[INFO] +- org.mycomp.processor:PLEngines:jar:2.0.1myproj:compile
[INFO] | +- org.mycomp:LanguageDetection:jar:0.0.3:compile
[INFO] | +- org.mycomp:aligner:jar:0.1.0:compile
[INFO] | | +- org.apache.lucene:lucene-core:jar:5.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-analyzers-common:jar:5.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-misc:jar:5.4.1:compile
[INFO] | | +- com.lmax:disruptor:jar:3.2.0:compile
[INFO] | | \- javax.jms:javax.jms-api:jar:2.0.1:compile
[INFO] | +- org.zeromq:jeromq:jar:0.4.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.7.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.7.2:compile
[INFO] | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.3:compile
[INFO] | \- org.apache.lucene:lucene-analyzers-stempel:jar:5.4.1:compile
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- org.apache.logging.log4j:log4j:pom:2.17.1:compile
[INFO] +- org.apache.logging.log4j:log4j-core:pom:2.17.1:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.17.1:compile
[INFO] +- org.apache.logging.log4j:log4j-api:pom:2.17.1:compile
[INFO] +- org.apache.logging.log4j:log4j-1.2-api:pom:2.17.1:compile
[INFO] \- org.apache.logging.log4j:log4j-slf4j-impl:pom:2.17.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] \- org.apache.logging.log4j:log4j-core:jar:2.17.1:compile
[INFO]
[INFO] Reactor Summary:
[INFO]
[INFO] myproj_Docs2TMX ...................................... SUCCESS [ 0.355 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.898 s
[INFO] Finished at: 2022-01-18T13:17:36+01:00
[INFO] Final Memory: 41M/1963M
[INFO] ------------------------------------------------------------------------
It is a little bit trimmed to only show the information about the project that fails during the tests.

Missing Validators on tomcat

I am attempting to use hibernate validators with SpringBoot and Tomcat and yet continue to get this error
No validator could be found for constraint 'javax.validation.constraints.NotBlank'
I tried adding the following to my maven pom.xml without luck
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>7.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>4.0.0-RC2</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>7.0.1.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
It works locally when started by java so how can I fix this? I found this issue [HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String' but it didn't seem to fix my problems whenever I double checked that hibernate-validator was at version 7.
File causing issue can be seen here https://github.com/OntoloBridge/ontolobridge-project/blob/Authentication/src/main/java/edu/miami/schurer/ontolobridge/models/User.java
Here is my dependency Tree
[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) #
ontologbridge ---
[INFO] edu.miami.schurer:ontologbridge:war:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:2.0.5.RELEASE:compile
[INFO] | | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.0.8.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.0.8.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.0.8.RELEASE:compile
[INFO] +- org.postgresql:postgresql:jar:42.2.5:runtime
[INFO] +- io.jsonwebtoken:jjwt:jar:0.9.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.20:compile
[INFO] | \- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] +- org.apache.commons:commons-dbcp2:jar:2.1.1:compile
[INFO] | \- org.apache.commons:commons-pool2:jar:2.5.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:provided
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:provided
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3: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.0.9.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.5.RELEASE:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.7.9:compile
[INFO] | \- org.springframework:spring-jdbc:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.0.5.RELEASE:compile (optional)
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-mail:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework:spring-context-support:jar:5.0.9.RELEASE:compile
[INFO] | | \- com.sun.mail:javax.mail:jar:1.6.2:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- org.apache.tika:tika-core:jar:1.14:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-data-redis:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-redis:jar:2.0.10.RELEASE:compile
[INFO] | | | +- org.springframework.data:spring-data-keyvalue:jar:2.0.10.RELEASE:compile
[INFO] | | | \- org.springframework:spring-oxm:jar:5.0.9.RELEASE:compile
[INFO] | | \- io.lettuce:lettuce-core:jar:5.0.5.RELEASE:compile
[INFO] | | +- io.projectreactor:reactor-core:jar:3.1.9.RELEASE:compile
[INFO] | | | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.29.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.29.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.29.Final:compile
[INFO] | | | \- io.netty:netty-resolver:jar:4.1.29.Final:compile
[INFO] | | \- io.netty:netty-handler:jar:4.1.29.Final:compile
[INFO] | | \- io.netty:netty-codec:jar:4.1.29.Final:compile
[INFO] | +- it.ozimov:embedded-redis:jar:0.7.0:compile
[INFO] | | \- commons-io:commons-io:jar:2.5:compile
[INFO] | +- org.owasp.encoder:encoder:jar:1.2.1:compile
[INFO] | \- com.google.guava:guava:jar:21.0:compile
[INFO] +- com.opencsv:opencsv:jar:4.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | +- org.apache.commons:commons-text:jar:1.1:compile
[INFO] | \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | +- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.2.17.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.2.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.3.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.0.10.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.0.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-orm:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.0.9.RELEASE:compile
[INFO] +- io.sentry:sentry:jar:1.7.30:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] +- io.sentry:sentry-logback:jar:1.7.30:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | \- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:compile
[INFO] | \- jakarta.activation:jakarta.activation-api:jar:1.2.1:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.2:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:2.3.2:compile
[INFO] | +- com.sun.istack:istack-commons-runtime:jar:3.0.8:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:1.8.1:compile
[INFO] | \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.16:compile
[INFO] +- org.hibernate.validator:hibernate-validator:jar:7.0.1.Final:compile
[INFO] | +- jakarta.validation:jakarta.validation-api:jar:3.0.0:compile
[INFO] | \- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] +- org.glassfish:jakarta.el:jar:4.0.0-RC2:compile
[INFO] | \- jakarta.el:jakarta.el-api:jar:4.0.0-RC2:compile
[INFO] +- org.hibernate.validator:hibernate-validator-cdi:jar:7.0.1.Final:compile
[INFO] \- javax.validation:validation-api:jar:2.0.1.Final:compile
The issue appears to have been the spring-boot-email-core
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
Adding the following to the dependency fixed it
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</exclusion>
</exclusions>

High CPU utilization in Spring Cloud Loadbalancer application

after the redeploy operation of my application the cpu rises to 100%. So I have to restart Tomcat to free the cpu.
The the thread that consumes all the cpu is:
"reactor-http-epoll-1" #1569412 daemon prio=5 os_prio=0 tid=0x00007f53c010b000 nid=0x6155 runnable [0x00007f539237d000]
java.lang.Thread.State: RUNNABLE
at java.lang.Throwable.getStackTraceElement(Native Method)
at java.lang.Throwable.getOurStackTrace(Throwable.java:827)
- locked (a java.lang.NoClassDefFoundError)
at java.lang.Throwable.getStackTrace(Throwable.java:816)
at ch.qos.logback.classic.spi.ThrowableProxy.(ThrowableProxy.java:55)
at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.log(Logger.java:765)
at io.netty.util.internal.logging.LocationAwareSlf4JLogger.log(LocationAwareSlf4JLogger.java:50)
at io.netty.util.internal.logging.LocationAwareSlf4JLogger.warn(LocationAwareSlf4JLogger.java:202)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:387)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
The problem occurs only in redeploy operation. I replace - from shell - the war with the new version.
OS: RedHat 7.6 x86_64 (3.10.0-957.5.1.el7.x86_64)
Processor: 1 x Intel(R) Xeon(R) CPU E5-2687W v4 # 3.00GHz
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Server version: Apache Tomcat/9.0.7.redhat-12
Server built: Sep 7 2018 13:37:03 UTC
Server number: 9.0.7.0
OS Name: Linux
OS Version: 3.10.0-957.5.1.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_191-b12
JVM Vendor: Oracle Corporation
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<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-security</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-ribbon</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
The loadbalancer config using webflux (webclient).
#Configuration
#EnableAutoConfiguration
#LoadBalancerClients({ #LoadBalancerClient(value = "${loadbalancer.client.name}") })
public class LoadBalancerConfig implements WebMvcConfigurer {
#LoadBalanced
#Bean
RestTemplate restClient() {
return new RestTemplate();
}
#Bean
public ServiceInstanceListSupplier discoveryClientServiceInstanceListSupplier(DiscoveryClient discoveryClient, Environment env, ApplicationContext context, LoadBalancerProperties loadBalancerProperties) {
DiscoveryClientServiceInstanceListSupplier firstDelegate = new DiscoveryClientServiceInstanceListSupplier(discoveryClient, env);
HealthCheckServiceInstanceListSupplier delegate = new HealthCheckServiceInstanceListSupplier(firstDelegate, loadBalancerProperties.getHealthCheck(), WebClient.create());
/*
* ObjectProvider<LoadBalancerCacheManager> cacheManagerProvider = context
* .getBeanProvider(LoadBalancerCacheManager.class);
*
* if (cacheManagerProvider.getIfAvailable() != null) { return new
* CachingServiceInstanceListSupplier(delegate,
* cacheManagerProvider.getIfAvailable()); }
*/
return delegate;
}
}
dependency:tree
[INFO]
[INFO] -----------------------------------------------
[INFO] Building webapp 1.0.1
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) # webapp ---
[INFO] it.xxx:webapp:war:1.0.1
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.3.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.3.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.3.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.3.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.3.0.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.2:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.13.2:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.26:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.3.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:2.3.0.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.0:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.0:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.11.0:compile
[INFO] | | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.0:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.5.1:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.3.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.3.0.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.0:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.0:compile
[INFO] | +- org.springframework:spring-web:jar:5.2.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.2.6.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.2.6.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.2.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.3.0.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.2.6.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.3.2.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.3.2.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.3.2.RELEASE:compile
[INFO] +- org.thymeleaf.extras:thymeleaf-extras-springsecurity5:jar:3.0.4.RELEASE:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.3.0.RELEASE:compile
[INFO] | +- org.thymeleaf:thymeleaf-spring5:jar:3.0.11.RELEASE:compile
[INFO] | | \- org.thymeleaf:thymeleaf:jar:3.0.11.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.boot:spring-boot-starter-test:jar:2.3.0.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.3.0.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.3.0.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO] | +- org.assertj:assertj-core:jar:3.16.1:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.6.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.6.2:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.6.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.6.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.2:test
[INFO] | +- org.junit.vintage:junit-vintage-engine:jar:5.6.2:test
[INFO] | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | +- org.junit.platform:junit-platform-engine:jar:1.6.2:test
[INFO] | | \- junit:junit:jar:4.13:test
[INFO] | +- org.mockito:mockito-core:jar:3.3.3:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.10:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.10:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.3.3: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-core:jar:5.2.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.2.6.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.2.6.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.7.0:test
[INFO] +- org.webjars:bootstrap:jar:4.2.1:compile
[INFO] | +- org.webjars:jquery:jar:3.0.0:compile
[INFO] | \- org.webjars:popper.js:jar:1.14.3:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.2.6.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:2.2.6.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-context:jar:2.2.6.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-rsa:jar:1.0.9.RELEASE:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.64:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.64:compile
[INFO] | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.2.6.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-aop:jar:2.3.0.RELEASE:compile
[INFO] | | | \- org.aspectj:aspectjweaver:jar:1.9.5:compile
[INFO] | | \- io.github.openfeign.form:feign-form-spring:jar:3.8.0:compile
[INFO] | | +- io.github.openfeign.form:feign-form:jar:3.8.0:compile
[INFO] | | \- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] | +- io.github.openfeign:feign-core:jar:10.10.1:compile
[INFO] | +- io.github.openfeign:feign-slf4j:jar:10.10.1:compile
[INFO] | \- io.github.openfeign:feign-hystrix:jar:10.10.1:compile
[INFO] | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.1:runtime
[INFO] | | +- commons-configuration:commons-configuration:jar:1.8:runtime
[INFO] | | | \- commons-lang:commons-lang:jar:2.6:runtime
[INFO] | | \- com.google.guava:guava:jar:29.0-jre:runtime
[INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:runtime
[INFO] | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:runtime
[INFO] | | +- org.checkerframework:checker-qual:jar:2.11.1:runtime
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.3.4:runtime
[INFO] | | \- com.google.j2objc:j2objc-annotations:jar:1.3:runtime
[INFO] | \- com.netflix.hystrix:hystrix-core:jar:1.5.18:compile
[INFO] | \- io.reactivex:rxjava:jar:1.3.8:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-loadbalancer:jar:2.2.6.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-loadbalancer:jar:2.2.6.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-validation:jar:2.3.0.RELEASE:compile
[INFO] | | | \- org.hibernate.validator:hibernate-validator:jar:6.1.5.Final:compile
[INFO] | | | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] | | | \- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | | +- io.projectreactor:reactor-core:jar:3.3.5.RELEASE:compile
[INFO] | | | \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | | \- io.projectreactor.addons:reactor-extra:jar:3.3.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-cache:jar:2.3.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-context-support:jar:5.2.6.RELEASE:compile
[INFO] | \- com.stoyanr:evictor:jar:1.0.0:compile
[INFO] +- org.springframework.cloud:spring-cloud-commons:jar:2.2.6.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-crypto:jar:5.3.2.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:2.3.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.3.0.RELEASE:compile
[INFO] | | \- io.projectreactor.netty:reactor-netty:jar:0.9.7.RELEASE:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.49.Final:compile
[INFO] | | | +- io.netty:netty-common:jar:4.1.49.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.49.Final:compile
[INFO] | | | +- io.netty:netty-transport:jar:4.1.49.Final:compile
[INFO] | | | \- io.netty:netty-codec:jar:4.1.49.Final:compile
[INFO] | | +- io.netty:netty-codec-http2:jar:4.1.49.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.1.49.Final:compile
[INFO] | | | \- io.netty:netty-resolver:jar:4.1.49.Final:compile
[INFO] | | +- io.netty:netty-handler-proxy:jar:4.1.49.Final:compile
[INFO] | | | \- io.netty:netty-codec-socks:jar:4.1.49.Final:compile
[INFO] | | \- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.49.Final:compile
[INFO] | | \- io.netty:netty-transport-native-unix-common:jar:4.1.49.Final:compile
[INFO] | +- org.springframework:spring-webflux:jar:5.2.6.RELEASE:compile
[INFO] | \- org.synchronoss.cloud:nio-multipart-parser:jar:1.1.0:compile
[INFO] | \- org.synchronoss.cloud:nio-stream-storage:jar:1.1.3:compile
[INFO] +- it.xxx:type:jar:1.0-SNAPSHOT:compile
[INFO] | \- org.projectlombok:lombok:jar:1.18.12:compile
[INFO] +- it.xxx:utility:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-context:jar:5.2.6.RELEASE:compile
[INFO] | +- javax.mail:mail:jar:1.4.7:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.10:compile
[INFO] | +- org.modelmapper:modelmapper:jar:2.1.0:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | \- io.jsonwebtoken:jjwt:jar:0.9.1:compile
[INFO] +- org.json:json:jar:20190722:compile
[INFO] +- commons-validator:commons-validator:jar:1.6:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] | +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] \- org.springframework.boot:spring-boot-starter-tomcat:jar:2.3.0.RELEASE:provided
[INFO] +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.35:provided
[INFO] +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.35:provided
Thanks!

neo4j 3.3.3 Cannot query embedded db because No dependency satisfies type interface org.neo4j.kernel.impl.query.QueryExecutionEngine

I try to use embedded neo4j and I have few questions
1.
Why embedded db has different structure than standalone so I cannot point view db in desktop app - embedded db doesn't produces dbms folder and no graph.db
2.
I cannot query embedded db using cypher, I can query using db.findNodes etc. I am getting
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.bolt.v1.runtime.BoltFactoryImpl#4917d36b' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.kernel.impl.query.QueryExecutionEngine".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.extension.KernelExtensions.start(KernelExtensions.java:84)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.kernel.impl.query.QueryExecutionEngine
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:73)
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:68)
at org.neo4j.graphdb.DependencyResolver$Adapter.resolveDependency(DependencyResolver.java:101)
at org.neo4j.bolt.v1.runtime.BoltFactoryImpl.start(BoltFactoryImpl.java:71)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
I've started with
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.3.3</version>
</dependency>
but quickly ended up with
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.3.3</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-slf4j</artifactId>
<version>3.3.3</version>
</dependency>
--- advised by [SO issue][1]
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-3.3</artifactId>
<version>3.3.3</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-frontend-3.3</artifactId>
<version>3.3.3</version>
</dependency>
-- advised by friend :]
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>3.3.3</version>
</dependency>
the error shows that neo has problem with bolt which is nowhere explicitly declared, when I removed neo4j-server (which inlcudes bolt) I get
java.lang.UnsupportedOperationException: No query engine installed.
at org.neo4j.kernel.impl.query.NoQueryEngine.noQueryEngine(NoQueryEngine.java:63) ~[neo4j-kernel-3.3.3.jar:3.3.3,13ce0dc2e5eb1d72cc4e8df41612e4ec136c83e3]
at org.neo4j.kernel.impl.query.NoQueryEngine.executeQuery(NoQueryEngine.java:34) ~[neo4j-kernel-3.3.3.jar:3.3.3,13ce0dc2e5eb1d72cc4e8df41612e4ec136c83e3]
at org.neo4j.kernel.impl.factory.ClassicCoreSPI.executeQuery(ClassicCoreSPI.java:80) ~[neo4j-kernel-3.3.3.jar:3.3.3,13ce0dc2e5eb1d72cc4e8df41612e4ec136c83e3]
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.execute(GraphDatabaseFacade.java:451) ~[neo4j-kernel-3.3.3.jar:3.3.3,13ce0dc2e5eb1d72cc4e8df41612e4ec136c83e3]
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.execute(GraphDatabaseFacade.java:434) ~[neo4j-kernel-3.3.3.jar:3.3.3,13ce0dc2e5eb1d72cc4e8df41612e4ec136c83e3]
at com.codewise.voluum.dsp.bidder.it.neo4j.IndexManager.read(IndexManager.java:94) [test-classes/:?]
at com.codewise.voluum.dsp.bidder.it.neo4j.IndexReader$Reader.run(IndexReader.java:105) [test-classes/:?]
Actually I am lost as implementation of Query engine is in neo4j-kernel (which is available) but for some reason is not chosen. Maybe someone would like to see maven dependencies
[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli)
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.3:compile
[INFO] +- org.neo4j:neo4j:jar:3.3.3:compile
[INFO] | +- org.neo4j:neo4j-kernel:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-graphdb-api:jar:3.3.3:compile
[INFO] | | | \- org.neo4j:neo4j-resource:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-common:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-values:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-collections:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-primitive-collections:jar:3.3.3:compile
[INFO] | | | \- org.neo4j:neo4j-unsafe:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-io:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-csv:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-lucene-upgrade:jar:3.3.3:compile
[INFO] | | | \- org.apache.lucene:lucene-backward-codecs:jar:5.5.2:compile
[INFO] | | +- org.neo4j:neo4j-configuration:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-index:jar:3.3.3:compile
[INFO] | | \- org.neo4j:neo4j-ssl:jar:3.3.3:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.53:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.53:compile
[INFO] | +- org.neo4j:neo4j-lucene-index:jar:3.3.3:compile
[INFO] | | +- org.apache.lucene:lucene-analyzers-common:jar:5.5.2:compile
[INFO] | | +- org.apache.lucene:lucene-core:jar:5.5.2:compile
[INFO] | | +- org.apache.lucene:lucene-queryparser:jar:5.5.2:compile
[INFO] | | \- org.apache.lucene:lucene-codecs:jar:5.5.0:compile
[INFO] | +- org.neo4j:neo4j-graph-algo:jar:3.3.3:compile
[INFO] | +- org.neo4j:neo4j-udc:jar:3.3.3:compile
[INFO] | +- org.neo4j:neo4j-cypher:jar:3.3.3:compile
[INFO] | | +- org.neo4j:neo4j-graph-matching:jar:3.1.6:compile
[INFO] | | +- org.neo4j:neo4j-codegen:jar:3.3.3:compile
[INFO] | | | +- org.ow2.asm:asm:jar:5.2:compile
[INFO] | | | +- org.ow2.asm:asm-util:jar:5.2:compile
[INFO] | | | +- org.ow2.asm:asm-analysis:jar:5.2:compile
[INFO] | | | \- org.ow2.asm:asm-tree:jar:5.2:compile
[INFO] | | +- org.neo4j:neo4j-cypher-compiler-2.3:jar:2.3.12:compile
[INFO] | | | +- org.neo4j:neo4j-cypher-frontend-2.3:jar:2.3.12:compile
[INFO] | | | \- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4.2:compile
[INFO] | | +- org.neo4j:neo4j-cypher-compiler-3.1:jar:3.1.6:compile
[INFO] | | | \- org.neo4j:neo4j-cypher-frontend-3.1:jar:3.1.6:compile
[INFO] | | +- org.neo4j:neo4j-cypher-compiler-3.2:jar:3.2.9:compile
[INFO] | | | +- org.neo4j:neo4j-cypher-frontend-3.2:jar:3.2.9:compile
[INFO] | | | \- org.neo4j:neo4j-cypher-ir-3.2:jar:3.2.9:compile
[INFO] | | \- net.sf.opencsv:opencsv:jar:2.3:compile
[INFO] | +- org.neo4j:neo4j-jmx:jar:3.3.3:compile
[INFO] | \- org.neo4j:neo4j-consistency-check:jar:3.3.3:compile
[INFO] | +- org.neo4j:neo4j-command-line:jar:3.3.3:compile
[INFO] | | \- org.apache.commons:commons-text:jar:1.1:compile
[INFO] | \- org.neo4j:neo4j-dbms:jar:3.3.3:compile
[INFO] | +- org.neo4j:neo4j-import-tool:jar:3.3.3:compile
[INFO] | \- org.apache.commons:commons-compress:jar:1.14:compile
[INFO] +- org.neo4j:neo4j-slf4j:jar:3.3.3:compile
[INFO] | \- org.neo4j:neo4j-logging:jar:3.3.3:compile
[INFO] +- org.neo4j:neo4j-cypher-compiler-3.3:jar:3.3.3:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.11.7:compile
[INFO] | +- org.scala-lang:scala-reflect:jar:2.11.12:compile
[INFO] | +- org.neo4j:neo4j-cypher-ir-3.3:jar:3.3.3:compile
[INFO] | +- org.neo4j:neo4j-cypher-logical-plans-3.3:jar:3.3.3:compile
[INFO] | \- org.parboiled:parboiled-scala_2.11:jar:1.1.7:compile
[INFO] | \- org.parboiled:parboiled-core:jar:1.1.7:compile
[INFO] +- org.neo4j:neo4j-cypher-frontend-3.3:jar:3.3.3:compile
[INFO] +- com.google.guava:guava:jar:22.0:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.0.18:compile
[INFO] | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- pl.pragmatists:JUnitParams:jar:1.0.3:test
[INFO] +- org.assertj:assertj-core:jar:3.6.1:test
[INFO] +- org.mockito:mockito-all:jar:1.10.19:test
[INFO] +- com.jayway.awaitility:awaitility:jar:1.7.0:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- cglib:cglib-nodep:jar:3.1:test
[INFO] | \- org.objenesis:objenesis:jar:2.1:test
[INFO] \- org.springframework:spring-test:jar:4.3.7.RELEASE:test
[INFO] \- org.springframework:spring-core:jar:4.3.7.RELEASE:compile
[INFO] \- commons-logging:commons-logging:jar:1.2:compile

Categories

Resources