Not able to run RichFaces, getting different kind of exceptions - maven

I have developed a sample JSF application and it is running fine but I am having hardtime to run RichFaces example in JSF.
My runtime environment details: Weblogic 12.1.2, JEE 6 and JSF 2.0.
I downloaded below JARs and placed then in my WEB-INF/lib but it doesn't work.
richfaces-4.5.0.Final.jar
richfaces-a4j-4.5.0.Final.jar
richfaces-core-4.5.0.Final.jar
With these JARs, when I started my server I got class not found exception related to AtmosphereServlet so I included atmosphere-runtime-1.0.2.jar JAR and then I was getting java.lang.ClassNotFoundException: org.reflections.scanners.AbstractScanner exception.
org.reflections.scanners.AbstractScanner was not from a very popular JAR and only JAR I found for this was here. Even though I was not convinced that I should use this but still to try out I added this and then I was getting java.lang.ClassNotFoundException: org.apache.catalina.CometProcessor.
To resolve this I added this JAR. Now, I am getting java.lang.ClassNotFoundException: org.jboss.servlet.http.HttpEventServlet exception.
I am totally convinced that I am not heading in right direction because like this I may end up adding Tomcat and Jboss/Wildfly JARs in my classpath.
I searched blogs there is no clear post saying that with these JARs RichFaces works, whatever JARs were mentioned in the post I added all, at this moment I have following JARs but still have the same exception:
atmosphere-runtime-1.0.2.jar
commons-beanutils-1.8.0.jar
commons-logging-1.0.4.jar
guava-19.0.jar
richfaces-4.5.0.Final.jar
richfaces-core-4.5.0.Final.jar
catalina-comet.jar
commons-collections-3.2.jar
cssparser-0.9.18.jar
reflections-0.9.6_jboss_errai_r2.jar
richfaces-a4j-4.5.0.Final.jar
sac-1.3.jar
Another problem I am facing is that I don't know Maven so I am not able to resolve the dependencies using it, I tried below pom.xml but nothing works, it doesn't download any JAR, it simply builds some almost useless JAR.
<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>org.jvi.weblogic.jms</groupId>
<artifactId>jms-producer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jms-producer</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>4.2.2.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<!--version>4.2.2.Final</version-->
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<!--version>4.2.2.Final</version-->
</dependency>
</dependencies>
</dependencyManagement>
</project>
Could someone please guide and help me to run RichFaces in my JSF application.
P.S.: I am able to run PrimeFaces but RichFaces dependencies looks very bad.
UPDATE 1: I also followed the official documentation and downloaded the distribution from here and had below mentioned JARs but still no help.
cssparser-0.9.18.jar
guava-19.0.jar
richfaces-a4j-4.5.17.Final.jar
richfaces-core-4.5.17.Final.jar
richfaces-page-fragments-4.5.17.Final.jar
richfaces-rich-4.5.17.Final.jar sac-1.3.jar

I had got it working. Below are the RichFaces JARs which would work with JEE 6 container and JSF 2.0; this is tested and RichFaces works with these JARs in WEB-INF/lib
richfaces-components-api-4.0.0.Final.jar
richfaces-core-api-4.0.0.Final.jar
richfaces-components-ui-4.0.0.Final.jar
richfaces-core-impl-4.0.0.Final.jar
cssparser-0.9.18.jar
sac-1.3.jar
Last 2 JARs are the dependencies.

Related

Starting Quarkus in Dev Mode results in NoSuchMethodError: org.jboss.threads.JBossExecutors.rejectingExecutor()Ljava/util/concurrent/Executor

