-
JAX-WS webservice部署到weblogic11出错0
用myeclipse生成的JAX-WS webservice服务端在tomcat下运行正常,部署到weblogic11上出错,期望大虾能帮忙,在网上找了好久说是要导入weblogic的几个jar包具体怎么样也没有说明
错误代码和 java代码如下 如下
2013-8-22 19:23:03 com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
严重: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExte
nsion: Provider weblogic.wsee.jaxws.framework.policy.WSDLGeneratorExtension is specified in jar:file:/D:/oracle/Middleware/wlserver_10.3/server/lib/we
blogic.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtensionbut could not be instantiated: java.lang.ClassCastException
com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension: Provider weblogic.wsee.jaxws.framework.policy.WS
DLGeneratorExtension is specified in jar:file:/D:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.w
riter.WSDLGeneratorExtensionbut could not be instantiated: java.lang.ClassCastException
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:442)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:209)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:509)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:127)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:148)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1872)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
... 44 more
<2013-8-22 下午07时23分03秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.xml.ws.transport.http.servlet.WSServletContextListener f
ailed: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigura
tionError: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension: Provider weblogic.wsee.jaxws.framework.policy.WSDLGeneratorExtension is specified in
jar:file:/D:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtensionbut coul
d not be instantiated: java.lang.ClassCastException.
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigurationErr
or: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension: Provider weblogic.wsee.jaxws.framework.policy.WSDLGeneratorExtension is specified in jar:fi
le:/D:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtensionbut could not b
e instantiated: java.lang.ClassCastException
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:137)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:148)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
Truncated. see log file for complete stacktrace
Caused By: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension: Provider weblogic.wsee.jaxws.framewor
k.policy.WSDLGeneratorExtension is specified in jar:file:/D:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws
.api.wsdl.writer.WSDLGeneratorExtensionbut could not be instantiated: java.lang.ClassCastException
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:442)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:442)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:209)
Truncated. see log file for complete stacktrace
>
2013-8-22 19:23:03 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
信息: WSSERVLET13: JAX-WS context listener destroyed
<2013-8-22 下午07时23分03秒 CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'webapp'.
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:442)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:209)
Truncated. see log file for complete stacktrace
>
<2013-8-22 下午07时23分03秒 CST> <Notice> <LoggingService> <BEA-320400> <The log file D:\oracle\Middleware\user_projects\domains\base_domain3\servers\
AdminServer\logs\base_domain3.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<2013-8-22 下午07时23分03秒 CST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to D:\oracle\Middleware\user_projects\domains\b
ase_domain3\servers\AdminServer\logs\base_domain3.log00019. Log messages will continue to be logged in D:\oracle\Middleware\user_projects\domains\base
_domain3\servers\AdminServer\logs\base_domain3.log.>
<2013-8-22 下午07时23分03秒 CST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Servic
e successfully.>
<2013-8-22 下午07时23分04秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2013-8-22 下午07时23分04秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2013-8-22 下午07时23分04秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:0:100:7f:fffe:7001 for protocols
iiop, t3, ldap, snmp, http.>
<2013-8-22 下午07时23分04秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on fe80:0:0:0:3c8d:4043:6cbd:c03c:7001 for prot
ocols iiop, t3, ldap, snmp, http.>
<2013-8-22 下午07时23分04秒 CST> <Warning> <Server> <BEA-002611> <Hostname "huyrjb-PC", maps to multiple IP addresses: 192.168.220.217, fe80:0:0:0:3c8
d:4043:6cbd:c03c%11>
<2013-8-22 下午07时23分04秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on fe80:0:0:0:0:5efe:c0a8:dcd9:7001 for protoco
ls iiop, t3, ldap, snmp, http.>
<2013-8-22 下午07时23分04秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[5]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3,
ldap, snmp, http.>
<2013-8-22 下午07时23分04秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.220.217:7001 for protocols iiop, t3, ld
ap, snmp, http.>
<2013-8-22 下午07时23分04秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[4]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap,
snmp, http.>
<2013-8-22 下午07时23分04秒 CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "base_domain3" running
in Development Mode>
<2013-8-22 下午07时23分04秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<2013-8-22 下午07时23分04秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
java---------------------------代码如下
@WebService(targetNamespace = "http://www.***.***/", serviceName = "QueryTaskInfosService" )
public class QueryTaskInfosDelegate {
com.huiye.webservice.server.QueryTaskInfos queryTaskInfos = new com.huiye.webservice.server.QueryTaskInfos();
@WebMethod(action = " queryTaskInfoBySource " , operationName = " queryTaskInfoBySource " )
public String queryTaskInfoBySource(@WebParam(name = " taskSource " )String taskSource) {
return queryTaskInfos.queryTaskInfoBySource(taskSource);
}
}2013年8月22日 19:25
1个答案 按时间排序 按投票排序
-
采纳的答案
很多项目迁移到weblogic下部署都会遇到若干问题。究其原因,这些问题90%都是由于jar包冲突导致的。因为weblogic作为一款商业的中间件产品,囊括了很多优秀的特性在里面,当然同时也把大量的开源技术集成在weblogic的classpath下面。所以当你出现class转换失败,找不到class的某个方法等等错误时,第一步,先在WEB-INF下面增加一个weblogic.xml配置文件,然后配置如下:
<?xml version="1.0" encoding="UTF-8"?> <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd"> <wls:container-descriptor> <wls:prefer-application-packages> <wls:package-name>javax.persistence.*</wls:package-name> <wls:package-name>antlr.*</wls:package-name> <wls:package-name>com.bea.xbean.*</wls:package-name> <wls:package-name>com.bea.xml.*</wls:package-name> </wls:prefer-application-packages> </wls:container-descriptor> </wls:weblogic-web-app>
prefer-application-packages配置的目的是让weblogic从web应用中加载指定的class,而不是从weblogic的classpath加载weblogic自己整合的class。2013年8月22日 19:49
相关推荐
使用weblogic12c发布jax-ws的webservice服务端,启动时报错“metro-default.xml not fund ”百度了很长时间,方案都不能解决问题,后来goole了一下,参考了一个网页,非常管用,考虑到google有些同学没法访问,特地...
在实际应用中,JAX-WS通常与Java EE服务器(如Tomcat、JBoss或WebLogic)一起使用,或者在Java SE环境中通过Apache CXF、Metro等实现库来提供和使用Web服务。开发者可以利用JAX-WS的强大功能,轻松地构建符合SOA...
通过以上步骤,我们可以成功地使用Myeclipse 8.5开发并部署一个基于JAX-WS的Web Service。理解Web Service的基础知识对于开发人员来说至关重要,同时熟悉JAX-WS框架可以帮助我们更高效地开发Web Service应用。希望本...
2. **更新服务器配置**:在WebLogic的部署描述符(weblogic.xml)中,添加对metro-default.xml的引用,或者在服务器级别的weblogic-application.xml中配置。 3. **验证类路径**:确认服务器的类路径包含了metro-...
5. **Deployable Artifact**:JAX-WS服务可以部署到应用服务器上,如Tomcat、JBoss或WebLogic等,以便其他客户端可以通过网络调用。 在压缩包"webservice的jar"中,可能包含的类和库有: - `javax.xml.ws.*` 包:...
- **部署描述符**:`weblogic-ws.xml`和`sun-jaxws.xml`文件用于定义Web服务的特定配置。 - **安全设置**:WebLogic支持WS-Security标准,允许设置证书、数字签名和消息加密等安全策略。 5. **源码开发与工具** ...
WebService可以部署在各种应用服务器上,如Tomcat、JBoss或WebLogic。部署后,服务可以通过URL访问,且该URL通常在WSDL文件中给出。 8. WebService安全 考虑到安全性,可以采用HTTPS协议加密通信,使用WS-...
7. **容器集成**:在实际项目中,Web Service通常部署在应用服务器(如Tomcat、JBoss、WebLogic等)上,这些服务器通常提供对JAX-WS的集成和支持,简化部署和管理。 总结来说,Java 6通过内置的JAX-WS简化了Web ...
3. **服务部署**:将服务部署到应用服务器(如Tomcat、JBoss或WebLogic)。 4. **服务注册**:通过UDDI或类似机制,使服务可以在企业内部或外部被发现。 5. **服务消费**:使用Java客户端或者任何支持Web服务标准的...
- **WebLogic 支持的标准**:列出了 WebLogic Server 支持的一系列标准和技术规范,包括 SOAP、SAAJ、WSDL、JAX-RPC、Web 服务安全(WS-Security)、UDDI、JAX-R 等。 - **BEA 实现的 Web 服务规范**:具体说明了 ...
1. **JAX-WS(Java API for XML Web Services)**:EJB 3.0支持JAX-WS,允许直接在Bean上使用`@WebService`注解,将Bean暴露为Web服务。服务端点接口(SEI)可以通过注解自动生成。 2. **SOAP与RESTful风格**:EJB ...
本指南旨在详细阐述如何基于JAX-WS规范进行WebService服务的开发和使用。JAX-WS(Java API for XML Web Services)是Java平台中的一个标准,自JDK5开始引入,用于简化SOAP Web服务的创建和消费。以下是JAX-WS开发Web...
Apache CXF还支持与多种Java EE应用服务器的集成,例如WebSphere、JBoss、WebLogic和Tomcat等,这意味着开发的服务可以轻松部署到不同的应用服务器环境。 服务集成总线(ESB)概念在文档中被提及,它是一种实现服务...
JAX-WS是Java SE和EE中用于构建SOAP(Simple Object Access Protocol)WebService的标准API,它简化了服务的创建过程。Apache CXF则是一个开源框架,支持JAX-WS和其他协议,如RESTful服务,提供了更丰富的功能和灵活...
使用weblogic12c发布jax-ws的webservice服务端,或升级weblogic到weblogic12.1.3,启动时报错“metro-default.xml not fund 错误的解决办法。
这使得CXF具有高度的灵活性,能够在轻量级容器(如Tomcat)到全功能的J2EE应用服务器(如Geronimo、JOnAS、JBoss、WebLogic和WebSphere)等各种环境中部署。 为了满足不同编程需求,CXF提供了全面的API支持,包括...
- J2EE 集成:可以将服务部署到 J2EE 应用服务器(如 Geronimo, JOnAS, JBoss, WebLogic, WebSphere)中。 - Java 客户端/服务端独立性:支持 Java 客户端和服务端的独立开发和部署。 5. **支持多种编程语言**: ...
部署方面,CXF非常灵活,可以轻松部署到轻量级容器(如Tomcat)或JBI容器(如ServiceMix),也能集成到J2EE应用服务器(如Geronimo、JOnAS、JBoss、WebLogic和WebSphere)。此外,CXF的Java客户端和服务端具有很好的...
- **部署服务**:将服务打包成WAR或JAR文件,部署到支持Servlet容器(如Tomcat)或应用服务器(如JBoss、WebLogic)。 #### 2. **客户端实现** 客户端,即服务消费者,负责调用服务端提供的功能。以下是一般步骤:...