Glassfish:一个或多个Web片段以冲突的方式定义相同的Servlet,并且未在web.xml中定义Servlet

时间:2014-10-08 14:05:26

标签: java servlets glassfish

我试图在Glassfish上部署一个Web应用程序,但它没有出现错误"一个或多个Web片段以冲突的方式定义了相同的Servlet,而Servlet则没有在web.xml"中定义,这很奇怪,因为应用程序在Tomcat上完美部署。

这是日志:

[#|2014-10-08T10:46:41.413-0300|INFO|oracle-glassfish3.1.2|org.glassfish.admingui|_ThreadID=83;_ThreadName=Thread-2;|uploadFileName=JLite.war|#]

[#|2014-10-08T10:46:52.475-0300|INFO|oracle-glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices.metroglue|_ThreadID=41;_ThreadName=Thread-2;|WS10010: Web service endpoint deployment events listener registered successfully.|#]

[#|2014-10-08T10:46:53.694-0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=41;_ThreadName=Thread-2;|Class [ org/eclipse/jetty/util/thread/ThreadPool ] not found. Error while loading [ class org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine ]|#]

[#|2014-10-08T10:46:53.902-0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=41;_ThreadName=Thread-2;|Class [ org/eclipse/jetty/util/thread/ThreadPool ] not found. Error while loading [ class org.apache.cxf.transport.http_jetty.spring.JettyHTTPServerEngineBeanDefinitionParser$SpringJettyHTTPServerEngine ]|#]

[#|2014-10-08T10:46:54.231-0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=41;_ThreadName=Thread-2;|Class [ Lorg/eclipse/jetty/util/component/Container$Listener; ] not found. Error while loading [ class org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory ]|#]

[#|2014-10-08T10:46:55.011-0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=41;_ThreadName=Thread-2;|Class [ Lorg/eclipse/jetty/util/component/Container$Listener; ] not found. Error while loading [ class org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory ]|#]

[#|2014-10-08T10:46:55.027-0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=41;_ThreadName=Thread-2;|Class [ org/eclipse/jetty/util/thread/ThreadPool ] not found. Error while loading [ class org.apache.cxf.transport.http_jetty.spring.JettyHTTPServerEngineBeanDefinitionParser$SpringJettyHTTPServerEngine ]|#]

[#|2014-10-08T10:46:55.027-0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=41;_ThreadName=Thread-2;|Class [ org/eclipse/jetty/util/thread/ThreadPool ] not found. Error while loading [ class org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine ]|#]

[#|2014-10-08T10:46:55.105-0300|SEVERE|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=41;_ThreadName=Thread-2;|Exception while deploying the app [JLite]|#]

[#|2014-10-08T10:46:55.105-0300|SEVERE|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=41;_ThreadName=Thread-2;|One or more web fragments define the same Servlet in a conflicting way, and the Servlet is not defined in web.xml
java.lang.IllegalArgumentException: One or more web fragments define the same Servlet in a conflicting way, and the Servlet is not defined in web.xml
    at com.sun.enterprise.deployment.WebBundleDescriptor.combineWebComponentDescriptor(WebBundleDescriptor.java:405)
    at com.sun.enterprise.deployment.WebBundleDescriptor.addWebComponentDescriptor(WebBundleDescriptor.java:355)
    at com.sun.enterprise.deployment.WebBundleDescriptor.addCommonWebBundleDescriptor(WebBundleDescriptor.java:209)
    at com.sun.enterprise.deployment.WebBundleDescriptor.addWebBundleDescriptor(WebBundleDescriptor.java:162)
    at com.sun.enterprise.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:379)
    at com.sun.enterprise.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:89)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:406)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:380)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:243)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:252)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:185)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:827)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:769)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
    at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)
    at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:207)
    at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
    at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
    at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:745)
|#]

