Maven (with tycho) fails while materialize-products - maven

I have an RCP Application which builds find on Eclipse 4.5.2 and 4.6.3; Today i tried to upgrade to Eclipse 2019-6;
when i try to manfest a product with maven (mvn clean install)
i get the following output:
[INFO] --- tycho-p2-repository-plugin:1.4.0:archive-repository (default-archive-repository) # at.biooffice.rcp.product ---
[INFO] Building zip: D:\WS18\git\at.biooffice.rcp.product\target\at.biooffice.rcp.product-3.0.1-SNAPSHOT.zip
[INFO]
[INFO] --- tycho-p2-director-plugin:1.4.0:materialize-products (materialize-products) # at.biooffice.rcp.product ---
[INFO] Installing product at.biooffice for environment win32/win32/x86_64 to D:\WS18\git\at.biooffice.rcp.product\target\products\at.biooffice\win32\win32\x86_64
Installing at.biooffice 3.0.1.201907011447.
Installation failed.
Cannot complete the install because one or more required items could not be found.
Software being installed: BioOffice 3.0.1.201907011447 (at.biooffice 3.0.1.201907011447)
Missing requirement: toolingwin32.win32.x86_64org.eclipse.equinox.ds 3.0.1.201907011447 requires 'osgi.bundle; org.eclipse.equinox.ds 1.6.0.v20190122-0806' but it could not be found
Cannot satisfy dependency:
From: BioOffice 3.0.1.201907011447 (at.biooffice 3.0.1.201907011447)
To: org.eclipse.equinox.p2.iu; toolingat.biooffice.configuration [3.0.1.201907011447,3.0.1.201907011447]
Cannot satisfy dependency:
From: toolingat.biooffice.configuration 3.0.1.201907011447
To: org.eclipse.equinox.p2.iu; toolingwin32.win32.x86_64org.eclipse.equinox.ds [3.0.1.201907011447,3.0.1.201907011447]
There were errors. See log file: D:\WS18\git\at.biooffice.parent\workspace\.metadata\.log
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] BioOffice 3.0.1-SNAPSHOT ........................... SUCCESS [ 2.483 s]
[INFO] microsoftsqlserver 2.0.0-SNAPSHOT .................. SUCCESS [ 0.590 s]
[INFO] org.eclipse.gemini.dbaccess.microsoftsqlserver 2.0.0-SNAPSHOT SUCCESS [ 0.869 s]
[INFO] com.mysql.jdbc 5.1.38-SNAPSHOT ..................... SUCCESS [ 0.170 s]
[INFO] org.eclipse.gemini.dbaccess.mysql 5.1.38-SNAPSHOT .. SUCCESS [ 0.298 s]
[INFO] at.biooffice.osgi.service.dialog 3.0.1-SNAPSHOT .... SUCCESS [ 0.269 s]
[INFO] lumo.osgi.service.notification 3.0.1-SNAPSHOT ...... SUCCESS [ 0.457 s]
[INFO] lumo.osgi.service.notification.impl 3.0.1-SNAPSHOT . SUCCESS [ 0.471 s]
[INFO] lumo.core.runtime 3.0.1-SNAPSHOT ................... SUCCESS [ 18.182 s]
[INFO] at.biooffice.osgi.service.eclipselink 3.0.1-SNAPSHOT SUCCESS [ 2.032 s]
[INFO] at.biooffice.rcp 3.0.1-SNAPSHOT .................... SUCCESS [ 2.129 s]
[INFO] at.biooffice.osgi.service.eclipselink.impl 3.0.1-SNAPSHOT SUCCESS [ 2.474 s]
[INFO] lumo.exports.csv 3.0.1-SNAPSHOT .................... SUCCESS [ 1.399 s]
[INFO] lumo.exports.mssql 3.0.1-SNAPSHOT .................. SUCCESS [ 1.387 s]
[INFO] lumo.exports.kml 3.0.1-SNAPSHOT .................... SUCCESS [ 1.365 s]
[INFO] lumo.exports.shp 3.0.1-SNAPSHOT .................... SUCCESS [ 1.209 s]
[INFO] lumo.exports.vcard 3.0.1-SNAPSHOT .................. SUCCESS [ 1.260 s]
[INFO] lumo.exports.taxaendangered 3.0.1-SNAPSHOT ......... SUCCESS [ 1.276 s]
[INFO] lumo.imports.xml.nls 3.0.1-SNAPSHOT ................ SUCCESS [ 1.272 s]
[INFO] lumo.osgi.service.multimedia 3.0.1-SNAPSHOT ........ SUCCESS [ 1.254 s]
[INFO] lumo.osgi.service.multimedia.impl 3.0.1-SNAPSHOT ... SUCCESS [ 1.380 s]
[INFO] at.biooffice.osgi.service.dialog.impl 3.0.1-SNAPSHOT SUCCESS [ 1.540 s]
[INFO] at.biooffice.update 3.0.1-SNAPSHOT ................. SUCCESS [ 1.262 s]
[INFO] at.biooffice.osgi.service.map 3.0.1-SNAPSHOT ....... SUCCESS [ 1.224 s]
[INFO] at.biooffice.osgi.service.map.impl 3.0.1-SNAPSHOT .. SUCCESS [ 1.537 s]
[INFO] at.biooffice.views.attachedliterature 3.0.1-SNAPSHOT SUCCESS [ 1.365 s]
[INFO] at.biooffice.views.bioobject 3.0.1-SNAPSHOT ........ SUCCESS [ 1.399 s]
[INFO] at.biooffice.common.admin 3.0.1-SNAPSHOT ........... SUCCESS [ 1.278 s]
[INFO] at.biooffice.views.collection 3.0.1-SNAPSHOT ....... SUCCESS [ 1.266 s]
[INFO] at.biooffice.views.contact 3.0.1-SNAPSHOT .......... SUCCESS [ 1.281 s]
[INFO] at.biooffice.views.determination 3.0.1-SNAPSHOT .... SUCCESS [ 1.265 s]
[INFO] at.biooffice.views.dataexchange 3.0.1-SNAPSHOT ..... SUCCESS [ 3.052 s]
[INFO] at.biooffice.views.excursion 3.0.1-SNAPSHOT ........ SUCCESS [ 1.257 s]
[INFO] at.biooffice.views.literature 3.0.1-SNAPSHOT ....... SUCCESS [ 1.263 s]
[INFO] at.biooffice.views.lookups 3.0.1-SNAPSHOT .......... SUCCESS [ 1.326 s]
[INFO] at.biooffice.views.multimedia 3.0.1-SNAPSHOT ....... SUCCESS [ 1.329 s]
[INFO] at.biooffice.views.report 3.0.1-SNAPSHOT ........... SUCCESS [ 2.193 s]
[INFO] at.biooffice.views.nls 3.0.1-SNAPSHOT .............. SUCCESS [ 1.284 s]
[INFO] at.biooffice.views.project 3.0.1-SNAPSHOT .......... SUCCESS [ 1.279 s]
[INFO] at.biooffice.views.querymanager 3.0.1-SNAPSHOT ..... SUCCESS [ 1.798 s]
[INFO] at.biooffice.views.site 3.0.1-SNAPSHOT ............. SUCCESS [ 1.313 s]
[INFO] at.biooffice.views.taxon 3.0.1-SNAPSHOT ............ SUCCESS [ 1.601 s]
[INFO] at.biooffice.views.welcome 3.0.1-SNAPSHOT .......... SUCCESS [ 1.339 s]
[INFO] at.biooffice.views.loan 3.0.1-SNAPSHOT ............. SUCCESS [ 1.375 s]
[INFO] at.biooffice.views.servicemonitor 3.0.1-SNAPSHOT ... SUCCESS [ 1.235 s]
[INFO] jre.win32.win32.x86_64 8.0.66 ...................... SUCCESS [ 2.631 s]
[INFO] at.biooffice.feature 3.0.1-SNAPSHOT ................ SUCCESS [ 0.967 s]
[INFO] at.biooffice.feature.admin 3.0.1-SNAPSHOT .......... SUCCESS [ 0.226 s]
[INFO] at.biooffice.feature.free.addons 3.0.1-SNAPSHOT .... SUCCESS [ 0.275 s]
[INFO] at.biooffice.rcp.product 3.0.1-SNAPSHOT ............ FAILURE [ 37.278 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:01 min
[INFO] Finished at: 2019-07-01T16:54:21+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:1.4.0:materialize-products (materialize-products) on project at.biooffice.rcp.product: Installation of product at.biooffice for environment win32/win32/x86_64 failed: Call to p2 director application failed with exit code 13. Program arguments were: [-metadataRepository, file:/D:/WS18/git/at.biooffice.rcp.product/target/,file:/D:/WS18/git/at.biooffice.rcp.product/target/targetPlatformRepository/, -artifactRepository, file:/D:/WS18/git/at.biooffice.rcp.product/target/,file:/resolution-context-artifacts#D%253A%255CWS18%255Cgit%255Cat.biooffice.rcp.product,file:/D:/WS18/git/at.biooffice.rcp.product/target/,file:/D:/WS18/git/at.biooffice.feature/target/,file:/D:/WS18/git/at.biooffice.feature.admin/target/,file:/D:/WS18/git/at.biooffice.feature.free.addons/target/,file:/D:/WS18/git/at.biooffice.common.admin/target/,file:/D:/WS18/git/lumo.core.runtime/target/,file:/D:/WS18/git/at.biooffice.osgi.service.dialog/target/,file:/D:/WS18/git/lumo.osgi.service.notification/target/,file:/D:/WS18/git/at.biooffice.views.lookups/target/,file:/D:/WS18/git/at.biooffice.views.nls/target/,file:/D:/WS18/git/at.biooffice.views.querymanager/target/,file:/D:/WS18/git/lumo.imports.xml.nls/target/,file:/D:/WS18/git/jre.win32.win32.x86_64/target/,file:/D:/WS18/git/lumo.osgi.service.multimedia/target/,file:/D:/WS18/git/lumo.osgi.service.multimedia.impl/target/,file:/D:/WS18/git/lumo.osgi.service.notification.impl/target/,file:/D:/WS18/git/microsoftsqlserver/target/,file:/D:/WS18/git/org.eclipse.gemini.dbaccess.microsoftsqlserver/target/,file:/D:/WS18/git/at.biooffice.osgi.service.dialog.impl/target/,file:/D:/WS18/git/at.biooffice.osgi.service.eclipselink/target/,file:/D:/WS18/git/at.biooffice.osgi.service.eclipselink.impl/target/,file:/D:/WS18/git/at.biooffice.views.bioobject/target/,file:/D:/WS18/git/at.biooffice.views.collection/target/,file:/D:/WS18/git/at.biooffice.views.contact/target/,file:/D:/WS18/git/at.biooffice.views.dataexchange/target/,file:/D:/WS18/git/at.biooffice.views.excursion/target/,file:/D:/WS18/git/at.biooffice.views.literature/target/,file:/D:/WS18/git/at.biooffice.views.multimedia/target/,file:/D:/WS18/git/at.biooffice.views.report/target/,file:/D:/WS18/git/at.biooffice.views.project/target/,file:/D:/WS18/git/at.biooffice.views.site/target/,file:/D:/WS18/git/at.biooffice.views.taxon/target/,file:/D:/WS18/git/at.biooffice.views.welcome/target/,file:/D:/WS18/git/at.biooffice.rcp/target/,file:/D:/WS18/git/at.biooffice.update/target/,file:/D:/WS18/git/at.biooffice.views.determination/target/,file:/D:/WS18/git/at.biooffice.views.attachedliterature/target/,file:/D:/WS18/git/at.biooffice.views.loan/target/,file:/D:/WS18/git/com.mysql.jdbc/target/,file:/D:/WS18/git/org.eclipse.gemini.dbaccess.mysql/target/,file:/D:/WS18/git/lumo.exports.kml/target/,file:/D:/WS18/git/lumo.exports.taxaendangered/target/,file:/D:/WS18/git/lumo.exports.vcard/target/,file:/D:/WS18/git/lumo.exports.shp/target/,file:/D:/WS18/git/lumo.exports.mssql/target/,file:/D:/WS18/git/lumo.exports.csv/target/,file:/D:/WS18/git/at.biooffice.osgi.service.map/target/,file:/D:/WS18/git/at.biooffice.osgi.service.map.impl/target/,file:/C:/Users/BlackPearl/.m2/repository/, -installIU, at.biooffice, -destination, D:\WS18\git\at.biooffice.rcp.product\target\products\at.biooffice\win32\win32\x86_64, -profile, DefaultProfile, -profileProperties, org.eclipse.update.install.features=true, -roaming, -p2.os, win32, -p2.ws, win32, -p2.arch, x86_64]. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :at.biooffice.rcp.product
so all bundles build successfully but the product does not!
which referrs to: org.eclipse.equinox.p2.iu
by definition i had both org.eclipse.rcp and org.eclipse.e4.rcp as requirement. this leads to this error
i tried removing org.eclipse.rcp
also org.eclipse.e4.rcp
but in the end nothing works.
any ideas how to fix this error?

It looks like you have an explicit dependency on the org.eclipse.equinox.ds plug-in. Current versions of Eclipse have dropped that plug-in and replaced it with the org.apache.felix.scr plug-in.

Related

How to get Maven to output JUnit5 testReporter.publishEntry() values to console?

How do I get Maven to output testReporter.publishEntry() values to the command line console ?
Example
import org.junit.jupiter.api.*;
import java.util.HashMap;
import java.util.Map;
class TestReporterTest {
#Test
void testReportSingleValue(TestReporter testReporter) {
testReporter.publishEntry("Single value");
}
#Test
void testReportKeyValuePair(TestReporter testReporter) {
testReporter.publishEntry("Key", "Value");
}
#Test
void testReportMultipleKeyValuePairs(TestReporter testReporter) {
Map<String, String> values = new HashMap<>();
values.put("user", "John");
values.put("password", "secret");
testReporter.publishEntry(values);
}
}
Result
(Of running C:\home\programs\apache\maven\apache-maven-3.8.4\bin\mvn.cmd install -Dtest=TestReporterTest)
Expected (something like):
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.manning.junitbook.ch02.dependencyinjection.TestReporterTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 s - in com.manning.junitbook.ch02.dependencyinjection.TestReporterTest
[INFO]
[INFO] timestamp = 2021-12-24T12:00:00.001, Key = Value
[INFO] timestamp = 2021-12-24T12:00:00.001, password = secret, user = John
[INFO] timestamp = 2021-12-24T12:00:00.001, value = Single value
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
Actual:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.manning.junitbook.ch02.dependencyinjection.TestReporterTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 s - in com.manning.junitbook.ch02.dependencyinjection.TestReporterTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
Additional information
POM file:
https://github.com/ctudose/junit-in-action-third-edition/blob/master/ch02-core/pom.xml
Full source code (TestReporterTest.java):
https://github.com/ctudose/junit-in-action-third-edition/blob/master/ch02-core/src/test/java/com/manning/junitbook/ch02/dependencyinjection/TestReporterTest.java
Full actual output (Maven command line):
PS C:\home\code\junit-in-action-third-edition-master\ch02-core> C:\home\programs\apache\maven\apache-maven-3.8.4\bin\mvn.cmd install -Dtest=TestReporterTest
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.manning.junitbook:ch02-core >-------------------
[INFO] Building ch02-core 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ch02-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\home\code\junit-in-action-third-edition-master\ch02-core\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # ch02-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ch02-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # ch02-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # ch02-core ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.manning.junitbook.ch02.dependencyinjection.TestReporterTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 s - in com.manning.junitbook.ch02.dependencyinjection.TestReporterTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # ch02-core ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # ch02-core ---
[INFO] Installing C:\home\code\junit-in-action-third-edition-master\ch02-core\target\ch02-core-1.0-SNAPSHOT.jar to C:\Users\bbsop\.m2\repository\com\manning\junitbook\ch02-core\1.0-SNAPSHOT\ch02-core-1.0-SNAPSHOT.jar
[INFO] Installing C:\home\code\junit-in-action-third-edition-master\ch02-core\pom.xml to C:\Users\bbsop\.m2\repository\com\manning\junitbook\ch02-core\1.0-SNAPSHOT\ch02-core-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.562 s
[INFO] Finished at: 2021-12-24T18:00:59+11:00
[INFO] ------------------------------------------------------------------------
PS C:\home\code\junit-in-action-third-edition-master\ch02-core>

Could not load TestContextBootstrapper [null]. Specify #BootstrapWith and dependency tree OK

I'm relatively new with Spring tests. I'm triying to test repositories.
After reading different posts about the same issue it seems to be a dependencies problem.
But I haven't found any conflict after checking it (see bellow).
This is the test class:
#RunWith(SpringJUnit4ClassRunner.class)
#ContextConfiguration
public class ActionRepositoryTest2 {
#Autowired ActionRepository actionRepository;
#Test
public void actionRepository() {
Command command = new Command();
Action action = new Action();
action.setText("TestAction");
actionRepository.save(action);
List<Action> actions = (List<Action>)
actionRepository.findAll();
assertNotNull(action);
assertEquals(actions.size(),1);
}
#Configuration
public static class InnerConf2 {
#Bean
ActionRepository actionRepository() {
return new ActionRepositoryImpl();
}
#Bean
CommandRepository commandRepository() {
return new CommandRepositoryImpl();
}
#Bean
OrderRepository orderRepository() {
return new OrderRepositoryImpl();
}
}
}
This is the exception I get:
ava.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify #BootstrapWith's 'value' attribute or make the default bootstrapper class available.
at org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:144)
...
This is the dependency check:
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) # emorobots ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] com.res:emorobots:jar:0.0.1-SNAPSHOT
[INFO] +- org.jpl7:jpl:jar:7.8.0:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.slf4j:slf4j-api:jar:1.8.0-beta2:runtime
[INFO] +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.11.1:runtime
[INFO] +- org.apache.logging.log4j:log4j-jcl:jar:2.11.1:runtime
[INFO] | \- commons-logging:commons-logging:jar:1.2:runtime
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.11.1:runtime
[INFO] +- org.picocontainer:picocontainer:jar:2.15:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- javax.annotation:javax.annotation-api:jar:1.3.2:runtime
[INFO] +- org.springframework:spring-core:jar:5.1.2.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:5.1.2.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:5.1.2.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:5.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:5.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:5.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-test:jar:5.1.2.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-jpa:jar:1.10.1.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:1.12.1.RELEASE:compile
[INFO] | +- org.springframework:spring-orm:jar:4.2.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.2.5.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:4.2.5.RELEASE:compile
[INFO] | \- org.aspectj:aspectjrt:jar:1.8.9:compile
[INFO] +- org.eclipse.persistence:javax.persistence:jar:2.1.0:compile
[INFO] +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:5.3.7.Final:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.3.7.Final:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] | +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] | \- net.bytebuddy:byte-buddy:jar:1.8.17:compile
[INFO] +- org.javassist:javassist:jar:3.24.0-GA:compile
[INFO] \- mysql:mysql-connector-java:jar:8.0.13:runtime
[INFO] \- com.google.protobuf:protobuf-java:jar:3.6.1:runtime
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
Is there a way (the last option I consider) to trace SpringJUnit4ClassRunner?
Thanks.
Problem is with the maven dependency. Needs to keep the same spring-core and spring-test version which will solve the issue.

