DescartesResearch / TeaStore

A micro-service reference test application for model extraction, cloud management, energy efficiency, power prediction, single- and multi-tier auto-scaling
https://se.informatik.uni-wuerzburg.de
Apache License 2.0
119 stars 140 forks source link

build errors #212

Closed prathjan closed 2 years ago

prathjan commented 2 years ago

I get the following error:

mvn clean install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for tools.descartes.teastore:entities:jar:1.4.1 [WARNING] 'version' contains an expression but should be a constant. @ tools.descartes.teastore:parent:${teastoreversion}, /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/pom.xml, line 16, column 11 [WARNING] [WARNING] Some problems were encountered while building the effective model for tools.descartes.teastore:kieker.rabbitmq:war:1.4.1 [WARNING] 'dependencies.dependency.systemPath' for net.kieker-monitoring:kieker:jar should not point at files within the project directory, ${project.basedir}/src/main/webapp/WEB-INF/lib/kieker-1.14-SNAPSHOT-aspectj.jar will be unresolvable by dependent projects @ tools.descartes.teastore:kieker.rabbitmq:${teastoreversion}, /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/utilities/tools.descartes.teastore.kieker.rabbitmq/pom.xml, line 35, column 16 [WARNING] [WARNING] Some problems were encountered while building the effective model for tools.descartes.teastore:registryclient:jar:1.4.1 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.glassfish.jersey.media:jersey-media-json-jackson:jar -> duplicate declaration of version 3.0.2 @ tools.descartes.teastore:registryclient:${teastoreversion}, /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/utilities/tools.descartes.teastore.registryclient/pom.xml, line 59, column 15 [WARNING] [WARNING] Some problems were encountered while building the effective model for tools.descartes.teastore:parent:pom:1.4.1 [WARNING] 'version' contains an expression but should be a constant. @ tools.descartes.teastore:parent:${teastoreversion}, /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/pom.xml, line 16, column 11 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [WARNING] The project tools.descartes.teastore:parent:pom:1.4.1 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [pom] [INFO] TeaStore Entities [jar] [INFO] TeaStore Kieker Instrumentation [jar] [INFO] TeaStore Kieker RabbitMQ [war] [INFO] TeaStore Registry Client [jar] [INFO] TeaStore Memory Configurator [jar] [INFO] TeaStore Docker Base Image [pom] [INFO] TeaStore Image Provider [war] [INFO] TeaStore Persistence [war] [INFO] TeaStore Recommender [war] [INFO] TeaStore Registry [war] [INFO] TeaStore Auth [war] [INFO] TeaStore UI [war] [INFO] TeaStore Docker All Services Image [pom] [INFO] [INFO] ------------------< tools.descartes.teastore:parent >------------------- [INFO] Building parent 1.4.1 [1/14] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ parent --- [INFO] [INFO] --- maven-checkstyle-plugin:3.0.0:check (validate) @ parent --- [INFO] Starting audit... Audit done. [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ parent --- [INFO] Installing /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/pom.xml to /Users/prathjan/.m2/repository/tools/descartes/teastore/parent/1.4.1/parent-1.4.1.pom [INFO] [INFO] -----------------< tools.descartes.teastore:entities >------------------ [INFO] Building TeaStore Entities 1.4.1 [2/14] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ entities --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install-file (install-external) @ entities --- [INFO] Installing /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/interfaces/tools.descartes.teastore.entities/kieker-1.15.jar to /Users/prathjan/.m2/repository/net/kieker-monitoring/kieker/1.15/kieker-1.15.jar [INFO] Installing /var/folders/tq/433ms2_17n16drl4fvc_l1b40000gn/T/mvninstall2510713132361365440.pom to /Users/prathjan/.m2/repository/net/kieker-monitoring/kieker/1.15/kieker-1.15.pom [INFO] [INFO] --- maven-checkstyle-plugin:3.0.0:check (validate) @ entities --- [INFO] Starting audit... Audit done. [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ entities --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/interfaces/tools.descartes.teastore.entities/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ entities --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to /Users/prathjan/devnet/intertest/terratest/intersight-terraform-modules/ciscodevnet/teastore/TeaStore2/TeaStore/interfaces/tools.descartes.teastore.entities/target/classes [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for parent 1.4.1: [INFO] [INFO] parent ............................................. SUCCESS [ 1.219 s] [INFO] TeaStore Entities .................................. FAILURE [ 0.714 s] [INFO] TeaStore Kieker Instrumentation .................... SKIPPED [INFO] TeaStore Kieker RabbitMQ ........................... SKIPPED [INFO] TeaStore Registry Client ........................... SKIPPED [INFO] TeaStore Memory Configurator ....................... SKIPPED [INFO] TeaStore Docker Base Image ......................... SKIPPED [INFO] TeaStore Image Provider ............................ SKIPPED [INFO] TeaStore Persistence ............................... SKIPPED [INFO] TeaStore Recommender ............................... SKIPPED [INFO] TeaStore Registry .................................. SKIPPED [INFO] TeaStore Auth ...................................... SKIPPED [INFO] TeaStore UI ........................................ SKIPPED [INFO] TeaStore Docker All Services Image ................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.054 s [INFO] Finished at: 2021-12-16T21:29:51-08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project entities: Fatal error compiling: invalid target release: 11 -> [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/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :entities

SimonEismann commented 2 years ago

As far as I understand the error message, it seems that maven attempts to compile TeaStore using Java 11, but does not find a corresponding JDK. Could you take a look if any of the remedies discussed in this post address your issue:

https://stackoverflow.com/questions/63154787/maven-is-not-using-java-11-fatal-error-compiling-invalid-target-release-11

prathjan commented 2 years ago

so moved to 11. Howewver, o deployment I get a whole bunch of errors (enclosed) catalina.2021-12-21.log

prathjan commented 2 years ago

@SimonEismann

I also get the following errors: 21-Dec-2021 10:39:08.645 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/usr/local/apache/WebUIService/webapps/tools.descartes.teastore.webui.war] java.lang.IllegalStateException: Error starting child at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:757) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1016) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tools.descartes.teastore.webui]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) ... 9 more Caused by: java.lang.NoClassDefFoundError: Lkieker/monitoring/core/controller/IMonitoringController; at java.base/java.lang.Class.getDeclaredFields0(Native Method) at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3061) at java.base/java.lang.Class.getDeclaredFields(Class.java:2248) at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110) at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:109) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:68) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:782) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5130) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 10 more Caused by: java.lang.ClassNotFoundException: kieker.monitoring.core.controller.IMonitoringController at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1415) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1223)

prathjan commented 2 years ago

Included keiker jar and most of the above errors are resolved. Now I get the following error (enclosed) catalina.2021-12-22.log

Looks like all issues come up while using Java 11. Went back to Java 8 and it seems fine.

SimonEismann commented 2 years ago

closed, since the issue is resolved :)