我正在部署一个java EE应用程序。在构建和部署它时遇到一些错误。试图解释它,但没有线索。我将JDBC和glassfish 4.01用于此实验目的。
SEVERE: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationCoordinatorPortTypePortImpl] have the same url pattern: [/RegistrationService_V10]
SEVERE: Exception while deploying the app [bank]
SEVERE: Exception during lifecycle processing
以下错误:
WARNING: The web application [unknown] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
WARNING: The web application [unknown] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
SEVERE: Exception while deploying the app [bank] : Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationCoordinatorPortTypePortImpl] 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.RegistrationCoordinatorPortType, portName=RegistrationCoordinatorPortTypePort, serviceName=RegistrationService_V10)] on annotated element [class com.sun.xml.ws.tx.coord.v10.endpoint.RegistrationCoordinatorPortTypePortImpl] of type [TYPE]
我的web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/account.xhtml</welcome-file>
</welcome-file-list>
</web-app>
答案 0 :(得分:2)
我有完全相同的问题,并且能够通过更改我的一个Maven依赖项来修复它。 glassfish-embedded-all.jar导致问题,一旦删除,我的应用程序正常启动。不幸的是我不能告诉你巫婆其他的lib它是冲突的,但有一些挖掘你可能会发现它。
希望这有帮助。
我改变了
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1.1</version>
</dependency>
到
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
</dependency>
答案 1 :(得分:1)
确保所有JSF @ConversationalScoped或@ViewScoped控制器都实现了java.io.Serializable。