法将我的项目部署到以前在glassfish上部署过的tomcat

法将我的项目部署到以前在glassfish上部署过的tomcat

本文介绍了无法将我的项目部署到以前在glassfish上部署过的tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在netbeans上开发的项目,我将其部署在glassfish上.但是现在,我正尝试将其部署在tomcat7上.我正面临以下异常

I have a project developed on netbeans where i deployed it on glassfish.. But now as i am trying to deploy it on tomcat7. I am facing following exception

 INFO: Deploying web application archive C:\OpsConsole\Anil Babu\apache-tomcat-7.
    0.40\webapps\OpsBackEnd.war
    Nov 14, 2013 1:36:33 PM org.apache.tomcat.util.digester.Digester endElement
    SEVERE: End event threw exception
    java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
        at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUt
    ils.java:855)
        at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)

        at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:105
    1)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
    nt(AbstractSAXParser.java:606)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanEndElement(XMLDocumentFragmentScannerImpl.java:1742)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2900)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
   MLDocumentScannerImpl.java:607)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:835)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
   java:123)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
   stractSAXParser.java:1210)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
    arse(SAXParserImpl.java:568)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
        at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.j
    ava:1890)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav
    a:1259)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:878)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
    g.java:369)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
    se.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:5269)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
     7)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)

        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)

        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:


      1654)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
        1)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
            at java.util.concurrent.FutureTask.run(FutureTask.java:166)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
         java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
         .java:615)
            at java.lang.Thread.run(Thread.java:722)

         Nov 14, 2013 1:36:33 PM org.apache.catalina.startup.ContextConfig parseWebXml
         SEVERE: Parse error in application web.xml file at jndi:/localhost/OpsBackEnd/WE
         B-INF/web.xml
         org.xml.sax.SAXParseException; systemId: jndi:/localhost/OpsBackEnd/WEB-INF/web.
         xml; lineNumber: 6; columnNumber: 14; Error at (6, 14) : org.apache.catalina.dep
         loy.WebXml addFilter
            at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.
     java:2687)
        at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.
     java:2719)
        at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:105
     4)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
     nt(AbstractSAXParser.java:606)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
     l.scanEndElement(XMLDocumentFragmentScannerImpl.java:1742)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2900)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
    MLDocumentScannerImpl.java:607)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
     l.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
     ML11Configuration.java:835)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
     ML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
     java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
     stractSAXParser.java:1210)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
     arse(SAXParserImpl.java:568)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
        at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.j
    ava:1890)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav
    a:1259)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
g.java:878)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:369)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5269)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)

        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)

        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1654)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml ad
dFilter
        at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUt
ils.java:855)
        at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)

        at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:105
1)
        ... 30 more

    Nov 14, 2013 1:36:33 PM org.apache.catalina.startup.ContextConfig parseWebXml
    SEVERE: Occurred at line 6 column 14
    Nov 14, 2013 1:36:33 PM org.apache.catalina.startup.ContextConfig configureStart

    SEVERE: Marking this application unavailable due to previous error(s)
    Nov 14, 2013 1:36:33 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error getConfigured
    Nov 14, 2013 1:36:33 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/OpsBackEnd] startup failed due to previous errors
    Nov 14, 2013 1:36:33 PM org.apache.catalina.startup.HostConfig deployWAR

请帮帮我.我正在尝试将这场战争部署在tomcat7上,但它引发了异常.有什么可以帮我解决这个问题的吗?

Please help me out. I am trying to deploy this war on tomcat7 but it was throwing above exception. Can any please help me out to resolve this problem.

预先感谢

我的WEB-INF/lib中有罐子

there are the jars in my WEB-INF/lib