Error in flyway migrations on h2Database since upgrading to spring boot v2

I have searched for solutions to this and haven't found anything. I have a service performing migrations via flyway. As part of integration tests for this service we use h2 database. Previously all tests and migrations worked on the h2 database when based off of Spring Boot version 1.5.9.RELEASE
Since moving to 2.0.3.RELEASE the migrations still work fine when i run a local MySQL db but not when I run the tests on h2database.
Please note that I cannot edit the script, and I still want to run flyway on my tests (If i could the solution would be easy). I would like to fix my tests to perform as they have done so far.
The migration script in question. The error is with the RENAME table syntax appears to be down to h2db not supporting that form of syntax. However, this does appear like it supported before (otherwise these tests would have failed on 1.5.9.RELEASE)
ALTER TABLE `keys` CHANGE `key_value` `content_key` varchar(255) NOT NULL;
DROP INDEX `key_value_idx` on `keys`;
CREATE INDEX `content_key_idx` on `keys` (`content_key`);
RENAME TABLE `keys` TO `content_keys`;
The error
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:44)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at com.github.tomakehurst.wiremock.junit.WireMockClassRule$1.evaluate(WireMockClassRule.java:70)
at com.github.tomakehurst.wiremock.junit.WireMockClassRule$1.evaluate(WireMockClassRule.java:70)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException:
Migration V2__rename_key_val.sql failed
---------------------------------------
SQL State : 42001
Error Code : 42001
Message : Syntax error in SQL statement "RENAME[*] TABLE ""KEYS"" TO ""CONTENT_KEYS"" "; expected "ROLLBACK, REVOKE, RUNSCRIPT, RELEASE, REPLACE, {"; SQL statement:
RENAME TABLE `keys` TO `content_keys` [42001-197]
Location : db/migration/V2__rename_key_val.sql (/Users/ciaran.potter/Workspace/foobar/target/classes/db/migration/V2__rename_key_val.sql)
Line : 7
Statement : RENAME TABLE `keys` TO `content_keys`
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:139)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117)
... 38 more
Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException:
Migration V2__rename_key_val.sql failed
---------------------------------------
SQL State : 42001
Error Code : 42001
Message : Syntax error in SQL statement "RENAME[*] TABLE ""KEYS"" TO ""CONTENT_KEYS"" "; expected "ROLLBACK, REVOKE, RUNSCRIPT, RELEASE, REPLACE, {"; SQL statement:
RENAME TABLE `keys` TO `content_keys` [42001-197]
Location : db/migration/V2__rename_key_val.sql (/Users/ciaran.potter/Workspace/foobar/target/classes/db/migration/V2__rename_key_val.sql)
Line : 7
Statement : RENAME TABLE `keys` TO `content_keys`
at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:365)
at org.flywaydb.core.internal.command.DbMigrate.access$400(DbMigrate.java:52)
at org.flywaydb.core.internal.command.DbMigrate$5.call(DbMigrate.java:297)
at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:75)
at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:294)
at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:259)
at org.flywaydb.core.internal.command.DbMigrate.access$300(DbMigrate.java:52)
at org.flywaydb.core.internal.command.DbMigrate$4.call(DbMigrate.java:179)
at org.flywaydb.core.internal.command.DbMigrate$4.call(DbMigrate.java:176)
at org.flywaydb.core.internal.database.Connection$1.call(Connection.java:155)
at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:75)
at org.flywaydb.core.internal.database.Connection.lock(Connection.java:151)
at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:148)
at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:176)
at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:145)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:1206)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:1168)
at org.flywaydb.core.Flyway.execute(Flyway.java:1655)
at org.flywaydb.core.Flyway.migrate(Flyway.java:1168)
at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)
... 56 more
Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "RENAME[*] TABLE ""KEYS"" TO ""CONTENT_KEYS"" "; expected "ROLLBACK, REVOKE, RUNSCRIPT, RELEASE, REPLACE, {"; SQL statement:
RENAME TABLE `keys` TO `content_keys` [42001-197]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at org.h2.message.DbException.getSyntaxError(DbException.java:217)
at org.h2.command.Parser.getSyntaxError(Parser.java:555)
at org.h2.command.Parser.parsePrepared(Parser.java:540)
at org.h2.command.Parser.parse(Parser.java:335)
at org.h2.command.Parser.parse(Parser.java:311)
at org.h2.command.Parser.prepareCommand(Parser.java:278)
at org.h2.engine.Session.prepareLocal(Session.java:611)
at org.h2.engine.Session.prepareCommand(Session.java:549)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:217)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
at org.flywaydb.core.internal.util.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:265)
at org.flywaydb.core.internal.database.StandardSqlStatement.execute(StandardSqlStatement.java:41)
at org.flywaydb.core.internal.database.ExecutableSqlScript.execute(ExecutableSqlScript.java:128)
at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:75)
at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:363)
... 77 more
Result of mvn dependency:list -Dsort
[INFO] Scanning for projects...
[INFO]
[INFO] Building FooBar 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact org.hibernate:hibernate-validator:jar:6.0.8.Final has been relocated to org.hibernate.validator:hibernate-validator:jar:6.0.8.Final
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) # foobar ---
[INFO]
[INFO] The following files have been resolved:
[INFO] antlr:antlr:jar:2.7.7:compile
[INFO] ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] com.fasterxml.jackson.core:jackson-annotations:jar:2.9.5:compile
[INFO] com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] com.fasterxml.jackson.core:jackson-databind:jar:2.9.5:compile
[INFO] com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.9.5:compile
[INFO] com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.5:compile
[INFO] com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.9.6:compile
[INFO] com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.9.5:compile
[INFO] com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.6:runtime
[INFO] com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.6:compile
[INFO] com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] com.fasterxml:classmate:jar:1.3.4:compile
[INFO] com.github.tomakehurst:wiremock-standalone:jar:2.17.0:test
[INFO] com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] com.google.guava:guava:jar:24.1-jre:compile
[INFO] com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] com.google.protobuf:protobuf-java:jar:2.6.0:runtime
[INFO] com.h2database:h2:jar:1.4.197:runtime
[INFO] com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] com.netflix.hystrix:hystrix-core:jar:1.5.12:compile
[INFO] com.netflix.hystrix:hystrix-javanica:jar:1.5.12:compile
[INFO] com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.12:compile
[INFO] com.netflix.hystrix:hystrix-serialization:jar:1.5.12:compile
[INFO] com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] com.zaxxer:HikariCP:jar:2.7.9:compile
[INFO] commons-codec:commons-codec:jar:1.11:compile
[INFO] commons-configuration:commons-configuration:jar:1.8:compile
[INFO] commons-io:commons-io:jar:2.5:compile
[INFO] commons-lang:commons-lang:jar:2.6:compile
[INFO] commons-logging:commons-logging:jar:1.2:compile
[INFO] dom4j:dom4j:jar:1.6.1:compile
[INFO] io.micrometer:micrometer-core:jar:1.0.5:compile
[INFO] io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] io.reactivex:rxjava:jar:1.3.8:compile
[INFO] io.sentry:sentry-logback:jar:1.7.5:runtime
[INFO] io.sentry:sentry:jar:1.7.5:runtime
[INFO] io.springfox:springfox-core:jar:2.8.0:compile
[INFO] io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] io.swagger:swagger-models:jar:1.5.14:compile
[INFO] javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] javax.inject:javax.inject:jar:1:compile
[INFO] javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] javax.ws.rs:javax.ws.rs-api:jar:2.1:compile
[INFO] junit:junit:jar:4.12:test
[INFO] mysql:mysql-connector-java:jar:8.0.11:compile
[INFO] net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] net.logstash.logback:logstash-logback-encoder:jar:5.1:compile
[INFO] net.minidev:accessors-smart:jar:1.2:test
[INFO] net.minidev:json-smart:jar:2.3:test
[INFO] org.apache.commons:commons-csv:jar:1.4:compile
[INFO] org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] org.apache.httpcomponents:fluent-hc:jar:4.5.5:compile
[INFO] org.apache.httpcomponents:httpclient:jar:4.5.5:compile
[INFO] org.apache.httpcomponents:httpcore:jar:4.4.9:compile
[INFO] org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.31:compile
[INFO] org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.31:compile
[INFO] org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.31:compile
[INFO] org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] org.assertj:assertj-core:jar:3.9.1:test
[INFO] org.attoparser:attoparser:jar:2.0.4.RELEASE:compile
[INFO] org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] org.eclipse.jetty:jetty-client:jar:9.4.11.v20180605:compile
[INFO] org.eclipse.jetty:jetty-http:jar:9.4.11.v20180605:compile
[INFO] org.eclipse.jetty:jetty-io:jar:9.4.11.v20180605:compile
[INFO] org.eclipse.jetty:jetty-util:jar:9.4.11.v20180605:compile
[INFO] org.flywaydb:flyway-core:jar:5.0.7:compile
[INFO] org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42:compile
[INFO] org.glassfish.hk2.external:javax.inject:jar:2.5.0-b42:compile
[INFO] org.glassfish.hk2:hk2-api:jar:2.5.0-b42:compile
[INFO] org.glassfish.hk2:hk2-locator:jar:2.5.0-b42:compile
[INFO] org.glassfish.hk2:hk2-utils:jar:2.5.0-b42:compile
[INFO] org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.26-b03:compile
[INFO] org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.27:test
[INFO] org.glassfish.jersey.connectors:jersey-jetty-connector:jar:2.27:compile
[INFO] org.glassfish.jersey.core:jersey-client:jar:2.27:compile
[INFO] org.glassfish.jersey.core:jersey-common:jar:2.26:compile
[INFO] org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.26:compile
[INFO] org.glassfish.jersey.inject:jersey-hk2:jar:2.27:compile
[INFO] org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.27:compile
[INFO] org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.2.Final:compile
[INFO] org.hibernate.validator:hibernate-validator:jar:6.0.8.Final:compile
[INFO] org.hibernate:hibernate-core:jar:5.2.17.Final:compile
[INFO] org.hibernate:hibernate-entitymanager:jar:5.2.17.Final:compile
[INFO] org.hibernate:hibernate-java8:jar:5.2.17.Final:compile
[INFO] org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile
[INFO] org.jboss:jandex:jar:2.0.3.Final:compile
[INFO] org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] org.mockito:mockito-core:jar:2.19.0:test
[INFO] org.objenesis:objenesis:jar:2.6:test
[INFO] org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] org.projectlombok:lombok:jar:1.16.18:compile
[INFO] org.reactivestreams:reactive-streams:jar:1.0.2:runtime
[INFO] org.reflections:reflections:jar:0.9.11:compile
[INFO] org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-actuator:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-autoconfigure:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-actuator:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-aop:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-cache:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-json:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-logging:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-security:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test
[INFO] org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter-web:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-starter:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.3.RELEASE:test
[INFO] org.springframework.boot:spring-boot-test:jar:2.0.3.RELEASE:test
[INFO] org.springframework.boot:spring-boot:jar:2.0.3.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-commons:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-context:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-netflix-core:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.4.4.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.cloud:spring-cloud-starter:jar:2.0.0.RELEASE:compile
[INFO] org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile
[INFO] org.springframework.data:spring-data-jpa:jar:2.0.8.RELEASE: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.springframework.security:spring-security-config:jar:5.0.6.RELEASE:compile
[INFO] org.springframework.security:spring-security-core:jar:5.0.6.RELEASE:compile
[INFO] org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile
[INFO] org.springframework.security:spring-security-rsa:jar:1.0.5.RELEASE:compile
[INFO] org.springframework.security:spring-security-web:jar:5.0.6.RELEASE:compile
[INFO] org.springframework:spring-aop:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-aspects:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-beans:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-context-support:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-context:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-core:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-expression:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-jdbc:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-orm:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-test:jar:5.0.7.RELEASE:test
[INFO] org.springframework:spring-tx:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-web:jar:5.0.7.RELEASE:compile
[INFO] org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile
[INFO] org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.1.RELEASE:compile
[INFO] org.thymeleaf:thymeleaf-spring5:jar:3.0.9.RELEASE:compile
[INFO] org.thymeleaf:thymeleaf:jar:3.0.9.RELEASE:compile
[INFO] org.unbescape:unbescape:jar:1.1.5.RELEASE:compile
[INFO] org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] org.yaml:snakeyaml:jar:1.19:runtime
My test application.yaml
server.port: 18091
pathPrefix: ''
management:
health:
diskspace:
enabled: true
endpoints:
enabled: true
health:
enabled: true
sensitive: false
spring.jackson.mapper.use_static_typing: true
consumerWhitelist: test,test1
server.compression.enabled: true
server.compression.mime-types: application/json,application/xml,text/html,text/xml,text/plain
logging:
level:
ROOT: INFO
org.springframework: INFO
org.hibernate: INFO
liquibase: INFO
springfox: INFO
org.apache: WARN
org.apache.http.wire: INFO
org.slf4j.logger.org.apache.http: WARN
org.thymeleaf: WARN
com.netflix.hystrix: INFO
javax: INFO
spring:
datasource:
driverClassName: org.h2.Driver
url: jdbc:h2:mem:foobar;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=TRUE;MODE=MYSQL
username: foobar
password: password
Replace
RENAME TABLE 'table1' TO 'table2';
with
ALTER TABLE 'table1' RENAME TO 'table2';

