![](/img/trans.png)
[英]Websphere 7 error: A WSDL Definition could not be generated for the implementation class
[英]Lombok and Web services: A WSDL Definition could not be generated for the implementation class
我正在使用IBM Rational Developer和Websphere Application Server
我正在通过企业应用程序中的注释开发Java Web服务(带有jax-ws),我有一个EJB项目,一个发布Web服务的Web项目以及一个包含两个模块的EAR。 将EAR部署到WAS时,出现以下错误消息:
[26/05/17 16.37.38:254 CEST] 00000057 WSModuleDescr E WSWS7027E: Impossibile creare correttamente le descrizioni del servizio JAX-WS a causa del seguente errore: javax.xml.ws.WebServiceException: WSWS7054E: Impossibile generare il file WSDL (Web Services Description Language) per la classe di implementazione del servizio Web it.bz.prov.as400.personal.logic.AnagraficaImpl a causa del seguente errore: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: it.bz.prov.as400.personal.logic.AnagraficaImpl
at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:262)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.generateWSDL(EndpointDescriptionImpl.java:2084)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:434)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:401)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:297)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:273)
at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:524)
at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.buildJAXWSServices(WSModuleDescriptorImpl.java:1364)
at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl._containsJAXWSWebServices(WSModuleDescriptorImpl.java:538)
at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.containsJAXWSWebServices(WSModuleDescriptorImpl.java:513)
at com.ibm.ws.webservices.admin.utils.ServiceContainmentHelper.<init>(ServiceContainmentHelper.java:71)
at com.ibm.ws.webservices.admin.utils.CommonUtils.getServiceContianmentHelper(CommonUtils.java:690)
at com.ibm.ws.webservices.admin.utils.CommonUtils.hasWebServices(CommonUtils.java:295)
at com.ibm.ws.webservices.admin.utils.CommonUtils.hasJAXWSWebServices(CommonUtils.java:238)
at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.getWebServiceType(DeploymentValidation.java:309)
at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.validateEarModules(DeploymentValidation.java:381)
at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.validateTargetForPartialUpdate(DeploymentValidation.java:1182)
at com.ibm.ws.webservices.admin.deploy.ServiceIndexServerTask.performTask(ServiceIndexServerTask.java:168)
at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:315)
at java.lang.Thread.run(Thread.java:790)
Caused by: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: it.bz.prov.as400.personal.logic.AnagraficaImpl
at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:242)
... 19 more
我既不使用Maven也不使用ant来构建项目。
经过长期(艰苦)的研究,我发现当用于Web服务的类的Web模块中的间接依赖性存在问题时,即出现错误消息,即EJB项目中Web服务的实现使用了本身依赖于另一个未提供的jar的jar。 具体来说,当我在Web服务实现所使用的类中放置lombok批注(例如@Data或@Getter)时,就会出现此问题。
让我感到困惑的是,Web服务和其他所有功能一样都能完美运行。 每次将项目部署到WAS时,我都只有堆栈跟踪信息。 因此,问题是:-我是否需要担心此错误消息? -如何摆脱呢? 我可以将lombok所依赖的所有jar添加到类路径中,但我不希望这样做(也是因为我似乎找不到lombok的依赖项列表)
谢谢,对不起,我英语不好
龙目岛没有任何依赖性。
您是否使用任何处理源代码的工具?
披露:我是lombok开发人员。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.