file.reference.appserv-admin.jar=../../JARS/JARS for CMDB WS/appserv-admin.jar
file.reference.appserv-deployment-client.jar=../../JARS/JARS for CMDB WS/more jars to be added for CMDBWS/appserv-deployment-client.jar
file.reference.appserv-ext.jar=../../JARS/JARS for CMDB WS/more jars to be added for CMDBWS/appserv-ext.jar
file.reference.appserv-rt.jar=../../JARS/JARS for CMDB WS/appserv-rt.jar
file.reference.axis-ant.jar=../../JARS/JARS for CMDB WS/axis-ant.jar
file.reference.axis.jar=../../JARS/JARS for CMDB WS/axis.jar
file.reference.client-sdk-resources=../../../../resources for opensso/on VM/client-sdk/resources
file.reference.commons-discovery-0.2.jar=../../JARS/JARS for CMDB WS/commons-discovery-0.2.jar
file.reference.commons-lang.jar=../../JARS/commons-lang.jar
file.reference.commons-logging-1.0.4.jar=../../JARS/JARS for CMDB WS/commons-logging-1.0.4.jar
file.reference.ganymed-ssh2-build251beta1.jar=../../JARS/JARS for CMDB WS/ganymed-ssh2-build251beta1.jar
file.reference.ganymed-ssh2-build251beta1.jar-1=web\\WEB-INF\\lib\\ganymed-ssh2-build251beta1.jar
file.reference.imqjmsra.jar=../../JARS/JARS for CMDB WS/imqjmsra.jar
file.reference.jaxrpc.jar=../../JARS/JARS for CMDB WS/jaxrpc.jar
file.reference.jgraphx.jar=../../JARS/jgraphx.jar
file.reference.log4j-1.2.15.jar=../../JARS/JARS for CMDB WS/log4j-1.2.15.jar
file.reference.log4j-1.2.8.jar=../../JARS/JARS for CMDB WS/log4j-1.2.8.jar
file.reference.log4j-1.2.8.jar-1=../../JARS/log4j-1.2.8.jar
file.reference.on_VM-client-sdk=../../../../resources for opensso/on VM/client-sdk
file.reference.postgresql-9.2-1003.jdbc4.jar=C:\\OpsConsole\\postgresql-9.2-1003.jdbc4.jar
file.reference.SudhaWork-org=../../org
file.reference.wsdl4j-1.5.1.jar=../../JARS/JARS for CMDB WS/wsdl4j-1.5.1.jar
includes=**
j2ee.compile.on.save=false
j2ee.copy.static.files.on.save=false
j2ee.deploy.on.save=false
j2ee.platform=1.5
j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar
j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar
j2ee.platform.wsit.classpath=
j2ee.server.type=gfv3ee6
jar.compress=false
javac.classpath=\
    ${file.reference.ganymed-ssh2-build251beta1.jar-1}:\
    ${file.reference.axis-ant.jar}:\
    ${file.reference.ganymed-ssh2-build251beta1.jar}:\
    ${file.reference.appserv-deployment-client.jar}:\
    ${file.reference.appserv-ext.jar}:\
    ${file.reference.appserv-rt.jar}:\
    ${file.reference.axis.jar}:\
    ${file.reference.commons-discovery-0.2.jar}:\
    ${file.reference.commons-logging-1.0.4.jar}:\
    ${file.reference.imqjmsra.jar}:\
    ${file.reference.jaxrpc.jar}:\
    ${file.reference.log4j-1.2.8.jar}:\
    ${file.reference.commons-lang.jar}:\
    ${file.reference.jgraphx.jar}:\
    ${file.reference.wsdl4j-1.5.1.jar}:\
    ${file.reference.appserv-admin.jar}:\
    ${file.reference.postgresql-9.2-1003.jdbc4.jar}

以上是我project.properties的一部分...如果上述任何一个jar无效,请告诉我

the above is a part of my project.properties... please let me know, if any of the above jars are not valid

推荐答案

删除

 appserv-admin.jar, servlet-api.jar and appserv-deployment-client.jar

从您的战争站点的web-inf/lib文件夹中.

from web-inf/lib folder of your war..

它在Tomcat上的部署良好.

It deploys well on tomcat..

这篇关于无法将我的项目部署到以前在glassfish上部署过的tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 09:47