Closed saturnism closed 5 years ago
/cc @ludoch
@jdubois what's the recommended way to do this? e.g., for each app, we need to add:
Would it make sense to add this option directly into the app
generator? Or, is there a way to modify existing files via a new generator, like jhipster appengine
?
i'll try w/ jhipster appengine
, that tries to generate new profile/config
I would recommend modeling it off of the Heroku subgen (or one of the other deployment options)
<!-- jhipster-needle-maven-add-plugin -->
with the corresponding method, here's how the Heroku generator modifies the pomapplication-heroku.yml
and a maven profileThis can be done without adding a new needle and jhipster appengine
sounds perfect (for me)
Yes @ruddell is right - the Heroku sub-gen is very close to what you want, and it's also very good, so it's the best way to start. I wouldn't worry too much about microservices yet, as soon as you have monoliths the rest will be very simple. Basically, a JHipster microservice is a monolith without a front-end (and that's super-easy to delete) and with Spring Cloud (and there's a big part of it you don't need, I think).
@saturnism jhipster appengine
might be a bit too ambiguous. I would suggest jhipster gcp
or jhipster google-app-engineor
jhipster gae` or something similar
yes +1 for jhipster gae
as that's how I usually call app engine
jhipster appengine-standard ? Flex would be a different one...
i think jhipster appengine-standard
is a too long though :(
what if we do jhipster gcp
, and it prompts you to see whether you want App Engine Standard, or GKE, etc. We can add more options over time.
The basic information we need is the project ID, and ensure that gcloud is installed.
Yes jhipster gcp
is good, and then you have multiple deployment options - those could also be sub-generators, but they would have some common code (which is logical, at least ensuring that gcloud is correctly set up)
at the end of the day though, gke deployment is very different from appengine deployment. I think jhipster gae
still makes more sense.
Quick question, is there a way to update the production JDBC URL from my generator? I.e., w/o overriding w/ additional profile nor env vars.
Maybe create a gae
spring profile and add an application-gae.yml
in resources/config
.
creating the profile doesn't mean it'll be used :( it still require ways to indicate that the profile is active.
the only way i can do this now is to build w/ additional profile, e.g. mvnw package -Pprod,prod-gae
An other option is to modify the application-prod.yml directly. You can use the jsyaml lib or some regex fu to edit the file from your subgen.
Just thought about something, maybe you can try adding a spring.profile.includes=gae
in application-prod.yml.
Really not sure about this as the profile.include behavior used to be strange.
nice! that's a good call since we are using spring boot 2 :) https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html
The GAE support issue is only lacking documentation to be closed. Reminder for @ludoch and @saturnism to PR to jhipster/jhipster.github.io.
Yes let's only have monoliths for the moment -> for micorservices or more complex stuff we have far less users, and for them Kubernetes is also a good solution.
-> @ludoch @saturnism I'll try it today but unfortunately you're the only ones who can the documentation, I'm afraid.
I did a few tests on this:
And then when I deployed I had a huge stacktrace, here it is below. So there's still some work to do here, before releasing it.
INFO] GCLOUD: Beginning interaction for module sample...
[INFO] GCLOUD: 0% Scanning for jsp files.
[INFO] GCLOUD: 2018-08-28 18:15:39.907:INFO::main: Logging initialized @190ms
[INFO] GCLOUD: 2018-08-28 18:15:43.165:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=2634ms
[INFO] GCLOUD: 2018-08-28 18:15:43.166:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.q.QuickStartWebApp@55f3ddb1{/,file:///Users/julien/workspace/sample/target/appengine-staging/,UNAVAILABLE}
[INFO] GCLOUD: MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/h2/util/Bits.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/h2-1.4.197.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/javax/xml/bind/ModuleUtil.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/jaxb-api-2.3.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/jaxb-api-2.3.0.jar]
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:534)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:496)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1363)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
[INFO] GCLOUD: at org.eclipse.jetty.quickstart.QuickStartWebApp.doStart(QuickStartWebApp.java:201)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.start(Server.java:422)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.doStart(Server.java:389)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.QuickStartGenerator.generate(QuickStartGenerator.java:81)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.QuickStartGenerator.main(QuickStartGenerator.java:48)
[INFO] GCLOUD: Suppressed:
[INFO] GCLOUD: |MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar]
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:893)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Suppressed:
[INFO] GCLOUD: | |java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: | |Caused by:
[INFO] GCLOUD: | |java.lang.IllegalArgumentException
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:977)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Suppressed:
[INFO] GCLOUD: | |java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: | |Caused by:
[INFO] GCLOUD: | |java.lang.IllegalArgumentException
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:977)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Caused by:
[INFO] GCLOUD: |java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/log4j-api-2.10.0.jar
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Caused by:
[INFO] GCLOUD: |java.lang.IllegalArgumentException
[INFO] GCLOUD: | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:977)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Suppressed:
[INFO] GCLOUD: |MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/javax/xml/bind/ModuleUtil.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/jaxb-api-2.3.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/jaxb-api-2.3.0.jar]
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:893)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Suppressed:
[INFO] GCLOUD: | |java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/jaxb-api-2.3.0.jar
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: | |Caused by:
[INFO] GCLOUD: | |java.lang.IllegalArgumentException
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:977)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Caused by:
[INFO] GCLOUD: |java.lang.RuntimeException: Error scanning entry META-INF/versions/9/javax/xml/bind/ModuleUtil.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/jaxb-api-2.3.0.jar
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: |Caused by:
[INFO] GCLOUD: |java.lang.IllegalArgumentException
[INFO] GCLOUD: | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:977)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: | at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Caused by:
[INFO] GCLOUD: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/h2/util/Bits.class from jar file:///Users/julien/workspace/sample/target/appengine-staging/WEB-INF/lib/h2-1.4.197.jar
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Caused by:
[INFO] GCLOUD: java.lang.IllegalArgumentException
[INFO] GCLOUD: at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:977)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Failed to generate /Users/julien/workspace/sample/target/appengine-staging/WEB-INF/quickstart-web.xml
[INFO] GCLOUD: Error while executing: /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/bin/java -cp /Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-schemas-3.1.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-alpn-server-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-jmx-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-webapp-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-continuation-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/servlet-api-3.1.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-server-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-util-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-jaas-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-servlets-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-jaspi-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-annotations-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-io-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-nosql-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-gcloud-session-manager-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-infinispan-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-jndi-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-plus-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-servlet-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-quickstart-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-security-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-rewrite-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-xml-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-client-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-gcloud-memcached-session-manager-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-deploy-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-http-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/jetty-proxy-9.3.18.v20170406.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/annotations/javax.annotation-api-1.2.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/annotations/asm-commons-5.0.1.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/annotations/asm-5.0.1.jar:/Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime/quickstartgenerator.jar com.google.appengine.tools.development.jetty9.QuickStartGenerator /Users/julien/workspace/sample/target/appengine-staging /Users/julien/Applications/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/docs/webdefault.xml
[INFO] GCLOUD: Unable to stage app: Failed to generate quickstart-web.xml.
[INFO] GCLOUD: Please see the logs [/var/folders/2l/m7cv7q7d55l57ls19rqx27pr0000gn/T/appcfg100515295495836409.log] for further information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:08 min
[INFO] Finished at: 2018-08-28T18:15:43+02:00
[INFO] ------------------------------------------------------------------------
@ludoch @saturnism Documentation is crucially missing for this, our statistics is reporting that the GAE sub-generator has been used 0 times in the last month ! It doesn't even show up in the graph.
:( added initial doc pr.
@jdubois i have a feeling that's multi-release jar causing issues.. :( /cc @ludoch
Multi release jar issue will be fixed soon in a new cloud SDK release (ETA Wed Oct 10th)
Cool. Let's test and release the doc PR after the multi-release JAR issue is fixed.
Any progress on gae
subgenerator?
@pradeepmanshajha the generator for monolith is actually already useable. just waiting for a new fix that can fix issues introduced by multi-release jar. is there a specific feature you are looking for?
@saturnism i think this subgenerator is not supported with gradle project.
I have created new project and trying to deploy but got this stacktrace on App Engine. jhipster version 5.5.0
java.util.ServiceConfigurationError: javax.cache.spi.CachingProvider: Provider org.ehcache.jsr107.EhcacheCachingProvider could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at javax.cache.Caching$CachingProviderRegistry$1.run(Caching.java:448)
at javax.cache.Caching$CachingProviderRegistry$1.run(Caching.java:442)
at java.security.AccessController.doPrivileged(Native Method)
at javax.cache.Caching$CachingProviderRegistry.getCachingProviders(Caching.java:442)
at javax.cache.Caching$CachingProviderRegistry.getCachingProviders(Caching.java:410)
at javax.cache.Caching.getCachingProviders(Caching.java:187)
at org.springframework.boot.autoconfigure.cache.JCacheCacheConfiguration$JCacheProviderAvailableCondition.getMatchOutcome(JCacheCacheConfiguration.java:203)
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberOutcomes.getConditionOutcome(AbstractNestedCondition.java:191)
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberOutcomes.<init>(AbstractNestedCondition.java:184)
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.lambda$getMatchOutcomes$0(AbstractNestedCondition.java:162)
at java.util.Map.forEach(Map.java:630)
at java.util.Collections$UnmodifiableMap.forEach(Collections.java:1505)
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.getMatchOutcomes(AbstractNestedCondition.java:162)
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberMatchOutcomes.<init>(AbstractNestedCondition.java:81)
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition.getMatchOutcome(AbstractNestedCondition.java:65)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:441)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:128)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:333)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.startWebapp(AppEngineWebAppContext.java:159)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doStart(AppEngineWebAppContext.java:116)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:243)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:181)
at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:109)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:690)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:652)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:622)
at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:816)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:273)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IncompatibleClassChangeError: class org.ehcache.jsr107.Eh107CacheManager has class javax.cache.CacheManager as interface
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at com.google.apphosting.runtime.ApplicationClassLoader.findClass(ApplicationClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2673)
at java.lang.Class.getConstructor0(Class.java:3077)
at java.lang.Class.newInstance(Class.java:413)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 57 common frames omitted
@initfusion ah you are right, we didn't add gradle plugin! will add it to the todo.
could i trouble you to share the generated appengine-web.xml
? Thanks!
@initfusion pls see if #8616 helps fix your issue. It's necessary for ehcache
, but not necessary for hazelcast
. But will add it by default just in case.
@saturnism this is my appengine-web.xml
generated by maven project.
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<service>default</service>
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<!-- See https://cloud.google.com/appengine/docs/standard/java/config/appref#syntax
for more scaling tuning parameters -->
<automatic-scaling>
<min-instances>1</min-instances>
<max-instances>3</max-instances>
</automatic-scaling>
<sessions-enabled>true</sessions-enabled>
<instance-class>F2</instance-class>
<precompilation-enabled>false</precompilation-enabled>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
<env-variables>
<env-var name="SERVER_PORT" value="8080"/>
</env-variables>
</appengine-web-app>
@initfusion got it; this is fixed in #8616, there are a few additional lines that need to be added. See: https://github.com/jhipster/generator-jhipster/blob/b301f1492a439a832c613b9f54280e150c26f900/generators/gae/templates/appengine-web.xml.ejs
<class-loader-config>
<!-- temporary workaround to make sure the app uses it's memcache/mail jars.!-->
<priority-specifier filename="cache-api-1.1.0.jar"/>
<priority-specifier filename="javax.mail-1.6.2.jar"/>
</class-loader-config>
Closing it as discussed privately with @ludoch
@saturnism with JHipster 6.2.0 i had the same stacktrace on App Engine with
javax.cache.spi.CachingProvider: Provider org.ehcache.jsr107.EhcacheCachingProvider could not be instantiated
Solved by changing appengine-web.xml to : (cache-api from 1.1.0 to 1.1.1)
<class-loader-config>
<!-- temporary workaround to make sure the app uses it's memcache/mail jars.!-->
<priority-specifier filename="cache-api-1.1.1.jar"/>
<priority-specifier filename="javax.mail-1.6.2.jar"/>
</class-loader-config>
I'm not 100% sure it's accurate with a sample JHipster 6.2.0 app because I had the problem on an app that I upgrade since JHipster 5.3.1.
Is this feature still available ? in the documentation on https://www.jhipster.tech/gcp/ it say that jhipster gae support only java 11. Any way to deploy on standard environment with Java 8 ?
@samyomar : The Java 8 deployment on App Engine is a bit different in its configuration than Java 11 and unfortunately the GAE generator do not support Java 8 (i.e: we have upgraded to Java 11). If you want to deploy with Java 8 you will have to write your own appengine-web.xml
deployment configuration. Since we were using Java 8 before, you can always refer to our previous appengine-web.xml deployment files.
thank you @SudharakaP for the reply. I followed all these steps but the problem just resolved only when I removed the ApplicationWebXml class that jhipster create by default. as this class already extends SpringBootServletInitializer
summary, it worked when I have only one class called "ServletInitializer" and extends SpringBootServletInitializer.
@samyomar : Thanks for the information. If you'd like feel free to add it to the documentation so that anyone who wants to deploy with Java 8 will know the process.
thank you @SudharakaP for the reply. I followed all these steps but the problem just resolved only when I removed the ApplicationWebXml class that jhipster create by default. as this class already extends SpringBootServletInitializer
summary, it worked when I have only one class called "ServletInitializer" and extends SpringBootServletInitializer.
With which file have you replaced the ApplicationWebXml @samyomar ?
Overview of the feature request
Add a generator to prepare app for deployment into Google App Engine Standard Java 8.
Motivation for or Use Case
GAE is a PaaS that can deploy a single module or multiple modules (services) easily. It also has SSL support for both
*.appspot.com
domain and custom domain too. This feature can prepare existing JHipster apps for deployment into GAE.MVP Support Proposal
appengine-web.xml
(Done #7765)pom.xml
(Done #7765)Not supported in MVP proposal:
No registry/zuul support - App Engine supports request mapping already.
Support only MySQL for now, and possibly PostgreSQL - CloudSQL.
[x] Checking this box is mandatory (this is just to show you read everything)