よしです。
isNullable はコメントアウトしてもう一つのエラー、
createInjectionTargetが存在しないエラーは、とりあえず以下のように変更してエラー自体はなくなりました。
public DBFluteBean(final BeanManager beanManager, final Class<T> beanClass, final List<Class<? super T>> superTypes) {
this.beanClass = beanClass;
this.superTypes = superTypes;
this.annotatedType = beanManager.createAnnotatedType(beanClass);
// this.injectionTarget = beanManager.createInjectionTarget(this.annotatedType);
this.injectionTarget = beanManager.getInjectionTargetFactory(this.annotatedType).createInjectionTarget(null);
}
ただ、Bhvをインジェクトすると、起動時にエラーが発生しました。
@Inject
FruitBhv fruitBhv;
これはサイトに書かれていた
なお、CDIにより自動でコンテナ管理下にされるのを防ぐため、DBFluteが生成するファイルには beans.xml が含まれません。 CDIを有効化するためには、アプリケーション側で別途 beans.xml を用意し、適切な場所に配置する必要があります。が、関係していますか?
エラー内容
2024-07-04 15:12:09,148 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (vert.x-worker-thread-1) Failed to start quarkus [Error Occurred After Shutdown]: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.spring.dbflute.exbhv.FruitBhv and qualifiers [@Default]
- injection target: org.acme.spring.test.dbflute.GreetingController#fruitBhv
- declared on CLASS bean [types=[org.acme.spring.test.dbflute.GreetingController, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.spring.test.dbflute.GreetingController]
The following classes match by type, but have been skipped during discovery:
- org.acme.spring.dbflute.exbhv.FruitBhv has no bean defining annotation (scope, stereotype, etc.)
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1529)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:332)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:166)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:488)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.spring.dbflute.exbhv.FruitBhv and qualifiers [@Default]
- injection target: org.acme.spring.test.dbflute.GreetingController#fruitBhv
- declared on CLASS bean [types=[org.acme.spring.test.dbflute.GreetingController, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.spring.test.dbflute.GreetingController]
The following classes match by type, but have been skipped during discovery:
- org.acme.spring.dbflute.exbhv.FruitBhv has no bean defining annotation (scope, stereotype, etc.)
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:519)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:642)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:317)
... 12 more
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:265)
at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:58)
at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:191)
at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:174)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:547)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:447)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$6.call(VertxHttpHotReplacementSetup.java:161)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$6.call(VertxHttpHotReplacementSetup.java:148)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$0(ContextImpl.java:178)
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
at io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:210)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.spring.dbflute.exbhv.FruitBhv and qualifiers [@Default]
- injection target: org.acme.spring.test.dbflute.GreetingController#fruitBhv
- declared on CLASS bean [types=[org.acme.spring.test.dbflute.GreetingController, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.spring.test.dbflute.GreetingController]
The following classes match by type, but have been skipped during discovery:
- org.acme.spring.dbflute.exbhv.FruitBhv has no bean defining annotation (scope, stereotype, etc.)
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1529)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:332)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:166)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:488)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.spring.dbflute.exbhv.FruitBhv and qualifiers [@Default]
- injection target: org.acme.spring.test.dbflute.GreetingController#fruitBhv
- declared on CLASS bean [types=[org.acme.spring.test.dbflute.GreetingController, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.spring.test.dbflute.GreetingController]
The following classes match by type, but have been skipped during discovery:
- org.acme.spring.dbflute.exbhv.FruitBhv has no bean defining annotation (scope, stereotype, etc.)
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:519)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:642)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:317)
... 12 more
at io.quarkus.builder.Execution.run(Execution.java:123)
at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:327)
... 19 more
Caused by: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.spring.dbflute.exbhv.FruitBhv and qualifiers [@Default]
- injection target: org.acme.spring.test.dbflute.GreetingController#fruitBhv
- declared on CLASS bean [types=[org.acme.spring.test.dbflute.GreetingController, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.spring.test.dbflute.GreetingController]
The following classes match by type, but have been skipped during discovery:
- org.acme.spring.dbflute.exbhv.FruitBhv has no bean defining annotation (scope, stereotype, etc.)
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1529)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:332)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:166)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:488)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.spring.dbflute.exbhv.FruitBhv and qualifiers [@Default]
- injection target: org.acme.spring.test.dbflute.GreetingController#fruitBhv
- declared on CLASS bean [types=[org.acme.spring.test.dbflute.GreetingController, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.spring.test.dbflute.GreetingController]
The following classes match by type, but have been skipped during discovery:
- org.acme.spring.dbflute.exbhv.FruitBhv has no bean defining annotation (scope, stereotype, etc.)
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:519)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:642)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:317)
... 12 more
2024年7月4日木曜日 15:03:51 UTC+9 jflute: