简体   繁体   English

Lombok和Web服务:无法为实现类生成WSDL定义

[英]Lombok and Web services: A WSDL Definition could not be generated for the implementation class

I'm using IBM Rational Developer and Websphere Application Server 我正在使用IBM Rational Developer和Websphere Application Server

I'm developing a java web service (with jax-ws) through annotations in an enterprise application, I have an EJB project, a Web Project where the web service is published and an EAR that holds both modules. 我正在通过企业应用程序中的注释开发Java Web服务(带有jax-ws),我有一个EJB项目,一个发布Web服务的Web项目以及一个包含两个模块的EAR。 When I deploy the EAR to WAS, I get this error message: 将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

I do not use maven nor ant to build the project. 我既不使用Maven也不使用ant来构建项目。

After long (ugh) research, i found out that the error message arises when there are problems with indirect dependencies in the web module for the classes used for the web service, ie the implementation of the web service in the EJB project makes use of a jar that itself depends on another jar that isn't provided. 经过长期(艰苦)的研究,我发现当用于Web服务的类的Web模块中的间接依赖性存在问题时,即出现错误消息,即EJB项目中Web服务的实现使用了本身依赖于另一个未提供的jar的jar。 Specifically, this problem arises when I put a lombok annotation (eg @Data or @Getter) in a class that is used by the web service implementation. 具体来说,当我在Web服务实现所使用的类中放置lombok批注(例如@Data或@Getter)时,就会出现此问题。

What baffles me is that the web service works perfectly, as does everything else. 让我感到困惑的是,Web服务和其他所有功能一样都能完美运行。 I just have this stack trace every time I deploy the project to WAS. 每次将项目部署到WAS时,我都只有堆栈跟踪信息。 So, the questions: - do I have to worry about this error message? 因此,问题是:-我是否需要担心此错误消息? - how do I get rid of it? -如何摆脱呢? I could add to the classpath all jars that lombok dependends on, but I would prefer not to (also because I can't seem to find a list of dependencies for lombok) 我可以将lombok所依赖的所有jar添加到类路径中,但我不希望这样做(也是因为我似乎找不到lombok的依赖项列表)

Thanks, and sorry for my bad english 谢谢,对不起,我英语不好

Lombok does not have any dependencies. 龙目岛没有任何依赖性。

Do you use any tools that process the source code? 您是否使用任何处理源代码的工具?

Disclosure: I am a lombok developer. 披露:我是lombok开发人员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Websphere 7错误:无法为实现类生成WSDL定义 - Websphere 7 error: A WSDL Definition could not be generated for the implementation class 用java2wsdl生成的Web服务是否可以包含多个Java类的API? - Could the web service generated with `java2wsdl` include API from more than one Java class? 将JAXB生成的类公开为WSDL Web服务 - expose JAXB generated Class as WSDL web service .class文件中不生成Lombok注解 - Lombok annotations are not generated in .class file 将生成的JAXB类与Web服务WSDL / XSD中的列表一起使用 - Use generated JAXB class with lists in web servise wsdl/xsd 使用JDK工具wsimport从.NET 2.0应用程序生成的WSDL生成Java SOAP Web服务客户端时出现问题 - Problem generating Java SOAP web services client with JDK tool wsimport from a WSDL generated by a .NET 2.0 application 将 lombok(或任何)注释添加到 swagger 生成的 class - Add lombok (or any) annotation to swagger generated class Lombok in project by Spring Initializr生成(LombokProcessor无法初始化) - Lombok in project generated by Spring Initializr (LombokProcessor could not be initialized) 从WSDL链接Java访问Web服务 - access web services from WSDL link java 为什么在Java Web服务中将xsd与wsdl一起使用 - why use xsd with wsdl in java Web services
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM