web 应用为什么运行不了!

编程的夜猫 2004-11-03 06:38:24
我在web module下建了个应用。只有个test类:
public class test {
public String getName(){
return "test";
}
}

在目录下建了个index.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:useBean id="test"
class="com.costware.test"
scope="page">

</jsp:useBean>
<html>
<head><title>Simple jsp page</title></head>
<body><%=test.getName()%>Place your content here</body>
</html>
运行后为什么出错

cmd /c "E:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\catalina.bat" run
Using CATALINA_BASE: C:\Documents and Settings\Administrator\.IntelliJIdea\system\tomcat_site_788f8dc4
Using CATALINA_HOME: E:\Program Files\Apache Software Foundation\Tomcat 5.0
Using CATALINA_TMPDIR: E:\Program Files\Apache Software Foundation\Tomcat 5.0\temp
Using JAVA_HOME: D:\j2sdk142
java.lang.NoClassDefFoundError: com/sun/jmx/mbeanserver/GetPropertyAction
at javax.management.MBeanServerFactory.<clinit>(MBeanServerFactory.java:396)
at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:659)
at org.apache.commons.modeler.Registry.getServer(Registry.java:539)
at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700)
at org.apache.catalina.mbeans.MBeanUtils.<clinit>(MBeanUtils.java:160)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.<clinit>(GlobalResourcesLifecycleListener.java:112)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:253)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:514)
at org.apache.catalina.startup.Catalina.load(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:396)
...全文
116 1 打赏 收藏 举报
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
红楼梦魇 2004-11-05
  • 打赏
  • 举报
回复
说得太清楚了,就是java.lang.NoClassDefFoundError: om/sun/jmx/mbeanserver/GetPropertyAction
那个类找不到了啊,运行的环境中要加上jmx的包,可以到sun的网站下载
相关推荐
发帖
Java

4.9w+

社区成员

Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
帖子事件
创建了帖子
2004-11-03 06:38
社区公告
暂无公告