spring+jersey集成问题-springscopecontext必须在singleton范围内

yxyvkwin  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(243)

我很难把泽西和Spring结合起来。启动服务器时出现以下异常。
泽西岛2.32, Spring 5.2.12,weblogic:12.2.1.3
警告:检测到以下警告:警告:在未在活动错误范围内运行的代码中检测到hk2故障。警告:检测到未知hk2故障:多异常堆栈1(共1个)java.lang.illegalargumentexception:实现类org.jvnet.hk2.spring.bridge.internal.springscopecontext必须位于org.jvnet.hk2.internal.servicelocatorimpl.checkconfiguration(servicelocatorimpl)的单例作用域中。java:1722)在org.jvnet.hk2.internal.servicelocatorimpl.addconfiguration(servicelocatorimpl。java:2118)在org.jvnet.hk2.internal.dynamicconfigurationimpl.commit(dynamicconfigurationimpl。java:286)在org.jvnet.hk2.spring.bridge.internal.springbridgeimpl.initializespringbridge(springbridgeimpl。java:64)在org.glassfish.jersey.server.spring.springcomponentprovider.initialize(springcomponentprovider)。java:87)在org.glassfish.jersey.server.componentproviderconfigurator.lambda$null$0(componentproviderconfigurator。java:55)在java.util.stream.referencepipeline$11$1.accept(referencepipeline。java:439)在java.util.stream.referencepipeline$3$1.accept(referencepipeline。java:193)在java.util.arraylist$arraylistspliterator.foreachremaining(arraylist。java:1384)在java.util.stream.abstractpipeline.copyinto(abstractpipeline。java:482)在java.util.stream.abstractpipeline.wrapandcopyinto(abstractpipeline。java:472)在java.util.stream.reduceops$reduceop.evaluatesequential(reduceops。java:708)在java.util.stream.abstractpipeline.evaluate(abstractpipeline。java:234)在java.util.stream.referencepipeline.collect(referencepipeline。java:566)位于org.glassfish.jersey.server.componentproviderconfigurator.lambda$init$1(componentproviderconfigurator。java:56)在org.glassfish.jersey.internal.util.collection.values$lazyvalueimpl.get(值。java:317)在org.glassfish.jersey.server.applicationconfigurator.createapplication(applicationconfigurator。java:98)在org.glassfish.jersey.server.applicationconfigurator.init(applicationconfigurator。java:72)在org.glassfish.jersey.server.applicationhandler.lambda$initialize$0(applicationhandler。java:290)在java.util.arrays$arraylist.foreach(arrays。java:3880)在org.glassfish.jersey.server.applicationhandler.initialize(applicationhandler。java:290)在org.glassfish.jersey.server.applicationhandler.(applicationhandler。java:259)在org.glassfish.jersey.servlet.webcomponent.(网络组件。java:311)在org.glassfish.jersey.servlet.servletcontainer.init(servletcontainer。java:154)在org.glassfish.jersey.servlet.servletcontainer.init(servletcontainer。java:347)在javax.servlet.genericservlet.init(genericservlet。java:244)在weblogic.servlet.internal.stubsecurityhelper$servletinitaction.run(stubsecurityhelper)。java:343)在weblogic.servlet.internal.stubsecurityhelper$servletinitiaction.run(stubsecurityhelper。java:294)在weblogic.security.acl.internal.authenticatedsubject.doas(authenticatedsubject。java:326)在weblogic.security.service.securitymanager.runasforusercode(securitymanager。java:197)在weblogic.servlet.provider.wlssecurityprovider.runasforusercode(wlssecurityprovider。java:203)在weblogic.servlet.provider.wlssobjecthandle.run(wlssobjecthandle。java:71)在weblogic.servlet.internal.stubsecurityhelper.initservletinstance(stubsecurityhelper。java:99)在weblogic.servlet.internal.stubsecurityhelper.createservlet(stubsecurityhelper。java:87)在weblogic.servlet.internal.stublifecyclehelper.createoneinstance(stublifecyclehelper。java:71)在weblogic.servlet.internal.stublifecyclehelp.(stublifecyclehelp。java:57)在weblogic.servlet.internal.stublifecyclehelp.(stublifecyclehelp。java:31)在weblogic.servlet.internal.servletstubimpl.initstublifecyclehelp(servletstubimpl。java:673)在weblogic.servlet.internal.servletstubimpl.prepareservlet(servletstubimpl。java:612)在weblogic.servlet.internal.webappservletcontext.preloadservlet(webappservletcontext。java:2064)在weblogic.servlet.internal.webappservletcontext.loadservletsonstartup(webappservletcontext。java:2041)在weblogic.servlet.internal.webappservletcontext.preloadresources(webappservletcontext。java:1930)在weblogic.servlet.internal.webappservletcontext.start(webappservletcontext。java:3101) .... .... .... org.glassfish.hk2.utilities.reflection.reflectionhelper.invoke(reflectionhelper。java:1287)网址:org.jvnet.hk2.internal.clazzcreator.postconstructme(clazzcreator.com)。java:333)在org.jvnet.hk2.internal.clazzcreator.create(clazzcreator。java:375)在org.jvnet.hk2.internal.systemdescriptor.create(systemdescriptor。java:487)在org.glassfish.hk2.runlevel.internal.asyncrunlevelcontext.findorcreate(异步RunlevelContext。java:305)在org.glassfish.hk2.runlevel.runlevelcontext.findorcreate(runlevelcontext。java:85)在org.jvnet.hk2.internal.utilities.createservice(utilities。java:2126)在org.jvnet.hk2.internal.servicehandleimpl.getservice(servicehandleimpl。java:116)在org.jvnet.hk2.internal.servicelocatorimpl.getservice(servicelocatorimpl。java:698)在org.jvnet.hk2.internal.threethirtyresolver.resolve(threethirtyresolver。java:78)在org.jvnet.hk2.internal.clazzcreator.resolve(clazzcreator。java:212)在org.jvnet.hk2.internal.clazzcreator.resolvealldependencies(clazzcreator。java:235)在org.jvnet.hk2.internal.clazzcreator.create(clazzcreator。java:358)在org.jvnet.hk2.internal.systemdescriptor.create(systemdescriptor。java:487)位于org.glassfish.hk2.runlevel.internal.asyncrunlevelcontext.findorcreate(asyncrunlevelcontext)。java:305)在org.glassfish.hk2.runlevel.runlevelcontext.findorcreate(runlevelcontext。java:85)在org.jvnet.hk2.internal.utilities.createservice(实用程序。java:2126)在org.jvnet.hk2.internal.servicehandleimpl.getservice(servicehandleimpl。java:116)在org.jvnet.hk2.internal.servicehandleimpl.getservice(servicehandleimpl。java:90)在org.glassfish.hk2.runlevel.internal.currenttaskfuture$queuerunner.onejob(currenttaskfuture。java:1237)在org.glassfish.hk2.runlevel.internal.currenttaskfuture$queuerunner.run(currenttaskfuture。java:1168)在
<2021年3月1日上午5:33:15903 cst><servlet:“rest web应用程序”在web应用程序“ws.war”中启动时预加载失败。多重异常有1个异常。他们是:
java.lang.illegalargumentexception:实现类org.jvnet.hk2.spring.bridge.internal.springscopecontext必须在singleton范围内
在org.jvnet.hk2.internal.servicelocatorimpl.checkconfiguration(servicelocatorimpl。java:1722)在org.jvnet.hk2.internal.servicelocatorimpl.addconfiguration(servicelocatorimpl。java:2118)在org.jvnet.hk2.internal.dynamicconfigurationimpl.commit(dynamicconfigurationimpl。java:286)在org.jvnet.hk2.spring.bridge.internal.springbridgeimpl.initializespringbridge(springbridgeimpl。java:64)位于org.glassfish.jersey.server.spring.springcomponentprovider.initialize(springcomponentprovider)。java:87)截断。请参阅日志文件以获取由以下原因引起的完整stacktrace:java.lang.illegalargumentexception:实现类org.jvnet.hk2.spring.bridge.internal.springscopecontext必须位于org.jvnet.hk2.internal.servicelocatorimpl.checkconfiguration(servicelocatorimpl)的singleton作用域中。java:1722)在org.jvnet.hk2.internal.servicelocatorimpl.addconfiguration(servicelocatorimpl。java:2118)在org.jvnet.hk2.internal.dynamicconfigurationimpl.commit(dynamicconfigurationimpl。java:286)在org.jvnet.hk2.spring.bridge.internal.springbridgeimpl.initializespringbridge(springbridgeimpl。java:64)在org.glassfish.jersey.server.spring.springcomponentprovider.initialize(springcomponentprovider)。java:87)截断。有关完整的stacktrace,请参阅日志文件

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题