java - 无法部署 Intellij 项目
问题描述
我基本上是在 Intellij 上运行一个 Java Web 应用程序,当我尝试部署和运行它时它运行良好。
当我从源代码管理中提取同事的代码以获取最新更改时,我无法启动我的项目并引发此错误:
Artifact Application:ear exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while deploying the app [Application-9.7.0] : Servlet [RegistrationCoordinatorPortTypePortImpl] and Servlet [RegistrationRequesterPortTypePortImpl] have the same url pattern: [/RegistrationService_V10]. Related annotation information: annotation [@javax.jws.WebService(wsdlLocation=/wsdls/wsc10/wscoor.wsdl, targetNamespace=http://schemas.xmlsoap.org/ws/2004/10/wscoor, name=, endpointInterface=com.sun.xml.ws.tx.coord.v10.types.RegistrationRequesterPortType, portName=RegistrationRequesterPortTypePort, serviceName=RegistrationService_V10)] on annotated element [class com.sun.xml.ws.tx.coord.v10.endpoint.RegistrationRequesterPortTypePortImpl] of type [TYPE]. Please see server.log for more details.
在 Glassfish 日志中,它说:
Caused by: java.lang.IllegalArgumentException: Servlet [RegistrationCoordinatorPortTypePortImpl] and Servlet [RegistrationRequesterPortTypePortImpl] have the same url pattern: [/RegistrationService_V10]
at org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl.addWebComponentDescriptor(WebBundleDescriptorImpl.java:362)
at org.glassfish.webservices.connector.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:461)
at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:148)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:350)
... 60 more
]]
我已经在这个线程中查看了其他有类似问题的人,但它不适用于我的情况。更重要的是,为什么会发生这种情况?
这个问题的原因是什么,我该如何解决它或看什么?
解决方案
从堆栈跟踪看起来您有两个具有相同路径的 servlet:
"/RegistrationService_V10"
此类错误只能在运行时出现。通常,您的路径在整个项目中应该是不同的。
推荐阅读
- django - 在 Django ModelSerializer 中,无法将所需字段标记为 false
- excel - 如果查找值 MATCH,则在最后一个匹配值的另一个单元格中查找
- scipy - 如何解决大条件数的 Ax=b
- typo3 - Zabbix 同时查询每个项目(初始)
- javascript - 是否有一种解决方法可以在不获取 999 代码的情况下检查损坏的 LinkedIn URL?(在 G-Sheets 上使用自定义 JavaScript 函数)
- reactjs - 赛普拉斯 - 单击取决于表格上另一个复选框的值的复选框
- c++ - 程序不在 Visual Studio 上构建
- pandas - Pandas 基于特定格式的列进行分组
- javascript - 使用 getDisplayMedia 进行屏幕共享并对共享 url 更改做出反应
- javascript - 我试图让不和谐的机器人踢用户并且它不工作