![](/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.