cloudfoundry-samples / cf-sample-app-spring

Introduction to Cloud Foundry app deployment and management concepts.
31 stars 142 forks source link

Template project does not work due to thymeleaf version #16

Closed kdziurdz closed 5 years ago

kdziurdz commented 5 years ago

After this commit, 15 minutes tutorial does not work anymore Dependency is not satisfied. I had to revert this changes manually to acomplish the tutorial

https://github.com/cloudfoundry-samples/cf-sample-app-spring/commit/dbd91699469d4c35e9cc7fa3379198d10ba85f29

Greetings!

selzoc commented 5 years ago

Yes, we have seen this too, with the most current version of the java buildpack (v4.17.2)

Here are the relevant logs:

   2019-03-13T15:34:57.90-0700 [APP/PROC/WEB/0] OUT Resolving dependencies....
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR startup failed:
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:323)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:128)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at groovy.grape.Grape.grab(Grape.java:167)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:346)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:966)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:206)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.run.SpringApplicationRunner.compile(SpringApplicationRunner.java:129)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.run.SpringApplicationRunner.compileAndRun(SpringApplicationRunner.java:101)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.run.RunCommand$RunOptionHandler.run(RunCommand.java:111)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at java.lang.reflect.Method.invoke(Method.java:498)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:318)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     ... 25 more
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     ... 26 more
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR     at java.lang.Thread.run(Thread.java:748)
   2019-03-13T15:34:57.91-0700 [APP/PROC/WEB/0] ERR 1 error
   2019-03-13T15:34:58.27-0700 [APP/PROC/WEB/0] OUT Exit status 1
jayin6 commented 5 years ago

@selzoc, were you able to get it working?

I tried the fix suggested by @kdziurdz by updating from thymeleaf-spring5 to spring4 manually, and the push still failed. I got the following errors in the logs:

2019-03-13T22:44:00.38-0400 [STG/0] OUT Downloading app package... 2019-03-13T22:44:00.38-0400 [STG/0] OUT Downloading build artifacts cache... 2019-03-13T22:44:00.39-0400 [STG/0] ERR Downloading build artifacts cache failed 2019-03-13T22:44:00.50-0400 [STG/0] OUT Downloaded app package (1.2M) 2019-03-13T22:44:01.64-0400 [STG/0] OUT -----> Java Buildpack v4.17.2 (offline) | https://github.com/cloudfoundry/java-buildpack.git#47e68da

2019-03-13T22:44:17.62-0400 [APP/PROC/WEB/0] OUT JVM Memory Configuration: -Xmx204357K -Xss1M -XX:ReservedCodeCacheSize=240M -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=70074K 2019-03-13T22:44:18.75-0400 [APP/PROC/WEB/0] ERR startup failed: 2019-03-13T22:44:18.75-0400 [APP/PROC/WEB/0] ERR file:/home/vcap/app/app.groovy: 1: expecting anything but ''\n''; got it anyway @ line 1, column 27. 2019-03-13T22:44:18.75-0400 [APP/PROC/WEB/0] ERR @Grab("thymeleaf-spring4”) 2019-03-13T22:44:18.75-0400 [APP/PROC/WEB/0] ERR ^ 2019-03-13T22:44:18.75-0400 [APP/PROC/WEB/0] ERR 1 error 2019-03-13T22:44:18.80-0400 [APP/PROC/WEB/0] OUT Exit status 1

2019-03-13T21:52:57.01-0400 [APP/PROC/WEB/0] OUT JVM Memory Configuration: -Xmx204357K -Xss1M -XX:ReservedCodeCacheSize=240M -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=70074K 2019-03-13T21:53:00.22-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.CloudFoundryContainerTrustManagerFactory getSystemTrustManager 2019-03-13T21:53:00.22-0400 [APP/PROC/WEB/0] ERR INFO: Adding System Trust Manager 2019-03-13T21:53:00.22-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.CloudFoundryContainerTrustManagerFactory getContainerTrustManager 2019-03-13T21:53:00.22-0400 [APP/PROC/WEB/0] ERR INFO: Adding TrustManager for /etc/ssl/certs/ca-certificates.crt 2019-03-13T21:53:00.24-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.FileWatcher run 2019-03-13T21:53:00.24-0400 [APP/PROC/WEB/0] ERR INFO: Start watching /etc/ssl/certs/ca-certificates.crt 2019-03-13T21:53:00.68-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.FileWatchingX509ExtendedTrustManager 2019-03-13T21:53:00.68-0400 [APP/PROC/WEB/0] ERR INFO: Initialized TrustManager for /etc/ssl/certs/ca-certificates.crt 2019-03-13T21:53:00.69-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.CloudFoundryContainerKeyManagerFactory getSystemKeyManager 2019-03-13T21:53:00.69-0400 [APP/PROC/WEB/0] ERR INFO: Adding System Key Manager 2019-03-13T21:53:00.69-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.CloudFoundryContainerKeyManagerFactory getContainerKeyManager 2019-03-13T21:53:00.69-0400 [APP/PROC/WEB/0] ERR INFO: Adding Key Manager for /etc/cf-instance-credentials/instance.key and /etc/cf-instance-credentials/instance.crt 2019-03-13T21:53:00.70-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.FileWatcher run 2019-03-13T21:53:00.70-0400 [APP/PROC/WEB/0] ERR INFO: Start watching /etc/cf-instance-credentials/instance.key 2019-03-13T21:53:00.70-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.FileWatcher run 2019-03-13T21:53:00.70-0400 [APP/PROC/WEB/0] ERR INFO: Start watching /etc/cf-instance-credentials/instance.crt 2019-03-13T21:53:00.73-0400 [APP/PROC/WEB/0] ERR Mar 14, 2019 1:53:00 AM org.cloudfoundry.security.FileWatchingX509ExtendedKeyManager 2019-03-13T21:53:00.73-0400 [APP/PROC/WEB/0] ERR INFO: Initialized KeyManager for /etc/cf-instance-credentials/instance.key and /etc/cf-instance-credentials/instance.crt 2019-03-13T21:53:08.04-0400 [APP/PROC/WEB/0] OUT Resolving dependencies....... 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR startup failed: 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:323) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:128) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at groovy.grape.Grape.grab(Grape.java:167) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:346) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:966) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:206) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.run.SpringApplicationRunner.compile(SpringApplicationRunner.java:129) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.run.SpringApplicationRunner.compileAndRun(SpringApplicationRunner.java:101) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.run.RunCommand$RunOptionHandler.run(RunCommand.java:111) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at java.lang.reflect.Method.invoke(Method.java:498) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:318) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR ... 25 more 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR ... 26 more 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact :thymeleaf-spring5:jar: in local (file:/home/vcap/app/repository) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR at java.lang.Thread.run(Thread.java:748) 2019-03-13T21:53:08.05-0400 [APP/PROC/WEB/0] ERR 1 error 2019-03-13T21:53:08.46-0400 [APP/PROC/WEB/0] OUT Exit status 1

zmackie commented 5 years ago

Apologies all. This should work against master version of the java buildpack. I updated the app manifest to use that by default https://github.com/cloudfoundry-samples/cf-sample-app-spring/commit/8a1064ed1c0376573547ffefa9ebef3d931be35b . Closing. Please re-open if this issue persists.