Can't figure out how to cure the "java.lang.UnsupportedClassVersionError: org/junit/internal/AssumptionViolatedException" error

I’m using Java 6, Maven 3.3, JUnit 4.11 and PowerMock 1.6.2. Although I can run my unit tests properly on my local machine, when I run my tests through Jenkins, I get the following errors …
org.mainco.subco.myproject.validator.ResetPasswordValidatorTest Time elapsed: 2.431 sec <<< ERROR!
java.lang.UnsupportedClassVersionError: org/junit/internal/AssumptionViolatedException
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
Here is the output from Maven dependency:tree …
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # myproject ---
[INFO] org.mainco.subco:myproject:war:91.0.0-SNAPSHOT
[INFO] +- log4j:log4j:jar:1.2.15:compile
[INFO] +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.1.Final:provided
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:provided
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided
[INFO] +- org.directwebremoting:dwr:jar:3.0.0-rc2:compile
[INFO] +- it.sauronsoftware:cron4j:jar:2.2.5:compile
[INFO] +- org.mainco.subco:orders:jar:91.0.0-SNAPSHOT:compile
[INFO] | +- org.mainco.subco:core:jar:91.0.0-SNAPSHOT:compile
[INFO] | +- com.itextpdf:itextpdf:jar:5.1.0:compile
[INFO] | \- org.springframework:spring-aspects:jar:3.2.11.RELEASE:compile
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:provided
[INFO] +- commons-lang:commons-lang:jar:2.6:provided
[INFO] +- commons-collections:commons-collections:jar:3.2.1:provided
[INFO] +- commons-codec:commons-codec:jar:1.4:provided
[INFO] +- commons-logging:commons-logging:jar:1.1.1:test
[INFO] +- org.hamcrest:java-hamcrest:jar:2.0.0.0:test
[INFO] +- com.jayway.jsonpath:json-path-assert:jar:0.8.1:compile
[INFO] | +- com.jayway.jsonpath:json-path:jar:0.8.1:compile
[INFO] | +- net.minidev:json-smart:jar:1.1.1:compile
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.2.1:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.2.1:compile
[INFO] +- org.apache.velocity:velocity:jar:1.6.3:provided
[INFO] | \- oro:oro:jar:2.0.8:provided
[INFO] +- javax.mail:mail:jar:1.4.4:provided
[INFO] | \- javax.activation:activation:jar:1.1:provided
[INFO] +- org.powermock:powermock-module-junit4:jar:1.6.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.6.2:test
[INFO] | +- org.powermock:powermock-core:jar:1.6.2:test
[INFO] | \- org.powermock:powermock-reflect:jar:1.6.2:test
[INFO] +- org.powermock:powermock-api-easymock:jar:1.6.2:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.6.2:test
[INFO] +- org.easymock:easymock:jar:3.1:test
[INFO] | \- org.objenesis:objenesis:jar:1.2:test
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
[INFO] +- commons-io:commons-io:jar:2.1:provided
[INFO] +- antlr:antlr:jar:2.7.7:provided
[INFO] +- dom4j:dom4j:jar:1.6.1:provided
[INFO] +- org.springframework.boot:spring-boot:jar:1.3.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-autoconfigure:jar:1.2.7.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.14:compile
[INFO] +- org.springframework:spring-aop:jar:3.2.11.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:3.2.11.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:3.2.11.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:3.2.11.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:3.2.11.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:3.2.11.RELEASE:compile
[INFO] +- org.springframework.security.oauth:spring-security-oauth2:jar:2.0.7.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:3.2.11.RELEASE:compile
What dependencies do I need to include/exclude in order to fix the above?

