Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a native build to ensure native is not broken #176

Merged
merged 13 commits into from
Apr 12, 2021

Conversation

avdev4j
Copy link
Contributor

@avdev4j avdev4j commented Mar 5, 2021

close #175

  • Add a native image build workflow
  • Include all existing templates
  • Add a Gradle native profile
  • All the builds are green

@avdev4j avdev4j force-pushed the add-native-build branch 9 times, most recently from ab8fde9 to f14a4d2 Compare March 12, 2021 08:16
@avdev4j
Copy link
Contributor Author

avdev4j commented Mar 12, 2021

Current status

imperative-ngx-jwt-maven-mysql-caffeine and imperative-ngx-jwt-maven-psql-nocache failed due to this error:

[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 1.535 s <<< FAILURE! - in io.github.jhipster.sample.service.MailServiceIT
[ERROR] io.github.jhipster.sample.service.MailServiceIT.should_containsActivationInfosWhenCallSendCreationEmail  Time elapsed: 0.004 s  <<< ERROR!
java.lang.RuntimeException:
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.agroal.deployment.AgroalProcessor#build threw an exception: io.quarkus.runtime.configuration.ConfigurationException: Unable to find a JDBC driver corresponding to the database kind 'h2' for the default datasource. Either provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding 'quarkus.datasource.jdbc=false' to your configuration if you don't need it.
	at io.quarkus.agroal.deployment.AgroalProcessor.resolveDriver(AgroalProcessor.java:320)
	at io.quarkus.agroal.deployment.AgroalProcessor.getAggregatedConfigBuildItems(AgroalProcessor.java:274)
	at io.quarkus.agroal.deployment.AgroalProcessor.build(AgroalProcessor.java:83)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Caused by: java.lang.RuntimeException:
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.agroal.deployment.AgroalProcessor#build threw an exception: io.quarkus.runtime.configuration.ConfigurationException: Unable to find a JDBC driver corresponding to the database kind 'h2' for the default datasource. Either provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding 'quarkus.datasource.jdbc=false' to your configuration if you don't need it.
at io.quarkus.agroal.deployment.AgroalProcessor.resolveDriver(AgroalProcessor.java:320)
at io.quarkus.agroal.deployment.AgroalProcessor.getAggregatedConfigBuildItems(AgroalProcessor.java:274)
at io.quarkus.agroal.deployment.AgroalProcessor.build(AgroalProcessor.java:83)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Caused by: io.quarkus.builder.BuildException:
Build failure: Build failed due to errors
[error]: Build step io.quarkus.agroal.deployment.AgroalProcessor#build threw an exception: io.quarkus.runtime.configuration.ConfigurationException: Unable to find a JDBC driver corresponding to the database kind 'h2' for the default datasource. Either provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding 'quarkus.datasource.jdbc=false' to your configuration if you don't need it.
at io.quarkus.agroal.deployment.AgroalProcessor.resolveDriver(AgroalProcessor.java:320)
at io.quarkus.agroal.deployment.AgroalProcessor.getAggregatedConfigBuildItems(AgroalProcessor.java:274)
at io.quarkus.agroal.deployment.AgroalProcessor.build(AgroalProcessor.java:83)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Caused by: io.quarkus.runtime.configuration.ConfigurationException: Unable to find a JDBC driver corresponding to the database kind 'h2' for the default datasource. Either provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding 'quarkus.datasource.jdbc=false' to your configuration if you don't need it.

imperative-react-jwt-gradle-mysql-caffeine failed due to this error

Error: or]: Build step io.quarkus.container.image.deployment.ContainerImageProcessor#publishImageInfo threw an exception: java.lang.IllegalArgumentException: The supplied combination of container-image group '' and name 'jhipsterSampleApplication' is invalid

imperative-ngx-jwt-maven-mysql-redis always failed due to a timeout

imperative-ngx-jwt-maven-mongodb-caffeine failed due to this error

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.commons.vfs2.VFS. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
	at parsing org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(Vfs.java:287)
Call path from entry point to org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(URL): 
	at org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(Vfs.java:287)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:98)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
	at org.reflections.Reflections.scan(Reflections.java:236)
	at org.reflections.Reflections$1.run(Reflections.java:199)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
	at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.commons.vfs2.VFS. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
	at parsing org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:281)
Call path from entry point to org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(URL): 
	at org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:281)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:97)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
	at org.reflections.Reflections.scan(Reflections.java:236)
	at org.reflections.Reflections$1.run(Reflections.java:199)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
	at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.commons.vfs2.VFS. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
at parsing org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(Vfs.java:287)
Call path from entry point to org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(URL):
at org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(Vfs.java:287)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:98)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
at org.reflections.Reflections.scan(Reflections.java:236)
at org.reflections.Reflections$1.run(Reflections.java:199)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.commons.vfs2.VFS. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
at parsing org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:281)
Call path from entry point to org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(URL):
at org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:281)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:97)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
at org.reflections.Reflections.scan(Reflections.java:236)
at org.reflections.Reflections$1.run(Reflections.java:199)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

at com.oracle.svm.core.util.UserError.abort(UserError.java:82)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:233)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:773)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:563)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.commons.vfs2.VFS. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
at parsing org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(Vfs.java:287)
Call path from entry point to org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(URL):
at org.reflections.vfs.Vfs$DefaultUrlTypes$7.createDir(Vfs.java:287)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:98)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
at org.reflections.Reflections.scan(Reflections.java:236)
at org.reflections.Reflections$1.run(Reflections.java:199)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.commons.vfs2.VFS. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
at parsing org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:281)
Call path from entry point to org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(URL):
at org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:281)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:97)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
at org.reflections.Reflections.scan(Reflections.java:236)
at org.reflections.Reflections$1.run(Reflections.java:199)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:770)
... 8 more

cc @danielpetisme @mraible

@avdev4j avdev4j marked this pull request as ready for review March 19, 2021 09:57
@avdev4j
Copy link
Contributor Author

avdev4j commented Mar 26, 2021

hi @vektory79
The Gradle build is failing, I think we forget to apply the modification for Gradle. Can you handle that in another PR?

@vektory79
Copy link
Contributor

I can try to fix it. Seem like it does not so difficult now.

@vektory79
Copy link
Contributor

A Gradle is fixed in #182

@sonarcloud
Copy link

sonarcloud bot commented Apr 12, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@avdev4j avdev4j merged commit d4d153f into jhipster:main Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a CI job that tests the native build
2 participants