I am currently migrating a java web application to quarkus. After having migrated all code parts and done most adaptions, I wanted to try it out by running the app in dev mode:
./mvnw compile quarkus:dev
But it crashes right at the beginning with a NoSuchMethodError for java/util/concurrent/Executor:
2022-04-01 18:07:06,022 INFO [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2022-04-01 18:07:07,444 INFO [org.jbo.threads] (main) JBoss Threads version 2.3.3.Final
2022-04-01 18:07:07,451 ERROR [io.qua.dep.dev.DevModeMain] (main) Quarkus dev mode failed to start: java.lang.NoSuchMethodError: org.jboss.threads.JBossExecutors.rejectingExecutor()Ljava/util/concurrent/Executor;
at io.quarkus.vertx.core.runtime.QuarkusExecutorFactory.internalCreateExecutor(QuarkusExecutorFactory.java:48)
at io.quarkus.vertx.core.runtime.QuarkusExecutorFactory.createExecutor(QuarkusExecutorFactory.java:42)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:161)
at io.vertx.core.impl.VertxBuilder.vertx(VertxBuilder.java:225)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder.initialize(VertxCoreRecorder.java:236)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$VertxSupplier.get(VertxCoreRecorder.java:577)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$VertxSupplier.get(VertxCoreRecorder.java:559)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServerAfterFailedStart(VertxHttpRecorder.java:208)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup.handleFailedInitialStart(VertxHttpHotReplacementSetup.java:61)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.startupFailed(RuntimeUpdatesProcessor.java:1145)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:168)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:455)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:66)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:140)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:96)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:132)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodError: org.jboss.threads.JBossExecutors.rejectingExecutor()Ljava/util/concurrent/Executor;
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:138)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: java.lang.NoSuchMethodError: org.jboss.threads.JBossExecutors.rejectingExecutor()Ljava/util/concurrent/Executor;
at io.quarkus.vertx.core.runtime.QuarkusExecutorFactory.internalCreateExecutor(QuarkusExecutorFactory.java:48)
at io.quarkus.vertx.core.runtime.QuarkusExecutorFactory.createExecutor(QuarkusExecutorFactory.java:42)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:161)
at io.vertx.core.impl.VertxBuilder.vertx(VertxBuilder.java:225)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder.initialize(VertxCoreRecorder.java:236)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$VertxSupplier.get(VertxCoreRecorder.java:577)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$VertxSupplier.get(VertxCoreRecorder.java:559)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServerAfterFailedStart(VertxHttpRecorder.java:208)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup.handleFailedInitialStart(VertxHttpHotReplacementSetup.java:61)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.startupFailed(RuntimeUpdatesProcessor.java:1145)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:168)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:455)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:66)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:140)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:96)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:132)
... 1 more
The app uses a ScheduledExecutorService, that is being created like this:
#ApplicationScoped
public class ExecutorInit {
#Produces
#ApplicationScoped
public ScheduledExecutorService getScheduledExecutorService(
#ConfigProperty(name = "systemRuntime.threadPoolSize") Integer threadPoolSize) {
return Executors.newScheduledThreadPool(threadPoolSize);
}
}
I suspect this to be involved in the error, but I am currently lacking the understanding why this is happening or what I could possibly do about it.
(if you want to try it out yourself, checkout: https://github.com/labsai/EDDI/tree/version-5)
Maven pom.xml config version:
<properties>
<dependency.version.lombok>1.18.22</dependency.version.lombok>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<jandex-maven-plugin.version>1.2.2</jandex-maven-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>2.7.5.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.7.5.Final</quarkus.platform.version>
<quarkus.jgit.version>1.2.0</quarkus.jgit.version>
<quarkus.microprofile.version>2.4.1.Final</quarkus.microprofile.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
<failsafe-plugin.version>3.0.0-M5</failsafe-plugin.version>
<war-plugin.version>3.3.2</war-plugin.version>
</properties>
(https://github.com/labsai/EDDI/blob/version-5/pom.xml)
I still don't know the root cause of the issue described above, but here is what i did to overcome it:
added this dependency to my pom.xml
<dependency>
<groupId>org.jboss.threads</groupId>
<artifactId>jboss-threads</artifactId>
<version>3.4.2.Final</version>
<scope>provided</scope>
</dependency>
While i had other errors in my migration code, they were not being displayed anywhere until I overcame the described problem by providing this dependency.
After having fixed several other likely unrelated issues, i didn't seem to need this dependency anymore.
While this step is not a real solution, it helped my to proceed further and unveil other issues that were not being displayed at first.

Maven: module-info.java:[6,21] module not found: org.slf4j

I'm currently migrating a project to Java 11 (i.e. >= 9) and because JavaFX seems not to work without modules, anymore, I'm currently adding module-info.java files to all sub-projects. But I get the following error:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/mangu/workspace/cloudstore.2/co.codewizards.java9test.project1/src/main/java/module-info.java:[6,21] module not found: org.slf4j
[INFO] 1 error
I'm running OpenJDK 11.0.3, Maven 3.6.1 (embedded in Eclipse 2019-06) and I definitely have the dependency for the module org.slf4j declared in my pom.xml!
In order to simplify things, I created a little, minimal test-project causing the same error.
Here's the test-project's pom.xml:
<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>co.codewizards.java9test</groupId>
<artifactId>co.codewizards.java9test.project1</artifactId>
<version>0.1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>9</maven.compiler.source>
<maven.compiler.target>9</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.8.0-beta4</version>
</dependency>
</dependencies>
</project>
I tried both: 1.8.0-beta4 and 2.0.0-alpha0. Eclipse shows me an existing module-info.class in both JARs (i.e. currently inside slf4j-api-1.8.0-beta4.jar).
Here's the module-info.java:
module co.codewizards.java9test.project1 {
requires java.base;
requires java.se;
requires org.slf4j;
}
And here's the output from mvn clean install -Dmaven.test.skip=true -X (but run inside Eclipse): mvn.log
Any idea what I'm doing wrong?
Update: I just uploaded the little test project: co.codewizards.java9test.project1.7z
Your maven logs show slf4j-api being placed on the classpath, not modulepath.
You need to upgrade the version of maven-compiler-plugin, as modulepath is supported only since version 3.6, whereas your build uses version 3.1.
I was getting the same issue due to older verion of slf4j was coming from one of dependency in pom. So I resolved it by adding below slf4j dependency to my pom :
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.29</version>
</dependency>
module-info:
module my.service {
requires org.slf4j;
}

Spring boot application suddenly fails to start. SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

I m new to spring. I was writing spring boot applications with maven in last few days and had no issue in building or running on windows with STS. Then today for packaging i created a new project and and tried to build it with maven using win command prompt. Build failed and said that theres no compiler set("Perhaps your'e using a JRE"). Then I set JAVA_HOME in system variables and retried but then it started giving me
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"
SLF4J: Defaulting to no-operation (NOP) logger implementation
....
Caused by:
java.lang.ClassNotFoundException:ch.qos.logback.classic.turbo.TurboFilter
Now I can't run any app which were working fine earlier either with STS/Eclipse, that error pops up.
I deleted .m2 and rebuilt.still not working.
Tried in a different windows pc with a fresh STS installation. It also doesn't work. this pops up.
Did they change libraries?
I deleted JAVA_HOME and retried.But no success.
I'm using a pretty simple pom and an application.
<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>com.pmanu</groupId>
<artifactId>testMaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
</project>
AppStart.java
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#RestController
#SpringBootApplication
public class AppStart {
public static void main(String[] args) {
SpringApplication.run(AppStart.class, args);
}
#RequestMapping("/")
public String get(){
return "Hello";
}
}
Please Help. I'd prefer to go ahead with spring 1.5.6.RELEASE artifacts.
I saw some answers saying that a logging jar like log4j has to be added to classpath.
But isn't maven parent supposed to have them configured? If there's any other proper way I'd prefer not to add an unnecessay dependancy for my applications.
How come this arised all of a sudden?

Spring boot 2.0.0.M1 NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>

I used the starter page on https://start.spring.io/ to generate a project with a number of included modules
When I try to run the tests I get a lot of log info but these lines seem key
10:29:33.198 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [Inlined Test Properties] PropertySource with highest search precedence
10:29:33.364 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [file:/C:/privilege/target/surefire/surefirebooter1615922581175854972.jar]
10:29:33.369 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:157)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:98)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:64)
The modules that I selected are:
Security
AOP
Web Jersey (JAX-RS)
Rest Repositories
DevTools
Cache
Session
Mobile
REST
Docs
Thymeleaf
MongoDB
Zuul
Zookeeper Discovery
Solr
Cloud
OAuth2
Lombok
Retry
I had to make a few mods to the generated pom but I think that I have a reasonable set of versions.
From the "effective pom" generated by STS, get the following properties:
<spring-batch.version>4.0.0.M2</spring-batch.version>
<undertow.version>1.4.14.Final</undertow.version>
<httpclient.version>4.5.3</httpclient.version>
<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
<webjars-locator.version>0.32-1</webjars-locator.version>
<spring-ldap.version>2.3.1.RELEASE</spring-ldap.version>
<spring-security-oauth.version>2.1.0.RELEASE</spring-security-oauth.version>
<hibernate.version>5.2.10.Final</hibernate.version>
<groovy.version>2.4.11</groovy.version>
<rxjava2.version>2.1.0</rxjava2.version>
<byte-buddy.version>1.6.14</byte-buddy.version>
<spring-social-linkedin.version>2.0.0.M2</spring-social-linkedin.version>
<jmustache.version>1.13</jmustache.version>
<spring-cloud-connectors.version>2.0.0.M1</spring-cloud-connectors.version>
<mockito.version>2.7.22</mockito.version>
<reactor-bom.version>Bismuth-M1</reactor-bom.version>
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
<java.version>1.8</java.version>
<bitronix.version>2.1.4</bitronix.version>
<commons-beanutils.version>1.9.3</commons-beanutils.version>
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
<atomikos.version>3.9.3</atomikos.version>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<jersey.version>2.25.1</jersey.version>
<jaxen.version>1.1.6</jaxen.version>
<caffeine.version>2.5.0</caffeine.version>
<couchbase-cache-client.version>2.1.0</couchbase-cache-client.version>
<sun-mail.version>1.6.0-rc1</sun-mail.version>
<lettuce.version>5.0.0.M2</lettuce.version>
<wsdl4j.version>1.6.3</wsdl4j.version>
<jedis.version>2.9.0</jedis.version>
<javax-mail.version>1.6.0-rc1</javax-mail.version>
<lombok.version>1.16.16</lombok.version>
<maven-failsafe-plugin.version>2.18.1</maven-failsafe-plugin.version>
<activemq.version>5.14.5</activemq.version>
<spring-security-jwt.version>1.0.7.RELEASE</spring-security-jwt.version>
<spring-mobile.version>2.0.0.M1</spring-mobile.version>
<log4j2.version>2.8.2</log4j2.version>
<hazelcast-hibernate5.version>1.2.1</hazelcast-hibernate5.version>
<janino.version>3.0.7</janino.version>
<aspectj.version>1.8.10</aspectj.version>
<versions-maven-plugin.version>2.3</versions-maven-plugin.version>
<spring-kafka.version>2.0.0.M2</spring-kafka.version>
<tomcat.version>8.5.15</tomcat.version>
<postgresql.version>42.1.1</postgresql.version>
<statsd-client.version>3.1.0</statsd-client.version>
<spring-social-twitter.version>2.0.0.M2</spring-social-twitter.version>
<flyway.version>4.2.0</flyway.version>
<snakeyaml.version>1.18</snakeyaml.version>
<maven-enforcer-plugin.version>1.4</maven-enforcer-plugin.version>
<spring-cloud-starter-zuul.version>1.3.0.RELEASE</spring-cloud-starter-zuul.version>
<resource.delimiter>#</resource.delimiter>
<maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
<spring-cloud-starter-zookeeper-discovery.version>1.1.0.RELEASE</spring-cloud-starter-zookeeper-discovery.version>
<assertj.version>3.7.0</assertj.version>
<hikaricp.version>2.6.1</hikaricp.version>
<nekohtml.version>1.9.22</nekohtml.version>
<jest.version>2.4.0</jest.version>
<javax-transaction.version>1.2</javax-transaction.version>
<hazelcast.version>3.8.1</hazelcast.version>
<glassfish-el.version>3.0.0</glassfish-el.version>
<mariadb.version>2.0.1</mariadb.version>
<javax-validation.version>1.1.0.Final</javax-validation.version>
<thymeleaf-extras-java8time.version>3.0.0.RELEASE</thymeleaf-extras-java8time.version>
<spring-social.version>2.0.0.M3</spring-social.version>
<spring-security.version>5.0.0.M1</spring-security.version>
<solr.version>6.5.1</solr.version>
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
<neo4j-ogm.version>3.0.0-M01</neo4j-ogm.version>
<servlet-api.version>3.1.0</servlet-api.version>
<joda-time.version>2.9.9</joda-time.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<hibernate-validator.version>5.4.1.Final</hibernate-validator.version>
<jaybird.version>3.0.0</jaybird.version>
<commons-collections.version>3.2.2</commons-collections.version>
<liquibase.version>3.5.3</liquibase.version>
<maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
<embedded-mongo.version>2.0.0</embedded-mongo.version>
<spring-integration.version>5.0.0.M4</spring-integration.version>
<querydsl.version>4.1.4</querydsl.version>
<mongodb.version>3.4.2</mongodb.version>
<commons-codec.version>1.10</commons-codec.version>
<antlr2.version>2.7.7</antlr2.version>
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
<xml-apis.version>1.4.01</xml-apis.version>
<selenium.version>3.4.0</selenium.version>
<jetty-el.version>8.5.9.1</jetty-el.version>
<maven-help-plugin.version>2.2</maven-help-plugin.version>
<jetty.version>9.4.5.v20170502</jetty.version>
<ehcache.version>2.10.4</ehcache.version>
<mssql-jdbc.version>6.1.0.jre8</mssql-jdbc.version>
<spring-retry.version>1.2.0.RELEASE</spring-retry.version>
<mongo-driver-reactivestreams.version>1.3.0</mongo-driver-reactivestreams.version>
<ehcache3.version>3.3.1</ehcache3.version>
<simple-json.version>1.1.1</simple-json.version>
<couchbase-client.version>2.4.5</couchbase-client.version>
<narayana.version>5.5.24.Final</narayana.version>
<freemarker.version>2.3.26-incubating</freemarker.version>
<infinispan.version>8.2.6.Final</infinispan.version>
<unboundid-ldapsdk.version>3.2.1</unboundid-ldapsdk.version>
<httpasyncclient.version>4.1.3</httpasyncclient.version>
<thymeleaf-extras-springsecurity4.version>3.0.2.RELEASE</thymeleaf-extras-springsecurity4.version>
<spring-social-facebook.version>3.0.0.M2</spring-social-facebook.version>
<classmate.version>1.3.3</classmate.version>
<artemis.version>1.5.4</artemis.version>
<spring-plugin.version>1.2.0.RELEASE</spring-plugin.version>
<spring.version>5.0.0.RC1</spring.version>
<selenium-htmlunit.version>2.26</selenium-htmlunit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<appengine-sdk.version>1.9.53</appengine-sdk.version>
<rxjava.version>1.3.0</rxjava.version>
<maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
<netty.version>4.1.11.Final</netty.version>
<commons-dbcp2.version>2.1.1</commons-dbcp2.version>
<htmlunit.version>2.26</htmlunit.version>
<jboss-transaction-spi.version>7.6.0.Final</jboss-transaction-spi.version>
<hamcrest.version>1.3</hamcrest.version>
<spring-cloud-starter-oauth2.version>1.2.0.RELEASE</spring-cloud-starter-oauth2.version>
<junit.version>4.12</junit.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<javax-cache.version>1.0.0</javax-cache.version>
<build-helper-maven-plugin.version>1.10</build-helper-maven-plugin.version>
<javax-jms.version>2.0.1</javax-jms.version>
<jtds.version>1.3.1</jtds.version>
<mysql.version>5.1.42</mysql.version>
<slf4j.version>1.7.25</slf4j.version>
<git-commit-id-plugin.version>2.2.2</git-commit-id-plugin.version>
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
<derby.version>10.13.1.1</derby.version>
<thymeleaf-layout-dialect.version>2.2.1</thymeleaf-layout-dialect.version>
<jooq.version>3.9.2</jooq.version>
<logback.version>1.2.3</logback.version>
<maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
<thymeleaf-spring5.version>3.0.6.M4</thymeleaf-spring5.version>
<rxjava-adapter.version>1.2.1</rxjava-adapter.version>
<spring-restdocs.version>1.2.1.RELEASE</spring-restdocs.version>
<jsonassert.version>1.5.0</jsonassert.version>
<spring-session.version>2.0.0.M1</spring-session.version>
<elasticsearch.version>2.4.5</elasticsearch.version>
<spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version>
<httpcore.version>4.4.6</httpcore.version>
<sqlite-jdbc.version>3.16.1</sqlite-jdbc.version>
<dom4j.version>1.6.1</dom4j.version>
<thymeleaf-extras-data-attribute.version>2.0.1</thymeleaf-extras-data-attribute.version>
<jdom2.version>2.0.6</jdom2.version>
<javassist.version>3.21.0-GA</javassist.version>
<jetty-jsp.version>2.2.0.v201112011158</jetty-jsp.version>
<json-path.version>2.2.0</json-path.version>
<spring-hateoas.version>0.23.0.RELEASE</spring-hateoas.version>
<spring.boot.version>2.0.0.M1</spring.boot.version>
<sendgrid.version>3.2.0</sendgrid.version>
<spring-data-releasetrain.version>Kay-M3</spring-data-releasetrain.version>
<spring-ws.version>2.4.0.RELEASE</spring-ws.version>
<dropwizard-metrics.version>3.2.2</dropwizard-metrics.version>
<commons-pool.version>1.6</commons-pool.version>
<jboss-logging.version>3.3.1.Final</jboss-logging.version>
<jstl.version>1.2</jstl.version>
<webjars-hal-browser.version>3325375</webjars-hal-browser.version>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<gson.version>2.8.0</gson.version>
<h2.version>1.4.195</h2.version>
<cassandra-driver.version>3.2.0</cassandra-driver.version>
<jolokia.version>1.3.6</jolokia.version>
<maven-assembly-plugin.version>2.6</maven-assembly-plugin.version>
<commons-digester.version>2.1</commons-digester.version>
<jackson.version>2.9.0.pr3</jackson.version>
<jna.version>4.4.0</jna.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven.compiler.target>1.8</maven.compiler.target>
<commons-lang3.version>3.5</commons-lang3.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<thymeleaf.version>3.0.6.RELEASE</thymeleaf.version>
<commons-pool2.version>2.4.2</commons-pool2.version>
<maven-site-plugin.version>3.5.1</maven-site-plugin.version>
<maven-invoker-plugin.version>1.10</maven-invoker-plugin.version>
<spring-amqp.version>2.0.0.M4</spring-amqp.version>
<maven.compiler.source>1.8</maven.compiler.source>
<hsqldb.version>2.4.0</hsqldb.version>
The constructor of SpringApplicationBuilder has recently been changed in spring-boot 2.0.0.M1.
I had the same problem, but after updating to spring-cloud Finchley.BUILD-SNAPSHOT it disappeared. However, that's the version I see in your properties above.
In the end, I'm not exactly sure what causes your problem (and maybe shouldn't post this as an answer, but it's too long for a comment) but maybe that's a start for further investigation.
Since 2.0.0.M1 is not stable, you may want to wait for spring-boot 2.0.0 to be released. Otherwise, try deleting your local SNAPSHOT versions of spring.
I'll update this answer if I figure out more.
Just check spring-cloud-starter server version compatibility with spring-boot-starter-parent. This will help and it will resolve
15:49:31.609 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:125)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:89)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:62)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:364)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265)
In my case I've resolved this using spring-boot-starter-parent version 2.0.5.RELEASE and spring-cloud-starter-netflix-eureka-server with version Finchley.SR1.
Also added spring-cloud-starter-config dependencies with it.
Thanks and Hope It will help you.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
adding above tag for
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
resolved my problem, it's issue with spring - cloud and spring 2.1.x versions
Just complementing #Michel Jung's answer, I just needed to keep the spring-boot version as the same:
2.0.4.RELEASE
And add the Finchley.RELEASE's mavenBom as recommended here:
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Finchley.RELEASE"
}
}
repositories {
maven {
url 'https://repo.spring.io/libs-milestone'
}
}
You need to check the consistency between Spring boot version and Release train version. Full documentation is HERE
You need to check Table 1. Release train Spring Boot compatibility
For example, if you use Spring Boot 2.4.x version, consistent Release train is 2020.0.x
For 2.2.0.RELEASE Spring Boot version compatible Release Train is Hoxton.RELEASE
In the dependencies it looks like:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.0.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.11</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Usually these factors are very simple, just find all dependencies with prefix "spring",
find out them have difference with the train version.
see
I think it is mainly happening because of the spring-cloud version. I am using 2.1.8.RELEASE of spring-boot-starter-parent and here are my findings
Tried by spring-cloud Camden.SR6 - Didn't work.
Tried by spring-cloud Finchley.SR1 - It worked this time.
I had this same problem in Java 8 while doing a project with the feign dependency, but I fixed it by changing it to the following:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.0.1.RELEASE</version>`
</dependency>

spring-boot upgrade from 1.3.2 to 1.3.3: logback issue

We've hit an issue when upgrading from spring-boot 1.3.2 to the recently released 1.3.3.
Our application has been making use of the following dependencies, each the latest, without issue:
<neo4j.version>2.3.2</neo4j.version>
<sdn.version>4.0.0.RELEASE</sdn.version>
<sdn.rest.version>3.4.0.RELEASE</sdn.rest.version>
<neo4j.ogm.version>1.1.5</neo4j.ogm.version>
Today I upgraded our spring-boot and Spring Data Neo4j -based application, which starts and works well with spring-boot 1.3.2.RELEASE, by changing the pom.xml from:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.2.RELEASE</version>
</parent>
to
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
</parent>
With this being literally the only change, the application now fails to start with the following error:
...
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.AbstractMethodError: ch.qos.logback.classic.pattern.EnsureExceptionHandling.process(Lch/qos/logback/core/pattern/Converter;)V
at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:88)
at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28)
at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167)
at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:143)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:122)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:378)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:328)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
at com.mycompany.Application.<clinit>(Application.java:35)
As expected, returning to 1.3.2.RELEASE does not cause any issues.
Searching so far reveals no trail to follow. Comparing the mvn dependency:tree output between using spring-boot 1.3.2.RELEASE and 1.3.3.RELEASE, I can see that the transient dependencies of ch.qos.logback:logback-classic and ch.qos.logback:logback-access jars have changed from 1.1.3 for spring-boot 1.3.2.RELEASE to 1.1.5 for spring-boot 1.3.3.RELEASE, while ch.qos.logback:logback-core remains at 1.1.3 for both spring-boot flavors.
Does anyone have any idea of what the underlying issue is (I'm guessing the class failing to instantiate has been removed or relocated) and/or -- more importantly -- what I can do to resolve it?
Spring Boot is missing some dependency management for logback-core which is allowing different versions to creep in. I've opened an issue to address that.
In the meantime, you can avoid the problem by adding your own dependency management for it to your pom:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Resources