只是为了让你知道,我根本不是一个程序员,所以我有点迷失在我的问题中。我正在尝试从Apache Tomcat 4.1和Java 1.4.2上的Windows Server 2003服务器迁移应用程序(应用程序在该服务器上运行正常)。我尝试在Windows Server 2008 R2上迁移它,任何版本的Apache Tomcat和Java兼容W2KR2但是当我尝试从Web界面启动应用程序时,我总是遇到同样的错误:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/GestClientsAS2]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3780)
at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1307)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1290)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1474)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:280)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1141)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1345)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/mail/internet/MimeBodyPart
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:275)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:138)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:331)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:770)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
我相信有一堂课不见了?我该如何解决这个问题?
感谢。
答案 0 :(得分:1)
既然你告诉我你的应用程序是在java 1.4版本中运行的,而且这个类只是Java 5+版本的默认版本(参见文档:http://docs.oracle.com/javaee/5/api/javax/mail/internet/MimeBodyPart.html),你必须将它导入到你的项目中。 / p>
下载:http://www.java2s.com/Code/Jar/j/Downloadjavamailmailapi14jar.htm 由于它是一个Web应用程序,将此jar文件放在WEB-INF / libs中,因此,类加载器将加载它,重新启动服务器。
如果它不是一个Web项目,你可以右键单击库并转到" Build Path" - > "添加到构建路径"。