getting runtime error java.lang.NoSuchMethodError: org.springframework.core.convert.support.PropertyTypeDescriptor

I have integrated SWF 2.2.1,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0M1I and EhCache.
I am able to get the first page of my application but on submitting the page getting following weird error. I googled it , did not get any information on this.
SEVERE: Servlet.service() for servlet
Spring MVC Dispatcher Servlet threw
exception java.lang.NoSuchMethodError:
org.springframework.core.convert.support.PropertyTypeDescriptor.(Ljava/beans/PropertyDescriptor;Lorg/springframework/core/MethodParameter;)V
at
org.springframework.expression.spel.support.ReflectivePropertyAccessor.canRead(ReflectivePropertyAccessor.java:88)
at
org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:189)
at
org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:71)
at
org.springframework.expression.spel.ast.CompoundExpression.setValue(CompoundExpression.java:76)
at
org.springframework.expression.spel.standard.SpelExpression.setValue(SpelExpression.java:169)
at
org.springframework.binding.expression.spel.SpringELExpression.setValue(SpringELExpression.java:109)
at
org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:80)
at
org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at
org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)
at
org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at
org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)
at
org.springframework.webflow.engine.State.enter(State.java:194)
at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at
org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391)
at
org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at
org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
at
org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
at
org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:386)
at
org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
at
org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:254)
at
org.springframework.webflow.engine.ViewState.resume(ViewState.java:218)
at
org.springframework.webflow.engine.Flow.resume(Flow.java:545)
at
org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
at
org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
at
org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at
java.lang.Thread.run(Thread.java:619)
Here is my maven dependency tree
D:\Tutorial\simpleWeb>mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simpleWeb Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.primefaces:primefaces:jar:2.2.RC2 is missing, no dependency information available
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # simpleWeb ---
[WARNING] Missing POM for org.primefaces:primefaces:jar:2.2.RC2
[INFO] com.mytutorial:simpleWeb:war:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- org.springframework:spring-context:jar:3.1.0.M1:compile
[INFO] +- org.springframework:spring-context-support:jar:3.1.0.M1:compile
[INFO] +- org.springframework:spring-oxm:jar:3.0.4.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.4.RELEASE:compile
[INFO] | \- org.springframework:spring-core:jar:3.0.4.RELEASE:compile
[INFO] | \- org.springframework:spring-asm:jar:3.0.4.RELEASE:compile
[INFO] +- org.springframework.webflow:org.springframework.binding:jar:2.2.1.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.expression:jar:3.0.4.RELEASE:compile
[INFO] +- org.springframework.webflow:org.springframework.js:jar:2.2.1.RELEASE:compile
[INFO] | \- org.springframework.webflow:org.springframework.js.resources:jar:2.2.1.RELEASE:compile
[INFO] +- org.springframework.webflow:org.springframework.webflow:jar:2.2.1.RELEASE:compile
[INFO] +- org.springframework.webflow:org.springframework.faces:jar:2.2.1.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-web:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-web:jar:3.0.3.RELEASE:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework.security:spring-security-acl:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-jdbc:jar:3.0.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-config:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.6.8:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.6.8:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-aspects:jar:3.0.5.RELEASE:compile
[INFO] +- org.codehaus.castor:castor:jar:1.3.1:compile
[INFO] +- org.codehaus.castor:castor-xml-schema:jar:1.3.1:compile
[INFO] | \- org.codehaus.castor:castor-xml:jar:1.3.1:compile
[INFO] +- org.codehaus.castor:castor-core:jar:1.3.1:compile
[INFO] +- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] +- commons-codec:commons-codec:jar:1.5:compile
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- commons-io:commons-io:jar:1.3.1:compile
[INFO] +- commons-logging:commons-logging:jar:1.1:compile
[INFO] +- com.sun.faces:jsf-api:jar:2.0.3-b05:compile
[INFO] +- com.sun.faces:jsf-impl:jar:2.0.3-b05:runtime
[INFO] +- javax.servlet:jstl:jar:1.2:runtime
[INFO] +- log4j:log4j:jar:1.2.16:compile
[INFO] +- org.slf4j:com.springsource.slf4j.log4j:jar:1.5.10:compile
[INFO] | \- org.apache.log4j:com.springsource.org.apache.log4j:jar:1.2.15:compile
[INFO] +- org.slf4j:com.springsource.slf4j.api:jar:1.5.10:compile
[INFO] +- org.primefaces:primefaces:jar:2.2.RC2:compile
[INFO] +- commons-lang:commons-lang:jar:2.4:compile
[INFO] +- net.sf.ehcache:ehcache-core:jar:2.4.2:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] \- net.sf.ehcache:ehcache-terracotta:jar:2.1.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.188s
[INFO] Finished at: Wed Jun 01 14:38:05 IST 2011
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
I'm just guessing here but you depend on org.springframework:spring-context:jar:3.1.0.M1 and org.springframework:spring-core:jar:3.0.4.RELEASE. My guess is that those version numbers should be equal.
If there is no 3.1 milestone for core, at least try the latest release 3.0.5.

Resources