首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

weblogic92上部署JAX-WS

2012-10-06 
weblogic92下部署JAX-WS在weblogic.xml中设置jar包的引用方式weblogic-web-appcontainer-descriptorp

weblogic92下部署JAX-WS
在weblogic.xml中设置jar包的引用方式

<weblogic-web-app>   <container-descriptor>        <prefer-web-inf-classes>true</prefer-web-inf-classes>    </container-descriptor>   </weblogic-web-app>

但是报出了以下错误
2010-3-19 13:40:48 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized信息: WSSERVLET12: JAX-WS context listener initializing2010-3-19 13:40:48 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized严重: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;        at com.sun.xml.ws.model.RuntimeModeler.getPortName(RuntimeModeler.java:1299)        at com.sun.xml.ws.server.EndpointFactory.getDefaultPortName(EndpointFactory.java:376)        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:234)        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)        at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)        at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:376)        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)        at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:82)        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1616)        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2761)        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:889)        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333)        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)        at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:815)        at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1222)        at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:433)        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)        at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)<2010-3-19 下午01时40分48秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.xml.ws.transport.http.servlet.WSServletContextListener failed: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;.com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;        at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)        at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:376)        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)        at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:82)        Truncated. see log file for complete stacktracejava.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;        at com.sun.xml.ws.model.RuntimeModeler.getPortName(RuntimeModeler.java:1299)        at com.sun.xml.ws.server.EndpointFactory.getDefaultPortName(EndpointFactory.java:376)        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:234)        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)        at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)        Truncated. see log file for complete stacktrace>

在网上搜索到得解决方法
This fixed it:
Re: Deploying JAX-WS on WebLogic 9.2
Posted: Apr 9, 2008 6:48 AM in response to: xenocid2000
Reply

IMO the simplest way of getting JAX-WS (Metro 1.1 distribution) to work on WLS 9.2 is:

1. create an EAR with your war embedded in it
2. in META-INF/weblogic-application.xml of your ear you should put
<prefer-application-packages>
<package-name>javax.jws.*</package-name>
<package-name>javax.xml.soap.*</package-name>
</prefer-application-packages>
This prevents you from having to tamper with the classpath in startup scripts.
3. required libraries: put the webservices*.jar from the lib directory in the Metro distribution to WEB-INF/lib of your war application.

That's it (at least from me, using a stock 9.2MP2 installation).

HTH
Jorg
Copied from http://forums.java.net/jive/thread.jspa?messageID=216363

Also refer:
http://blog.jonschneider.com/2009/02/getting-jax-ws-to-work-with-weblogic-92.html

http://www.jroller.com/gmazza/entry/deploying_metro_and_cxf_based
http://forums.oracle.com/forums/thread.jspa?threadID=857671

热点排行