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

Avoid NPE in dev console when there aren't any indexed entities with the Hibernate Search extension enabled #15375

Merged
merged 2 commits into from
Mar 2, 2021

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Mar 1, 2021

Fixes #15352

Also includes a small cosmetic change in the Hibernate Search devcard to avoid confusing entity instances with entity types.

@gsmet
Copy link
Member

gsmet commented Mar 1, 2021

Rebased to get the CI fix.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 1, 2021
@yrodiere
Copy link
Member Author

yrodiere commented Mar 2, 2021

@gsmet The failure seems unrelated, I think we can merge this PR?

2021-03-02T01:27:16.4263472Z [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ quarkus-integration-test-mailer ---
2021-03-02T01:27:16.4297762Z [INFO] Surefire report directory: /home/runner/work/quarkus/quarkus/integration-tests/mailer/target/surefire-reports
2021-03-02T01:27:16.4340052Z [INFO] 
2021-03-02T01:27:16.4345237Z [INFO] -------------------------------------------------------
2021-03-02T01:27:16.4347625Z [INFO]  T E S T S
2021-03-02T01:27:16.4355860Z [INFO] -------------------------------------------------------
2021-03-02T01:27:17.9581390Z [INFO] Running io.quarkus.it.mailer.MailerTest
2021-03-02T01:28:44.0399582Z [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 86.061 s <<< FAILURE! - in io.quarkus.it.mailer.MailerTest
2021-03-02T01:28:44.0400964Z [ERROR] io.quarkus.it.mailer.MailerTest  Time elapsed: 86.061 s  <<< ERROR!
2021-03-02T01:28:44.0402261Z java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
2021-03-02T01:28:44.0406681Z 	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:669)
2021-03-02T01:28:44.0412170Z 	at io.quarkus.test.junit.QuarkusTestExtension.interceptBeforeAllMethod(QuarkusTestExtension.java:726)
2021-03-02T01:28:44.0418055Z 	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
2021-03-02T01:28:44.0474613Z 	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
2021-03-02T01:28:44.0503586Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
2021-03-02T01:28:44.0506584Z 	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
2021-03-02T01:28:44.0509648Z 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
2021-03-02T01:28:44.0513180Z 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68)
2021-03-02T01:28:44.0516564Z 	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
2021-03-02T01:28:44.0518894Z 	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
2021-03-02T01:28:44.0521451Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
2021-03-02T01:28:44.0524701Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
2021-03-02T01:28:44.0528331Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
2021-03-02T01:28:44.0531953Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
2021-03-02T01:28:44.0534341Z 	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
2021-03-02T01:28:44.0536700Z 	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
2021-03-02T01:28:44.0539526Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$9(ClassBasedTestDescriptor.java:384)
2021-03-02T01:28:44.0542802Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T01:28:44.0545947Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:382)
2021-03-02T01:28:44.0549513Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:196)
2021-03-02T01:28:44.0555692Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
2021-03-02T01:28:44.0558800Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
2021-03-02T01:28:44.0561836Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T01:28:44.0564813Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
2021-03-02T01:28:44.0567188Z 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
2021-03-02T01:28:44.0569771Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
2021-03-02T01:28:44.0572371Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T01:28:44.0576464Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
2021-03-02T01:28:44.0579580Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
2021-03-02T01:28:44.0581365Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
2021-03-02T01:28:44.0584545Z 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
2021-03-02T01:28:44.0589606Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
2021-03-02T01:28:44.0592903Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T01:28:44.0595911Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
2021-03-02T01:28:44.0598079Z 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
2021-03-02T01:28:44.0600961Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
2021-03-02T01:28:44.0603692Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T01:28:44.0673863Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
2021-03-02T01:28:44.0686757Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
2021-03-02T01:28:44.0690870Z 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
2021-03-02T01:28:44.0695090Z 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
2021-03-02T01:28:44.0698723Z 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
2021-03-02T01:28:44.0702117Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
2021-03-02T01:28:44.0705113Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
2021-03-02T01:28:44.0707750Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
2021-03-02T01:28:44.0711947Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
2021-03-02T01:28:44.0715627Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
2021-03-02T01:28:44.0717807Z 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
2021-03-02T01:28:44.0719729Z 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
2021-03-02T01:28:44.0723193Z 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:188)
2021-03-02T01:28:44.0726696Z 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154)
2021-03-02T01:28:44.0729427Z 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128)
2021-03-02T01:28:44.0731732Z 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
2021-03-02T01:28:44.0734623Z 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
2021-03-02T01:28:44.0736626Z 	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
2021-03-02T01:28:44.0738278Z 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
2021-03-02T01:28:44.0739757Z Caused by: java.lang.reflect.InvocationTargetException
2021-03-02T01:28:44.0741170Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-03-02T01:28:44.0743021Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-03-02T01:28:44.0745737Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-03-02T01:28:44.0747405Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-03-02T01:28:44.0748972Z 	at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:325)
2021-03-02T01:28:44.0750905Z 	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:638)
2021-03-02T01:28:44.0813122Z 	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:684)
2021-03-02T01:28:44.0821186Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
2021-03-02T01:28:44.0824365Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T01:28:44.0827956Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
2021-03-02T01:28:44.0831534Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
2021-03-02T01:28:44.0833328Z 	... 36 more
2021-03-02T01:28:44.0834592Z Caused by: java.lang.RuntimeException: Error waiting for test resource future to finish.
2021-03-02T01:28:44.0836481Z 	at io.quarkus.test.common.TestResourceManager.waitForAllFutures(TestResourceManager.java:140)
2021-03-02T01:28:44.0838492Z 	at io.quarkus.test.common.TestResourceManager.start(TestResourceManager.java:116)
2021-03-02T01:28:44.0839527Z 	... 47 more
2021-03-02T01:28:44.0840993Z Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unable to start Quarkus test resource io.quarkus.it.mailer.FakeMailerTestResource@12ec7a5d
2021-03-02T01:28:44.0842941Z 	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
2021-03-02T01:28:44.0844314Z 	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
2021-03-02T01:28:44.0846614Z 	at io.quarkus.test.common.TestResourceManager.waitForAllFutures(TestResourceManager.java:138)
2021-03-02T01:28:44.0848074Z 	... 48 more
2021-03-02T01:28:44.0849181Z Caused by: java.lang.RuntimeException: Unable to start Quarkus test resource io.quarkus.it.mailer.FakeMailerTestResource@12ec7a5d
2021-03-02T01:28:44.0851015Z 	at io.quarkus.test.common.TestResourceManager.lambda$start$1(TestResourceManager.java:110)
2021-03-02T01:28:44.0852548Z 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2021-03-02T01:28:44.0853810Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2021-03-02T01:28:44.0855327Z 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2021-03-02T01:28:44.0857014Z 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2021-03-02T01:28:44.0858141Z 	at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-02T01:28:44.0859438Z Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
2021-03-02T01:28:44.0861381Z 	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:330)
2021-03-02T01:28:44.0863287Z 	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:311)
2021-03-02T01:28:44.0865161Z 	at io.quarkus.it.mailer.FakeMailerTestResource.start(FakeMailerTestResource.java:19)
2021-03-02T01:28:44.0866987Z 	at io.quarkus.test.common.TestResourceManager.lambda$start$1(TestResourceManager.java:105)
2021-03-02T01:28:44.0868049Z 	... 5 more
2021-03-02T01:28:44.0869161Z Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
2021-03-02T01:28:44.0870985Z 	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
2021-03-02T01:28:44.0873257Z 	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:323)
2021-03-02T01:28:44.0874349Z 	... 8 more
2021-03-02T01:28:44.0875447Z Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
2021-03-02T01:28:44.0877977Z 	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:497)
2021-03-02T01:28:44.0880327Z 	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:325)
2021-03-02T01:28:44.0882389Z 	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
2021-03-02T01:28:44.0883632Z 	... 9 more
2021-03-02T01:28:44.0885012Z Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for URL to be accessible (http://localhost:49184/api/emails should return HTTP 200)
2021-03-02T01:28:44.0887776Z 	at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:264)
2021-03-02T01:28:44.0891122Z 	at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35)
2021-03-02T01:28:44.0894214Z 	at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:892)
2021-03-02T01:28:44.0897073Z 	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:440)
2021-03-02T01:28:44.0898271Z 	... 11 more

@gsmet
Copy link
Member

gsmet commented Mar 2, 2021

Yes, I was looking at the increment build results before merging.

@gsmet gsmet merged commit acd132b into quarkusio:master Mar 2, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 2, 2021
@gsmet gsmet modified the milestones: 1.13 - master, 1.12.1.Final Mar 2, 2021
@yrodiere yrodiere deleted the i15352 branch May 31, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-search Hibernate Search triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in dev mode with hibernate-search-orm-elasticsearch
2 participants