gpt4 book ai didi

java - Web服务客户端类作品;但在 servlet 中使用时出现部署错误

转载 作者:行者123 更新时间:2023-11-29 08:47:19 27 4
gpt4 key购买 nike

我正在使用 JDeveloper 12c 从 WSDL 文件生成“Web 客户端和代理”。它运行良好并生成了一个 Client 类来测试服务的调用。这个客户端工作正常。

然后我生成了一个测试 servlet 并确保它正常工作。

我将相同的 Web 服务调用代码粘贴到一个 servlet 中,在部署时我遇到了这个异常:

    Caused By: java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.parseAnnotations(ServiceRefProcessorImpl.java:199)
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.parseAnnotations(ServiceRefProcessorImpl.java:150)
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.createTargetRef(ServiceRefProcessorImpl.java:106)
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.bindServiceRef(ServiceRefProcessorImpl.java:385)
at weblogic.application.naming.EnvironmentBuilder.bindServiceRef(EnvironmentBuilder.java:1109)
at weblogic.application.naming.EnvironmentBuilder.bindServiceReferences(EnvironmentBuilder.java:1073)
at weblogic.application.naming.EnvironmentBuilder.bindServiceReferences(EnvironmentBuilder.java:1418)
at weblogic.application.naming.EnvironmentBuilder.bindEnvEntriesFromDDs(EnvironmentBuilder.java:1986)
at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:198)
at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:2797)
at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1648)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:804)
at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:317)
at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:313)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:121)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:145)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:586)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:148)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:114)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

我在 Google 上没有得到很多有用的结果。你能帮忙吗?谢谢!

最佳答案

将 metro-default.xml 放在 WEB-INF/classes/META-INF 中可以解决问题。由于引入了基于 Tube 的消息传递,需要 jaxws-ri-2.2.8 jar 才能使 Web 服务正常工作。

关于java - Web服务客户端类作品;但在 servlet 中使用时出现部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24453449/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com