这是我的web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!--
 * Copyright 2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      version="3.0"> 

    <!-- This web.xml can be used during debugging, when there is no myfaces.jar
    library available.

    The faces-config.xml file (that is normally in the myfaces.jar) must be
    copied to the /WEB-INF directory of the web context.

    The TLDs (that are normally in the myfaces.jar) must be
    copied to the /WEB-INF/lib directory of the web context.-->
    <description>Debug web.xml</description>

    <context-param>
        <description> Comma separated list of URIs of (additional) faces config files. (e.g. /WEB-INF/my-config.xml) See JSF 1.0 PRD2, 10.3.2</description>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/META-INF/faces-config.xml</param-value>
    </context-param>

    <context-param>
        <description> State saving method: "client" or "server" (= default) See JSF Specification 2.5.2</description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <description> This parameter tells MyFaces if javascript code should be allowed in
            the rendered HTML output. If javascript is allowed, command_link anchors will
            have javascript code that submits the corresponding form. If javascript is not
            allowed, the state saving info and nested parameters will be added as url
            parameters. Default: "true"
        </description>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>

    <context-param>
        <description> If true, rendered HTML code will be formatted, so that it is "human
            readable". i.e. additional line separators and whitespace will be written,
            that do not influence the HTML code. Default: "true"
        </description>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <description> If true, a javascript function will be rendered that is able to restore
            the former vertical scroll on every request. Convenient feature if you have
            pages with long lists and you do not want the browser page to always jump to the top
            if you trigger a link or button action that stays on the same page. Default:
            "false"
        </description>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- 
        Desabilita PARTIAL_STATE_SAVING para contornar um bug com o escopo 'view' no Mojarra 2.1; 
        quando for lançada a 2.2, isto pode, em teoria, ser removido.
        http://stackoverflow.com/questions/10337015/should-partial-state-saving-be-set-to-false 
    -->
    <context-param>
        <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
        <param-value>false</param-value>
    </context-param>    

    <!-- 
    <context-param>
        <description>
            Validate managed beans, navigation rules and ensure that forms are not nested.
        </description>
        <param-name>org.apache.myfaces.VALIDATE</param-name>
        <param-value>true</param-value>
    </context-param>
    -->

    <context-param>
        <param-name>org.apache.myfaces.secret</param-name>
        <param-value>NzY1NDMyMTA=</param-value>
    </context-param>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:META-INF/spring-*.xml, /META-INF/spring-*.xml</param-value>
    </context-param>

    <!-- Use Documents Saved as *.xhtml --> 
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>

    <!-- Skin do RichFaces -->
    <context-param>
        <param-name>org.richfaces.skin</param-name>
        <param-value>plain</param-value>
    </context-param>
    <context-param>
        <param-name>org.richfaces.enableControlSkinning</param-name>
        <param-value>false</param-value>
    </context-param>

    <!-- Usa a timezone do sistema operacional -->  
    <context-param>
        <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- "Desminifica" os javascripts do JSF (descomente para ativar) -->
    <!--
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>   
        <param-value>Development</param-value>
    </context-param>
    -->

    <!-- Filtro de codificação dos caracteres -->
    <filter>
        <filter-name>characterEncodingFilter</filter-name>
        <filter-class>com.ats.framework.view.filter.CharacterEncodingFilter</filter-class>
    </filter>

    <!-- Filtro de id do contexto de conversação -->
    <filter>
        <filter-name>conversationContextIdFilter</filter-name>
        <filter-class>com.ats.framework.view.filter.ConversationContextIdFilter</filter-class>
    </filter>

    <!-- Filtro de contexto de conversação fora do JSF -->
    <filter>
        <filter-name>frameworkAdapterFilter</filter-name>
        <filter-class>org.apache.myfaces.orchestra.frameworkAdapter.basic.BasicFrameworkAdapterFilter</filter-class>
    </filter>
    <filter>
        <filter-name>requestParameterFilter</filter-name>
        <filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
    </filter>   

    <!-- Filtro OSIVF do Hibernate -->
    <filter>
        <filter-name>hibernateFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    </filter>

    <filter>
        <filter-name>gzipFilter</filter-name>
        <filter-class> com.ats.framework.view.filter.GZIPFilter</filter-class>
    </filter>   

    <!-- Extensions Filter -->
    <filter>
        <filter-name>extensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <description>Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10
                KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>
        </init-param>
        <init-param>
            <description>Set the threshold size - files below this limit are stored in
                memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k -
                10 KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>cacheExpirationFilter</filter-name>
        <filter-class> com.ats.framework.view.filter.CacheExpirationFilter</filter-class>
    </filter>

    <!-- Ajax DWR -->
    <filter>
        <filter-name>DwrFacesFilter</filter-name>
        <filter-class>org.directwebremoting.faces.FacesExtensionFilter</filter-class>
    </filter>

    <filter>
        <filter-name>cotacaoFilter</filter-name>
        <filter-class>com.ats.compra.view.servlet.CotacaoFilter</filter-class>
    </filter>

    <filter>
        <filter-name>liberacaoPDVFilter</filter-name>
        <filter-class>com.ats.venda.view.servlet.LiberacaoPDVFilter</filter-class>
    </filter>

    <!-- Filtro de codificação dos caracteres -->
    <filter-mapping>
        <filter-name>characterEncodingFilter</filter-name>
        <url-pattern>*.ats</url-pattern>
    </filter-mapping>

    <!-- Filtro de id do contexto de conversação -->
    <filter-mapping>
        <filter-name>conversationContextIdFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>   

    <!-- Filtro de contexto de conversação fora do JSF -->
    <filter-mapping>
        <filter-name>frameworkAdapterFilter</filter-name>
        <url-pattern>/cxf/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestParameterFilter</filter-name>
        <url-pattern>/cxf/*</url-pattern>
    </filter-mapping>

    <!-- Filtro de expiração de cache -->
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.js</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.gif</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.jpg</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.png</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.ico</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.css</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.js.ats</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.css.ats</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheExpirationFilter</filter-name>
        <url-pattern>*.ecss.ats</url-pattern>
    </filter-mapping>

    <!-- Filtro de compactação de páginas -->   
    <filter-mapping>
        <filter-name>gzipFilter</filter-name>
        <url-pattern>*.ats</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>gzipFilter</filter-name>
        <url-pattern>*.css</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>gzipFilter</filter-name>
        <url-pattern>*.js</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>gzipFilter</filter-name>
        <url-pattern>*.dwr</url-pattern>
    </filter-mapping>

    <!-- Extensions Filter -->
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.ats</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

    <!-- Filtro OSIVF do Hibernate -->
    <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>*.ats</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>/cxf/*</url-pattern>
    </filter-mapping>   
    <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>/cotacao/*</url-pattern>
    </filter-mapping>   

    <!-- Ajax DWR -->
    <filter-mapping>
        <filter-name>DwrFacesFilter</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>

    <!-- Cotacao de preços -->
    <filter-mapping>
        <filter-name>cotacaoFilter</filter-name>
        <url-pattern>/cotacao/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>liberacaoPDVFilter</filter-name>
        <url-pattern>/liberacaoRemotaPDV/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>com.ats.framework.view.listener.Log4jNomeAplicacaoContextListener</listener-class>
    </listener>     

    <listener>
        <listener-class>com.ats.framework.faces.listener.Jul2Slf4jListener</listener-class>
    </listener>  

    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>  

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>

    <listener>
        <listener-class>com.ats.framework.view.servlet.ContagemUsuariosSessionListener</listener-class>
    </listener>

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Servidor de imagens -->
    <servlet>
        <servlet-name>Servlet Imagens</servlet-name>
        <servlet-class>com.ats.framework.view.image.impl.ImageServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Lookup Ajax -->
    <servlet>
        <servlet-name>Ajax Lookup Servlet</servlet-name>
        <servlet-class>com.ats.framework.view.lookup.AjaxLookupServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- DWR - Ajax -->
    <servlet>
        <display-name>DWR Servlet</display-name>
        <servlet-name>dwr-invoker</servlet-name>
        <servlet-class>com.ats.framework.faces.dwr.AtsDwrServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>crossDomainSessionSecurity</param-name>
            <param-value>false</param-value>
        </init-param>
    </servlet>

    <!-- CXF Servlet -->
    <servlet>
        <display-name>CXF Servlet</display-name>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>
            org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- extension mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.ats</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>dwr-invoker</servlet-name>
        <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping> 

    <!-- Servlet de Imagens -->
    <servlet-mapping>
        <servlet-name>Servlet Imagens</servlet-name>
        <url-pattern>/imagens/*</url-pattern>
    </servlet-mapping>

    <!-- Lookup Ajax -->
    <servlet-mapping>
        <servlet-name>Ajax Lookup Servlet</servlet-name>
        <url-pattern>/lookup/*</url-pattern>
    </servlet-mapping>

    <!-- CXF Servlet -->
    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/cxf/*</url-pattern>
    </servlet-mapping>

    <!-- Welcome files -->
    <welcome-file-list>
        <welcome-file>login.ats</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

    <security-constraint>
        <display-name>Restrict XHTML Documents</display-name>
        <web-resource-collection>
            <web-resource-name>XHTML</web-resource-name>
            <url-pattern>*.xhtml</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <description>
                Only Let 'developer's access XHTML pages
            </description>
            <role-name>developer</role-name>
        </auth-constraint>
    </security-constraint>

    <session-config>
        <session-timeout>120</session-timeout>
    </session-config>

    <mime-mapping>
        <extension>ico</extension>
        <mime-type>image/x-icon</mime-type>
    </mime-mapping> 
</web-app>

我已经在Google上搜索了确切的错误消息,但它根本找不到任何内容。有没有人知道会出现什么问题?

有没有办法知道哪个Servlet导致了所谓的冲突?

1 个答案:

答案 0 :(得分:1)

通常,Web应用程序将包含多个servlet,其中一些将在web.xml(您的servlet)中定义,其他将自动创建。查看已部署的servlet列表时,对于大多数面部应用程序,您将看到“Faces Servlet”,“JSP”,“default”以及每个Web服务的一个servlet。您的问题可能是由应用程序类路径中的许多jar jar引起的,即glassfish试图部署多个Faces servlet。或者,如果您的应用程序具有Web服务,请确保不对不同包中的Web服务使用相同的类名。我发现glassfish处理不同的耳塞和战争部署的servlet名称。在部署ear文件时,GF将尝试通过使用类规范名称作为servlet名称(org.bla.web.WebService)来避免servlet名称的重复,但对于war部署,它使用简单的类名,这可能会导致问题面对。