日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢(xún)客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

本文介紹了Quarkus休眠未找到所需類(lèi)型[接口javax.Transaction.TransactionManager]和限定符[[]]的Bean的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我從Quarkus網(wǎng)站設(shè)置了Quarkus/Kotlin/Gradle項(xiàng)目。
我正在嘗試使用Hibernate/panache/反應(yīng)性創(chuàng)建一個(gè)簡(jiǎn)單的反應(yīng)性API:

Quarkus 1.13.6最終版
分?jǐn)?shù)6.9
Kotlin 1.4.32
夸克斯-科特林
夸克弧
夸克斯-休眠-反應(yīng)-華麗
Quarkus-Active-PG-客戶(hù)端
QUAKUS-REST-RESPEASY-RESPECT-Jackson

接口:

@Path("incidents")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
class IncidentResource {

    @Inject
    lateinit var incidentRepository: IncidentRepository

    @GET
    @Path("hello")
    @Produces(MediaType.TEXT_PLAIN)
    fun getHello(): String = "hello"

    @GET
    fun get(): Uni<List<Incident>> = incidentRepository.findAll().list()
}

型號(hào):

@Entity
data class Incident(
        @Id
        @GeneratedValue
        @field:JsonProperty("id")
        val id: String,

        @Column(nullable = false)
        @field:JsonProperty("summary")
        val summary: String,
)

存儲(chǔ)庫(kù):

@ApplicationScoped
class IncidentRepository : PanacheRepository<Incident> {
}

/事件/Hello路徑工作正常,但/事件給我一個(gè)錯(cuò)誤:

Request failed : javax.enterprise.inject.UnsatisfiedResolutionException: No bean found for required type [interface javax.transaction.TransactionManager] and qualifiers [[]]
        at io.quarkus.arc.impl.InstanceImpl.bean(InstanceImpl.java:175)
        at io.quarkus.arc.impl.InstanceImpl.getInternal(InstanceImpl.java:196)
        at io.quarkus.arc.impl.InstanceImpl.get(InstanceImpl.java:93)
        at io.smallrye.context.jta.context.propagation.JtaContextProvider.tm(JtaContextProvider.java:120)
        at io.smallrye.context.jta.context.propagation.JtaContextProvider.currentContext(JtaContextProvider.java:34)
        at io.smallrye.context.impl.ThreadContextProviderPlan.takeThreadContextSnapshots(ThreadContextProviderPlan.java:72)
        at io.smallrye.context.impl.SlowCapturedContextState.<init>(SlowCapturedContextState.java:25)
        at io.smallrye.context.SmallRyeThreadContext.captureContext(SmallRyeThreadContext.java:729)
        at io.smallrye.context.SmallRyeThreadContext.contextualSupplier(SmallRyeThreadContext.java:719)
        at io.smallrye.mutiny.context.BaseContextPropagationInterceptor.decorate(BaseContextPropagationInterceptor.java:27)
        at io.smallrye.mutiny.infrastructure.Infrastructure.decorate(Infrastructure.java:124)
        at io.smallrye.mutiny.groups.UniCreate.completionStage(UniCreate.java:134)
        at org.hibernate.reactive.mutiny.impl.MutinySessionFactoryImpl.uni(MutinySessionFactoryImpl.java:62)
        at org.hibernate.reactive.mutiny.impl.MutinyQueryImpl.uni(MutinyQueryImpl.java:40)
        at org.hibernate.reactive.mutiny.impl.MutinyQueryImpl.getResultList(MutinyQueryImpl.java:191)
        at io.quarkus.hibernate.reactive.panache.common.runtime.CommonPanacheQueryImpl.lambda$list$4(CommonPanacheQueryImpl.java:219)
        at io.quarkus.hibernate.reactive.panache.common.runtime.CommonPanacheQueryImpl.applyFilters(CommonPanacheQueryImpl.java:323)
        at io.quarkus.hibernate.reactive.panache.common.runtime.CommonPanacheQueryImpl.list(CommonPanacheQueryImpl.java:219)
        at io.quarkus.hibernate.reactive.panache.runtime.PanacheQueryImpl.list(PanacheQueryImpl.java:149)
        at com.alert.api.IncidentResource.get(IncidentResource.kt:26)
        at com.alert.api.IncidentResource_Subclass.get$$superaccessor5(IncidentResource_Subclass.zig:733)
        at com.alert.api.IncidentResource_Subclass$$function$$8.apply(IncidentResource_Subclass$$function$$8.zig:29)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
        at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
        at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
        at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
        at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
        at com.alert.api.IncidentResource_Subclass.get(IncidentResource_Subclass.zig:691)
        at com.alert.api.IncidentResource$quarkusrestinvoker$get_407a850349137c93edc5dab2a621b8699ccd0a7c.invoke(IncidentResource$quarkusrestinvoker$get_407a850349137c93edc5dab2a621b8699ccd0a7c.zig:33)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:122)
        at org.jboss.resteasy.reactive.server.handlers.RestInitialHandler.beginProcessing(RestInitialHandler.java:47)
        at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:17)
        at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:7)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:137)
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
        at io.quarkus.vertx.http.runtime.StaticResourcesRecorder.lambda$start$1(StaticResourcesRecorder.java:65)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
        at io.vertx.ext.web.handler.impl.StaticHandlerImpl.lambda$sendStatic$1(StaticHandlerImpl.java:206)
        at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:327)
        at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
        at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)

我還有這樣的警告:

CDI: programmatic lookup problem detected
-----------------------------------------
At least one bean matched the required type and qualifiers but was marked as unused and removed during build
Removed beans:
        - CLASS bean io.smallrye.context.jta.context.propagation.JtaContextProvider$LifecycleManager [types=[class io.smallrye.context.jta.context.propagation.JtaContextProvider$LifecycleManager], qualifiers=[@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()]]
Required type: class io.smallrye.context.jta.context.propagation.JtaContextProvider$LifecycleManager
Required qualifiers: [@javax.enterprise.inject.Default()]

應(yīng)用程序.屬性

quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=test
quarkus.datasource.password=test

quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.sql-load-script=import.sql

# Reactive config
quarkus.datasource.reactive.url=postgresql://localhost:5432/test

我找不到關(guān)于此特定堆棧的適當(dāng)示例或指南,
我關(guān)注了這個(gè):https://quarkus.io/guides/hibernate-orm-panache-kotlin
有什么想法嗎?

推薦答案

它需要夸克斯-休眠-orm-panache-kotlin依賴(lài)和
quarkus.datasource.jdbc=false在應(yīng)用程序中。屬性

這篇關(guān)于Quarkus休眠未找到所需類(lèi)型[接口javax.Transaction.TransactionManager]和限定符[[]]的Bean的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,

分享到:
標(biāo)簽:Quarkus 休眠 所需 接口 未找到 類(lèi)型 限定
用戶(hù)無(wú)頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過(guò)答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫(kù),初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定