struts2抛异常,都三天了,高手请进来看看吧……
java.lang.InstantiationException:com.opensymphony.xwork2.Actionjava.lang.Class.newIns...
java.lang.InstantiationException: com.opensymphony.xwork2.Action
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:123)
org.apache.struts2.plexus.PlexusObjectFactory.lookup(PlexusObjectFactory.java:298)
org.apache.struts2.plexus.PlexusObjectFactory.buildBean(PlexusObjectFactory.java:216)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:154)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
org.apache.struts2.plexus.PlexusObjectFactory.buildAction(PlexusObjectFactory.java:127)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:275)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:365)
com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:83)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:74)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)
以下是struts.xml文件
<struts>
<include file="struts-default.xml"></include>
<package name="com.nmsti.mlspt" extends="struts-default">
<global-results>
<result name="error">/page/error.html</result>
</global-results>
<action name="adminlogin" class="web.action.LoginAction" method="adminLogin">
<result name="success" type="dispatcher">/page/admin/main/main.jsp</result>
<result name="input" type="dispatcher">/page/admin/adminLogin.jsp</result>
</action>
</package>
</struts>
帮帮忙啊!!
struts-default.xml是存在的! 展开
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:123)
org.apache.struts2.plexus.PlexusObjectFactory.lookup(PlexusObjectFactory.java:298)
org.apache.struts2.plexus.PlexusObjectFactory.buildBean(PlexusObjectFactory.java:216)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:154)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
org.apache.struts2.plexus.PlexusObjectFactory.buildAction(PlexusObjectFactory.java:127)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:275)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:365)
com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:83)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:74)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)
以下是struts.xml文件
<struts>
<include file="struts-default.xml"></include>
<package name="com.nmsti.mlspt" extends="struts-default">
<global-results>
<result name="error">/page/error.html</result>
</global-results>
<action name="adminlogin" class="web.action.LoginAction" method="adminLogin">
<result name="success" type="dispatcher">/page/admin/main/main.jsp</result>
<result name="input" type="dispatcher">/page/admin/adminLogin.jsp</result>
</action>
</package>
</struts>
帮帮忙啊!!
struts-default.xml是存在的! 展开
6个回答
展开全部
我刚刚学额..
看到unknown source 会不会是
<include file="struts-default.xml"></include>
struts-default.xml 文件没有啊...
看到unknown source 会不会是
<include file="struts-default.xml"></include>
struts-default.xml 文件没有啊...
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
是不是少了jar包,要么struts.xml配置不完整
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
jumpkang@163.com
发过来我看一下。
请参考
发过来我看一下。
请参考
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
删掉 lib下的xerces-2.6.2.jar包 分拿来。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
struts-default.xml文件找不到
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询