SSH框架报错找不到action,求大神指教

我是用

<a class="more" href="/stage/charge/ordershow.action">

跳转,但是报There is no Action mapped for action name ordershow.错,新手求指教

错误:

六月 06, 2016 11:32:02 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: Could not find action or result
There is no Action mapped for action name ordershow. - [unknown location]
    at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
    at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
    at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
    at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

strust.xml配置:

 <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.devModel" value="true" />
    <include file="json-default.xml" />
    <include file="struts-default.xml" />
    <package name="login" extends="json-default">

        <action name="ordershow" class="orderAction" method="show">
            <result name="show">/stage/order/order_info.jsp</result>
        </action>
        </package>
        <constant name="struts.i18n.encoding" value="UTF-8" />
    <constant name="struts.locale" value="zh_CN" />
    <constant name="struts.ui.theme" value="simple" />
    <constant name="struts.ui.templateDir" value="template" />
    <constant name="struts.ui.templateSuffix" value="ftl" />
</struts> 

web.xml:

 <?xml version="1.0" encoding="UTF-8" ?>
<web-app version="3.0" 
    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">
  <display-name></display-name> 
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <filter>
    <filter-name>struts2</filter-name>
    <filter-class>
        org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
    </filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>*.jsp</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>*.action</url-pattern>
  </filter-mapping>
  <listener>
        <listener-class>
          org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/spring-*.xml
        </param-value>
    </context-param>

  </web-app>

jsp:

 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>Ttuo-Hotel | 酒店管理系统</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<link href="../assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="../assets/css/metro.css" rel="stylesheet" />
<link href="../assets/bootstrap/css/bootstrap-responsive.min.css"
    rel="stylesheet" />
<link href="../assets/font-awesome/css/font-awesome.css"
    rel="stylesheet" />
<link
    href="../assets/fullcalendar/fullcalendar/bootstrap-fullcalendar.css"
    rel="stylesheet" />
<link href="../assets/css/main_style.css" rel="stylesheet" />
<link href="../assets/css/style_responsive.css" rel="stylesheet" />
<link href="../assets/css/style_default.css" rel="stylesheet"
    id="style_color" />
<link rel="stylesheet" type="text/css"
    href="../assets/chosen-bootstrap/chosen/chosen.css" />
<link rel="stylesheet" type="text/css"
    href="../assets/uniform/css/uniform.default.css" />
<link rel="shortcut icon" href="../favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="fixed-top">
    <!-- BEGIN HEADER -->
    <div class="header navbar navbar-inverse navbar-fixed-top">
        <!-- BEGIN TOP NAVIGATION BAR -->
        <div class="navbar-inner">
            <div class="container-fluid">
                <!-- BEGIN LOGO -->
                <a class="brand" href="index.html"> <img
                    src="../assets/img/logo11.png" alt="logo" /> </a>
                <!-- END LOGO -->
                <!-- BEGIN RESPONSIVE MENU TOGGLER -->
                <a href="javascript:;" class="btn-navbar collapsed"
                    data-toggle="collapse" data-target=".nav-collapse"> <img
                    src="../assets/img/menu-toggler.png" alt="" /> </a>
                <!-- END RESPONSIVE MENU TOGGLER -->
                <!-- BEGIN TOP NAVIGATION MENU -->
                <ul class="nav pull-right">
                    <!-- BEGIN NOTIFICATION DROPDOWN -->
                    <li class="dropdown" id="header_notification_bar"><a href="#"
                        class="dropdown-toggle" data-toggle="dropdown"> <i
                            class="icon-warning-sign"></i> <span class="badge">6</span> </a>
                        <ul class="dropdown-menu extended notification">
                            <li>
                                <p>You have 14 new notifications</p>
                            </li>
                            <li><a href="javascript:;"
                                onclick=App.onNotificationClick(1);> <span
                                    class="label label-success"><i class="icon-plus"></i> </span>
                                    New user registered. <span class="time">Just now</span> </a>
                            </li>
                            <li><a href="#"> <span class="label label-important"><i
                                        class="icon-bolt"></i> </span> Server #12 overloaded. <span
                                    class="time">15 mins</span> </a>
                            </li>
                            <li><a href="#"> <span class="label label-warning"><i
                                        class="icon-bell"></i> </span> Server #2 not respoding. <span
                                    class="time">22 mins</span> </a>
                            </li>
                            <li><a href="#"> <span class="label label-info"><i
                                        class="icon-bullhorn"></i> </span> Application error. <span
                                    class="time">40 mins</span> </a>
                            </li>
                            <li><a href="#"> <span class="label label-important"><i
                                        class="icon-bolt"></i> </span> Database overloaded 68%. <span
                                    class="time">2 hrs</span> </a>
                            </li>
                            <li><a href="#"> <span class="label label-important"><i
                                        class="icon-bolt"></i> </span> 2 user IP blocked. <span class="time">5
                                        hrs</span> </a>
                            </li>
                            <li class="external"><a href="#">See all notifications <i
                                    class="m-icon-swapright"></i> </a>
                            </li>
                        </ul>
                    </li>
                    <!-- END NOTIFICATION DROPDOWN -->
                    <!-- BEGIN INBOX DROPDOWN -->
                    <li class="dropdown" id="header_inbox_bar"><a href="#"
                        class="dropdown-toggle" data-toggle="dropdown"> <i
                            class="icon-envelope-alt"></i> <span class="badge">5</span> </a>
                        <ul class="dropdown-menu extended inbox">
                            <li>
                                <p>You have 12 new messages</p>
                            </li>
                            <li><a href="#"> <span class="photo"><img
                                        src="../assets/img/avatar2.jpg" alt="" /> </span> <span
                                    class="subject"> <span class="from">Lisa Wong</span> <span
                                        class="time">Just Now</span> </span> <span class="message">
                                        Vivamus sed auctor nibh congue nibh. auctor nibh auctor
                                        nibh... </span> </a>
                            </li>
                            <li><a href="#"> <span class="photo"><img
                                        src="../assets/img/avatar3.jpg" alt="" /> </span> <span
                                    class="subject"> <span class="from">Richard Doe</span> <span
                                        class="time">16 mins</span> </span> <span class="message">
                                        Vivamus sed congue nibh auctor nibh congue nibh. auctor nibh
                                        auctor nibh... </span> </a>
                            </li>
                            <li><a href="#"> <span class="photo"><img
                                        src="../assets/img/avatar1.jpg" alt="" /> </span> <span
                                    class="subject"> <span class="from"></span> <span
                                        class="time">2 hrs</span> </span> <span class="message">
                                        Vivamus sed nibh auctor nibh congue nibh. auctor nibh auctor
                                        nibh... </span> </a>
                            </li>
                            <li class="external"><a href="#">See all messages <i
                                    class="m-icon-swapright"></i> </a>
                            </li>
                        </ul>
                    </li>
                    <!-- END INBOX DROPDOWN -->
                    <!-- BEGIN TODO DROPDOWN -->
                    <li class="dropdown" id="header_task_bar"><a href="#"
                        class="dropdown-toggle" data-toggle="dropdown"> <i
                            class="icon-tasks"></i> <span class="badge">5</span> </a>
                        <ul class="dropdown-menu extended tasks">
                            <li>
                                <p>You have 12 pending tasks</p>
                            </li>
                            <li><a href="#"> <span class="task"> <span
                                        class="desc">New release v1.2</span> <span class="percent">30%</span>
                                </span> <span class="progress progress-success "> <span
                                        style="width: 30%;" class="bar"></span> </span> </a>
                            </li>
                            <li><a href="#"> <span class="task"> <span
                                        class="desc">Application deployment</span> <span
                                        class="percent">65%</span> </span> <span
                                    class="progress progress-danger progress-striped active">
                                        <span style="width: 65%;" class="bar"></span> </span> </a>
                            </li>
                            <li><a href="#"> <span class="task"> <span
                                        class="desc">Mobile app release</span> <span class="percent">98%</span>
                                </span> <span class="progress progress-success"> <span
                                        style="width: 98%;" class="bar"></span> </span> </a>
                            </li>
                            <li><a href="#"> <span class="task"> <span
                                        class="desc">Database migration</span> <span class="percent">10%</span>
                                </span> <span class="progress progress-warning progress-striped">
                                        <span style="width: 10%;" class="bar"></span> </span> </a>
                            </li>
                            <li><a href="#"> <span class="task"> <span
                                        class="desc">Web server upgrade</span> <span class="percent">58%</span>
                                </span> <span class="progress progress-info"> <span
                                        style="width: 58%;" class="bar"></span> </span> </a>
                            </li>
                            <li><a href="#"> <span class="task"> <span
                                        class="desc">Mobile development</span> <span class="percent">85%</span>
                                </span> <span class="progress progress-success"> <span
                                        style="width: 85%;" class="bar"></span> </span> </a>
                            </li>
                            <li class="external"><a href="#">See all tasks <i
                                    class="m-icon-swapright"></i> </a>
                            </li>
                        </ul>
                    </li>
                    <!-- END TODO DROPDOWN -->
                    <!-- BEGIN USER LOGIN DROPDOWN -->
                    <li class="dropdown user"><a href="#" class="dropdown-toggle"
                        data-toggle="dropdown"> <img alt=""
                            src="../assets/img/avatar1_small.jpg" /> <span class="username"></span>
                            <i class="icon-angle-down"></i> </a>
                        <ul class="dropdown-menu">
                            <li><a href="extra_profile.html"><i class="icon-user"></i>
                                    我的信息</a>
                            </li>
                            <li><a href="calendar.html"><i class="icon-calendar"></i>
                                    我的日历</a>
                            </li>
                            <li><a href="#"><i class="icon-tasks"></i> 我的任务</a>
                            </li>
                            <li class="divider"></li>
                            <li><a href="hotel.jsp"><i class="icon-key"></i> 退出登录</a>
                            </li>
                        </ul>
                    </li>
                    <!-- END USER LOGIN DROPDOWN -->
                </ul>
                <!-- END TOP NAVIGATION MENU -->
            </div>
        </div>
        <!-- END TOP NAVIGATION BAR -->
    </div>
    <!-- END HEADER -->
    <!-- BEGIN CONTAINER -->
    <div class="page-container row-fluid">
        <!-- BEGIN SIDEBAR -->
        <div class="page-sidebar nav-collapse collapse">
            <!-- BEGIN SIDEBAR MENU -->
            <ul>
                <li>
                    <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
                    <div class="sidebar-toggler hidden-phone"></div> <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
                </li>
                <li>
                    <!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->
                    <form class="sidebar-search">
                        <div class="input-box">
                            <a href="javascript:;" class="remove"></a> <input type="text"
                                placeholder="查询. . ." /> <input type="button" class="submit"
                                value=" " />
                        </div>
                    </form> <!-- END RESPONSIVE QUICK SEARCH FORM -->
                </li>
                <li class="has-sub ">
                    <a href="/hotel/index.jsp">
                    <i class="icon-home"></i> 
                    <span class="title">首页</span>
                    <span class="selected"></span>
                    </a>
                </li>
                <li class="start active">
                    <a href="/hotel/stage/stage.jsp">
                    <i class="icon-bookmark-empty"></i> 
                    <span class="title">前台</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li><a href="/hotel/stage/charge/charge_info.jsp">入住开单</a></li>
                        <li><a href="/hotel/jie">入住详情</a></li>
                        <li><a href="ordershow.action">预定开单</a></li>
                        <li><a href="/hotel/orderfood/food!food.action">订餐服务</a></li>
                        <li><a href="Vip.action">会员管理</a></li>
                    </ul>
                </li>
                <li class="has-sub ">
                    <a href="/hotel/restaurant/catering.jsp">
                    <i class="icon-th-list"></i> 
                    <span class="title">餐饮部</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li><a href="/hotel/restaurant/basic/basic.jsp">餐饮信息</a>
                        </li>
                        <li><a href="/hotel/restaurant/enter/enter!show.action">采购入库</a>
                        </li>
                        <li><a href="/hotel/restaurant/stock/stock.jsp">库存盘点</a>
                        </li>
                        <li><a href="/hotel/restaurant/purchase/purchase!show.action">取材出库</a>
                        </li>
                    </ul>
                </li>
                <li class="has-sub ">
                    <a href="/hotel/room/room.jsp">
                    <i class="icon-star-empty"></i> 
                    <span class="title">客房部</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li><a href="/hotel/room/basic/basic.jsp">基本设置</a>
                        </li>
                        <li><a href="/hotel/room/roommanage/roommanage.jsp">客房管理</a>
                        </li>
                        <li><a href="/hotel/room/damage/damage!show.action">损坏设备统计</a>
                        </li>
                    </ul>
                </li>
                <li class="has-sub ">
                    <a href="javascript:;">
                    <i class="icon-table"></i> 
                    <span class="title">统计</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li ><a href="statistic/room_pie.jsp">房间总体情况</a></li>
                        <li ><a href="statistic/room_stack.jsp">各类型房间情况</a></li>
                    </ul>
                </li>
                <li class="has-sub ">
                    <a href="javascript:;">
                    <i class="icon-briefcase"></i> 
                    <span class="title">部门档案</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li ><a href="department/deptc!show.action">部门分类</a></li>
                        <li ><a href="department/dept!show.action">部门信息</a></li>
                        <li ><a href="department/staff!show.action">人员档案</a></li>
                    </ul>
                </li>
                <li class="has-sub ">
                    <a href="javascript:;">
                    <i class="icon-map-marker"></i> 
                    <span class="title">地图</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li><a></a></li>
                    </ul>
                </li>
                <li class="has-sub ">
                    <a href="javascript:;">
                    <i class="icon-map-marker"></i> 
                    <span class="title">公告</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li><a></a></li>
                    </ul>
                </li>               <li class="has-sub ">
                    <a href="javascript:;">
                    <i class="icon-briefcase"></i> 
                    <span class="title">其他</span>
                    <span class="arrow "></span>
                    </a>
                    <ul class="sub">
                        <li><a href="profile/profile.jsp">我的信息</a></li>

                        <li><a href="profile/calendar.jsp">我的日程</a></li>
                        <li><a>我的任务</a></li>
                    </ul>
                </li>
                <li class="">
                    <a href="hotel.jsp">
                    <i class="icon-user"></i> 
                    <span class="title">退出登陆</span>
                    </a>
                </li>
            </ul>
            <!-- END SIDEBAR MENU -->
        </div>
        <!-- END SIDEBAR -->
        <div class="page-content">
            <!-- BEGIN PAGE CONTAINER-->
            <div class="container-fluid">
                <!-- BEGIN PAGE HEADER-->
                <div class="row-fluid">
                    <div class="span12">
                        <!-- BEGIN STYLE CUSTOMIZER -->
                        <div class="color-panel hidden-phone">
                            <div class="color-mode-icons icon-color"></div>
                            <div class="color-mode-icons icon-color-close"></div>
                            <br>
                            <div class="color-mode">
                                <p>主题 颜色</p>
                                <ul class="inline">
                                    <li class="color-black current color-default"
                                        data-style="default"></li>
                                    <li class="color-blue" data-style="blue"></li>
                                    <li class="color-brown" data-style="brown"></li>
                                    <li class="color-purple" data-style="purple"></li>
                                    <li class="color-white color-light" data-style="light"></li>
                                </ul>
                                <label class="hidden-phone"> <input type="checkbox"
                                    class="header" checked value="" /> <span
                                    class="color-mode-label">固定标题</span> </label>
                            </div>
                        </div>
                        <!-- END BEGIN STYLE CUSTOMIZER -->
                        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                        <h3 class="page-title">
                            前台<small>请选择内容进行操作:</small>
                        </h3>
                        <ul class="breadcrumb">
                            <li><i class="icon-home"></i> <a href="/hotel/index.jsp">首页</a>
                                <i class="icon-angle-right"></i>
                            </li>
                            <li><a href="javascript:;">前台</a>
                            </li>
                        </ul>
                        <!-- END PAGE TITLE & BREADCRUMB-->
                    </div>
                </div>
                <!-- END PAGE HEADER-->
                <!-- BEGIN PAGE CONTENT-->
                <div class="row-fluid">
                    <div class="span12">
                        <div id="dashboard">
                            <!-- BEGIN DASHBOARD STATS -->
                            <div class="row-fluid">
                                <div class="span2 responsive" data-tablet="span6"
                                    data-desktop="span2">
                                    <div class="dashboard-stat yellow">
                                        <div class="visual">
                                            <img src="../assets/img/icon/resize_png_new4.png">
                                        </div>
                                        <div class="details">
                                            <div class="number">入住开单</div>
                                            <div class="desc"></div>
                                        </div>
                                        <a class="more" href="/hotel/stage/charge/charge_info.jsp"> 点击浏览更多 <i
                                            class="m-icon-swapright m-icon-white"></i> </a>
                                    </div>
                                </div>
                                <div class="span2 responsive" data-tablet="span6"
                                    data-desktop="span2">
                                    <div class="dashboard-stat green">
                                        <div class="visual">
                                            <img src="../assets/img/icon/33216.png">
                                        </div>
                                        <div class="details">
                                            <div class="number">入住详情</div>
                                            <div class="desc"></div>
                                        </div>
                                        <a class="more" href="/hotel/jie">
                                            点击浏览更多 <i class="m-icon-swapright m-icon-white"></i> </a>
                                    </div>
                                </div>
                                <div class="span2 responsive" data-tablet="span6  fix-offset"
                                    data-desktop="span2">
                                    <div class="dashboard-stat purple">
                                        <div class="visual">
                                            <img src="../assets/img/icon/resize_png_new7.png">
                                        </div>
                                        <div class="details">
                                            <div class="number">预定开单</div>
                                            <div class="desc"></div>
                                        </div>
                                        <a class="more" href="/stage/charge/ordershow.action">
                                            点击浏览更多 <i class="m-icon-swapright m-icon-white"></i> </a>
                                    </div>
                                </div>
                                <div class="span2 responsive" data-tablet="span6  fix-offset"
                                    data-desktop="span2">
                                    <div class="dashboard-stat green">
                                        <div class="visual">
                                            <img src="../assets/img/icon/548346.png">
                                        </div>
                                        <div class="details">
                                            <div class="number">订餐服务</div>
                                            <div class="desc"></div>
                                        </div>
                                        <a class="more" href="/hotel/orderfood/food!food.action">
                                            点击浏览更多 <i class="m-icon-swapright m-icon-white"></i> </a>
                                    </div>
                                </div>
                                <div class="span2 responsive" data-tablet="span6  fix-offset"
                                    data-desktop="span2">
                                    <div class="dashboard-stat yellow">
                                        <div class="visual">
                                            <img src="../assets/img/icon/resize_png_new6.png">
                                        </div>
                                        <div class="details">
                                            <div class="number">会员管理</div>
                                            <div class="desc"></div>
                                        </div>
                                        <a class="more" href="Vip.action">
                                            点击浏览更多 <i class="m-icon-swapright m-icon-white"></i> </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- END DASHBOARD STATS -->

                    </div>
                </div>
            </div>
            <!-- END PAGE CONTENT-->
        </div>
        <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
    <!-- BEGIN FOOTER -->
    <div class="footer">
        2014 &copy; Ttuo-Hotel | by ToTeam
        <div class="span pull-right">
            <span class="go-top"><i class="icon-angle-up"></i> </span>
        </div>
    </div>
    <!-- END FOOTER -->
    <!-- BEGIN JAVASCRIPTS -->
    <!-- Load javascripts at bottom, this will reduce page load time -->
    <script src="../assets/js/jquery-1.8.3.min.js"></script>
    <script src="../assets/breakpoints/breakpoints.js"></script>
    <script src="../assets/jquery-slimscroll/jquery-ui-1.9.2.custom.min.js"></script>
    <script src="../assets/bootstrap/js/bootstrap.min.js"></script>
    <script src="../assets/js/jquery.blockui.js"></script>
    <script src="../assets/js/jquery.cookie.js"></script>
    <script src="../assets/fullcalendar/fullcalendar/fullcalendar.min.js"></script>
    <script type="text/javascript"
        src="../assets/uniform/jquery.uniform.min.js"></script>
    <script type="text/javascript"
        src="../assets/chosen-bootstrap/chosen/chosen.jquery.min.js"></script>
    <!-- ie8 fixes -->
    <!--[if lt IE 9]>
    <script src="assets/js/excanvas.js"></script>
    <script src="assets/js/respond.js"></script>
    <![endif]-->
    <script src="../assets/js/app.js"></script>
    <script>
        jQuery(document).ready(function() {
            // initiate layout and plugins
            App.setPage('calendar');
            App.init();
        });
    </script>
    <!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>


java文件:

 package com.hotel.action.stage;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.hotel.entity.stage.Orderlist;
import com.hotel.entity.stage.RoomAll;
import com.hotel.service.stage.OrderService;
import com.hotel.utils.Encode;
import com.opensymphony.xwork2.ActionSupport;

@Controller("orderAction")
@Scope("prototype")
public class OrderAction extends ActionSupport {

    @Autowired
    @Qualifier("orderService")
    private OrderService os;
    private Orderlist orderlist = new Orderlist();
    private ArrayList<Orderlist> list1 = new ArrayList<Orderlist>();
    ArrayList<RoomAll> list2 = new ArrayList<RoomAll>();

    private String idds;
    private int id;
    private String number;

    public String save() {
        orderlist.setName(Encode.toutf8(orderlist.getName()));
        os.save(orderlist, idds);
        return "order1";
    }

    public String show() {
        list1 = os.show();
        return "show";
    }

    public String getone() {
        list2 = os.getone(number);
        return "get1";
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Orderlist getOrderlist() {
        return orderlist;
    }

    public ArrayList<Orderlist> getList1() {
        return list1;
    }

    public void setList1(ArrayList<Orderlist> list1) {
        this.list1 = list1;
    }

    public void setOrderlist(Orderlist orderlist) {
        this.orderlist = orderlist;
    }

    public String getIdds() {
        return idds;
    }

    public void setIdds(String idds) {
        this.idds = idds;
    }

    public ArrayList<RoomAll> getList2() {
        return list2;
    }

    public void setList2(ArrayList<RoomAll> list2) {
        this.list2 = list2;
    }
}

程序结构:

图片说明

jsp文件位置:
图片说明

jar包:
图片说明
图片说明

3个回答

struts.xml 里面

 <action name="ordershow" class="orderAction" method="show">
            <result name="show">/stage/order/order_info.jsp</result>
    </action>

这里class索引的action路径不对吧,你那么多文件结构,需要使用完整的路径。
想来应该是 class =“com.hotel.action.stage.OrderAction”
还有,result="show"。。。。对不?我也不知道=-=

href="/hotel/orderfood/food!food.action"
你这个food!food.action 在 strust.xml中都没有配置,肯定没有找到了。
换这个试一下:action name="food!food" class="orderAction" method="show" ,calss属性值要具体到文件路径

现在所有的action都访问办不到,无论是class =“com.hotel.action.stage.OrderAction”还是spring配置的controller("orderAction"),都不行,我把struts.xml贴出来

 <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.devModel" value="true" />
    <include file="json-default.xml" />
    <include file="struts-default.xml" />
    <package name="login" extends="json-default">

        <action name="ordershow" class="orderAction" method="show">
            <result name="show">/stage/order/order_info.jsp</result>
        </action>
        <action name="user" class="com.hotel.action.login.LoginAction">
            <result name="register">hotel.jsp</result>
            <result name="loginfalse">hotel.jsp</result>
            <result name="logintrue">index.jsp</result>
        </action>
        <action name="room" class="com.hotel.action.stage.RoomtypeAction"
            method="show">
            <result name="show">/stage/home/home_classify.jsp</result>
        </action>
        <action name="jie" class="com.hotel.action.stage.ChargeAction"
            method="show">
            <result name="cha2">/stage/charge/charge_room.jsp</result>
        </action>
        <action name="*_*" class="com.hotel.action.stage.{1}Action"
            method="{2}">
            <result name="addmoney1" type="chain">Vip</result>
            <result name="get1">/stage/order/order_one.jsp</result>
            <result name="order1" type="chain">ordershow</result>
            <result name="zhao" type="chain">jie</result>
            <result name="cha2">/stage/charge/charge_room.jsp</result>
            <result name="jiewangzi">/stage/charge/charge_jiezhang.jsp</result>
            <result name="cc">/stage/order/order_info.jsp</result>
            <result name="b" type="chain">room</result>
            <result name="gggg" type="chain">room</result>
            <result name="c" type="chain">room</result>
            <result name="{2}">/stage/vip/{1}_{2}.jsp</result>
            <result name="add" type="chain">Vip</result>
            <result name="delete" type="chain">Vip</result>
            <result name="update" type="chain">Vip</result>
        </action>



        <action name="roomshow" class="com.hotel.action.stage.RoomAction"
            method="show">
            <result name="cc" type="json">
                <param name="root">jsonArray</param>
            </result>
        </action>

        <action name="Vip" class="com.hotel.action.stage.VipAction"
            method="query">
            <result name="query">/stage/vip/Vip_add.jsp</result>
        </action>
    </package>

    <package name="dept" extends="struts-default">
        <action name="deptc" class="com.hotel.action.dept.DeptcAction">
            <result name="show">dept_classify.jsp</result>
        </action>
        <action name="dept" class="com.hotel.action.dept.DeptAction">
            <result name="show">/department/dept_info.jsp</result>
        </action>
        <action name="staff" class="com.hotel.action.dept.StaffAction">
            <result name="show">/department/staff_info.jsp</result>
            <result name="one">/department/staff_one.jsp</result>
            <result name="info">/profile/profile.jsp</result>
        </action>
    </package>

    <package name="facilitytype" extends="struts-default">
        <action name="facilitytype" class="com.hotel.action.room.FacilityTypeAction">
            <result name="show">facilitytype.jsp</result>
        </action>
        <action name="facility" class="com.hotel.action.room.FacilityAction">
            <result name="success">/room/basic/facility.jsp</result>
        </action>
    </package>

    <package name="servicetype" extends="struts-default">
        <action name="servicetype" class="com.hotel.action.room.ServicetypeAction">
            <result name="show">servicetype.jsp</result>
        </action>
    </package>

    <package name="service" extends="struts-default">
        <action name="service" class="com.hotel.action.room.ServiceAction">
            <result name="show">/room/roommanage/service.jsp</result>
        </action>
    </package>

    <package name="roomtype" extends="struts-default">
        <action name="roomtype" class="com.hotel.action.room.RoomtypeAction">
            <result name="show">roomtype.jsp</result>
        </action>
    </package>

    <package name="equipment" extends="struts-default">
        <action name="equipment" class="com.hotel.action.room.EquipmentAction">
            <result name="Yeah" type="chain">fa</result>
        </action>
        <action name="fa" class="com.hotel.action.room.FacilityAction"
            method="showFacilityt">
            <result name="success">/room/roommanage/equipment_add.jsp</result>
        </action>
    </package>

    <package name="damage" extends="struts-default">
        <action name="damage" class="com.hotel.action.room.DamageAction">
            <result name="info">/room/damage/damage_info.jsp</result>
            <result name="good" type="chain">faci</result>
        </action>
        <action name="faci" class="com.hotel.action.room.FacilityAction"
            method="showFacilityt">
            <result name="success">/room/damage/damage.jsp</result>
        </action>
    </package>

    <package name="foodtype" extends="struts-default">
        <action name="foodtype" class="com.hotel.action.food.FoodTypeAction">
            <result name="show">foodtype.jsp</result>
        </action>
        <action name="food" class="com.hotel.action.food.FoodAction">
            <result name="success">/restaurant/basic/food.jsp</result>
            <result name="orderfood">/orderfood/orderfood.jsp</result>
            <result name="orderone">/orderfood/orderone.jsp</result>
        </action>
    </package>

    <package name="dishtype" extends="struts-default">
        <action name="dishtype" class="com.hotel.action.food.DishtypeAction">
            <result name="show">dishtype.jsp</result>
        </action>
    </package>

    <package name="dish" extends="struts-default">
        <action name="dish" class="com.hotel.action.food.DishAction">
            <result name="show">/restaurant/basic/dish.jsp</result>
        </action>
    </package>

    <package name="starea" extends="struts-default">
        <action name="starea" class="com.hotel.action.starea.StareaAction">
            <result name="show">starea.jsp</result>
        </action>
    </package>

    <package name="enter" extends="struts-default">
        <action name="enter" class="com.hotel.action.starea.EnterAction">
            <result name="xiangqing">/restaurant/enter/enter_info.jsp</result>
            <result name="get" type="chain">
                dishget
                <!-- 多对多action的转换<param name="actionName">dish</param> <param name="method">show</param> -->
            </result>
            <result name="starea_map">enter.jsp</result>
        </action>
        <action name="dishget" class="com.hotel.action.food.DishAction"
            method="show">
            <result name="show">/restaurant/enter/enter.jsp</result>
        </action>
    </package>

    <package name="purchase" extends="struts-default">
        <action name="purchase" class="com.hotel.action.starea.PurchaseAction">
            <result name="xiangqing">/restaurant/purchase/purchase_info.jsp</result>
            <result name="ss" type="chain">stockget</result>
        </action>
        <action name="stockget" class="com.hotel.action.stock.StockAction"
            method="show">
            <result name="show">/restaurant/purchase/purchase.jsp</result>
        </action>
    </package>

    <package name="stock" extends="struts-default">
        <action name="stock" class="com.hotel.action.stock.StockAction">
            <result name="show">stock.jsp</result>
        </action>
    </package>

    <package name="statistic" extends="struts-default">
        <action name="stat" class="com.hotel.action.stat.StatAction">
            <result name="total">/statistic/room_pie.jsp</result>
            <result name="apart">/statistic/room_stack.jsp</result>
        </action>
    </package>
    <package name="message" extends="struts-default">
        <action name="message" class="com.hotel.action.other.MessageAction">
            <result name="show">/other/message.jsp</result>
        </action>
    </package>
    <constant name="struts.i18n.encoding" value="UTF-8" />
    <constant name="struts.locale" value="zh_CN" />
    <constant name="struts.ui.theme" value="simple" />
    <constant name="struts.ui.templateDir" value="template" />
    <constant name="struts.ui.templateSuffix" value="ftl" />
</struts>    

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Java SSH框架出现异常,求大神指教
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [beans.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrnat org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)rn at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)rnCaused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptorrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn ... 56 morern2017-8-14 17:27:43 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class cn.it.shop.listener.InitDataListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [beans.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:388)rn rnrn严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnjava.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContextrn at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:172)rn at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1078)rn at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1052)rn at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1000)rn at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:554)rn at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)rn at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3866)rn at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4500)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn严重: StandardServer.await: create[8005]: rnjava.net.BindException: Address already in use: JVM_Bindrn at java.net.PlainSocketImpl.socketBind(Native Method)rn at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)rn at java.net.ServerSocket.bind(ServerSocket.java:319)rn at java.net.ServerSocket.(ServerSocket.java:185)rn at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)rn at org.apache.catalina.startup.Catalina.await(Catalina.java:630)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:590)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
求教大神ssh整合下,找不到action的问题
regAction rn Unable to instantiate Action, regAction, defined for 'regAction-regDo' in namespace '/'regAction rn rn File: org/apache/catalina/loader/WebappClassLoaderBase.java rn rnStacktracesrn Unable to instantiate Action, regAction, defined for 'regAction-regDo' in namespace '/'regAction rn com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:316)rn com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:397)rn .rn .rn .rn rnrn rn java.lang.ClassNotFoundException: regAction rn org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)rn org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderrnrnrn--------------------------------------rn action部分代码import javax.annotation.Resource;rn rnimport org.apache.struts2.interceptor.validation.SkipValidation;rn import org.springframework.context.annotation.Scope;rn import org.springframework.stereotype.Controller;rn rnimport com.zhifeiji.survey.domain.User;rn import com.zhifeiji.survey.service.UserService;rn import com.zhifeiji.survey.utils.UtilsMD5;rn import com.zhifeiji.survey.utils.ValidateIsNull;rn rn@Controller("regAction")rn @Scope("prototype")rn public class RegAction extends BaseActionrn rn @Resourcern private UserService userService;rn public String regDo() rn try rn rn------------------------------------------------------rnstruts.xml如下:rn rnrn /view/regPage.jsprn /index.jsprn rn rn rnrn---------------------------------------------------------------rnweb.xml如下:rn contextConfigLocationrn classpath:beans.xmlrn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn struts2rn /*rn
程序报错,求大神指教
adodataset1.Fiter:='Number'+''''+edit1.Text+'''';n为什么报错说nunable to invoke code completion due to errors in source coden求大神解析一下为什么T_T
SSH 提示找不到Action
这是LoginAction.javarnrn[code=Java]rnpackage com.ss.struts2.lab1.action;rnrnpublic class LoginAction rn private String username;rn private String password;rn public String getUsername() rn return username;rn rn public void setUsername(String username) rn this.username = username;rn rn public String getPassword() rn return password;rn rn public void setPassword(String password) rn this.password = password;rn rn public String execute() throws Exceptionrn if("sise".equals(username) && "admin".equals(password))rn return "suc";rn return "login";rn rnrnrn[/code]rnrnlogin.jsprnrn[code=Java]rn<%@ page language="java" contentType="text/html; charset=ISO-8859-1"rn pageEncoding="ISO-8859-1"%>rnrnrnrn rn Loginrnrnrn rn rn rn rn rnrnrn[/code]rnrnwelcome.jsprnrn[code=Java]rn<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>rnrnrnrn rn rn My JSP 'index.jsp' starting pagern rn rn rn rn rn rn rn rn rn Login scueed!rn rnrn[/code]rnrnstruts.xmlrn[code=XML]rnrnrnrn rn rn /login.jsprn /welcome.jsprn rn rnrn[/code]rnrnweb.xmlrn[code=XML]rnrnrn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rnrn rn struts2rn /*rn rnrn rn login.jsprn rnrn[/code]rnrnstruts.xml是放在src目录下,编译后自动在classes目录下生成rn今天刚刚开始学SSH,百度也有一样的错误,但都不能解决,麻烦大家帮帮忙看看~~
SSH整合找不到action
rn[code=javascript]$(document).ready(function()rn $("#username").blur(function isuser()rn var username=$("#username").val();rn if(username=="")rn $("#spanusername").html("请填写工号");rn return false;rn rn );rn $("#password").blur(function ispass()rn var username=$("#username").val();rn if(username=="")rn $("#spanpassword").html("请填写密码");rn return false;rn rn );rn $("#sub").click(function sub()rn var username=$("#username").val();rn var password=$("#password").val();rn $("#fom").attr("method","get");rn $("#fom").attr("action","loginaction");rn $("#fom").submit();rn );rn);rnrn[/code]rnrn[color=#FF0000]web.xml[/color]rn[code=text]rnrn OArn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn rn struts2rn /*rn rn rn rn contextConfigLocationrn /WEB-INF/classes/applicationContext.xmlrn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn[/code]rnrn[color=#FF0000]applicationContext.xml[/color]rnrn[code=text]rnrn rn rn rn oracle.jdbc.driver.OracleDriverrn rn rn jdbc:oracle:thin:@localhost:1521:orclrn rn rn scottrn rn rn adminrn rn rn rn rn rn rn rn rn rn[/code]rnrn[color=#FF0000]struts.xml[/color]rnrn[code=text]rnrnrnrnrnrnrn rn /index.jsprn /login.jsprn rnrn[/code]rnrn[color=#FF0000]LoginAction[/color]rn[code=java]package com.action;rnrnimport org.springframework.web.struts.ActionSupport;rnrnimport com.dao.IDao;rnimport com.entity.User;rnrnpublic class LoginAction extends ActionSupport rn rn private String username;rn private String password;rn public String getUsername() rn return username;rn rn public void setUsername(String username) rn this.username = username;rn rn public String getPassword() rn return password;rn rn public void setPassword(String password) rn this.password = password;rn rn public String validation()rn User user = new User();rn user.setUsername(username);rn user.setPassword(password);rn IDao userDao=(IDao) this.getWebApplicationContext().getBean("UserDao");rn boolean result=userDao.queryLogin(user);rn if(result)rn return "right";rn elsern return "errror";rn rn rnrn[/code]rn[color=#FF0000]目录结构[/color]rn[img=https://img-bbs.csdn.net/upload/201308/11/1376210354_203863.png][/img][img=https://img-bbs.csdn.net/upload/201308/11/1376210372_156849.png][/img]
SSH整合———action报错
项目:慕课的SSH之员工管理框架整合篇BUG描述: There is no Action mapped for namespace [/] and action name [product_save] 很明显是指在根目录下没有找到action的映射解决过程: 一开始,按照网上搜索的此类问题可能性进行检查
struts2找不到action求大神 在线等
感觉什么都写了 就是找不到action 下面是代码 求解答rnrnweb.xml的---------------------------------rnrnrn ssirnrn Struts2rn rn org.apache.struts2.dispatcher.FilterDispatcherrn rnrn rnrn Struts2rn /*rnrnrnrnstruts2 配置文件的--------------------rnrnrnrnrn rn rn rn index.jsprn rn rn rnrnaction的----------------------------------rnpackage action;rnrnimport java.io.Serializable;rnimport java.util.List;rnrnimport javax.servlet.http.HttpServletRequest;rnrnimport com.opensymphony.xwork2.ActionSupport;rnrnrnimport dao.Impl.UserdaoImpl;rnimport entity.User;rnrn@SuppressWarnings("serial")rnpublic class IndexAction extends ActionSupport rnrn UserdaoImpl dao= new UserdaoImpl();rn rn private HttpServletRequest req;rn rnrn public String init()rn Listlist=dao.select();rn req.setAttribute("list", list);rn return "success";rn rn rn rnrnrn---------------------------------------------rn访问路径是rnhttp://localhost:8181/ssi/IndexAction_init.actionrn---------------------------------------------rn下面是包名和文件位置 求解答rn[img=https://img-bbs.csdn.net/upload/201407/04/1404454458_941719.png][/img]rn
ssh框架:action重定向
重定向到某个页面:type=”redirect” 重定向到某个action:type=”redirectAction” struts默认的返回值是input,表示出现错误,可以转到错误页面 &amp;lt;action name=&quot;customer_*&quot; class=&quot;customerAction&quot; method=&quot;{1}&quot;&amp;gt; &amp;lt;result name=&quot;input...
SSH框架之Action
package cn.itcast.oa.view.action;import java.util.List;import javax.annotation.Resource;import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller;import cn.i
ssh框架报错找不到sessionfactory bean求各位大侠指点
[code=text]rnrn rn rn rnrnrnrnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn rn rn rn rn rn rn rn com/zy/domain/Employee.hbm.xmlrn rn rn rn rn hibernate.dialect=org.hibernate.dialect.MySQLDialectrn hibernate.hbm2ddl.auto=updatern hibernate.show_sql=true rn rn rnrnrnrnrnrnrn rnrnrnrnrnrn[/code]rn*******************************华丽分割线*****************************rn[code=java]package com.zy.test;rnrnimport org.hibernate.Session;rnimport org.hibernate.SessionFactory;rnimport org.hibernate.Transaction;rnimport org.springframework.context.ApplicationContext;rnimport org.springframework.context.support.ClassPathXmlApplicationContext;rnrnimport com.zy.domain.Employee;rnrnpublic class test rnrn /**rn * @param argsrn */rn public static void main(String[] args) rn // TODO Auto-generated method stubrn ApplicationContext ac=new ClassPathXmlApplicationContext("applicationContext.xml");rn SessionFactory sf=(SessionFactory) ac.getBean("sessionFactory");rn Session s=sf.openSession();rn Employee employee=new Employee("aa","aa@gmail.com",new java.util.Date(),234.44f);rn Transaction tx=s.beginTransaction();rn s.save(employee);rn tx.commit();rn rnrnrn[/code]rn********************************华丽分割线********************************rnrn[code=text]log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).rnlog4j:WARN Please initialize the log4j system properly.rnException in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: class com.hsp.domain.Employee not found while looking for property: departmentrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at com.zy.test.test.main(test.java:18)rnCaused by: org.hibernate.MappingException: class com.hsp.domain.Employee not found while looking for property: departmentrn at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:97)rn at org.hibernate.mapping.ToOne.setTypeUsingReflection(ToOne.java:81)rn at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2193)rn at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2170)rn at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2060)rn at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:381)rn at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:295)rn at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)rn at org.hibernate.cfg.Configuration.add(Configuration.java:702)rn at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:537)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:631)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)rn ... 15 morernCaused by: java.lang.ClassNotFoundException: com.hsp.domain.Employeern at java.net.URLClassLoader$1.run(Unknown Source)rn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)rn at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:93)rn ... 28 morern[/code]rnrn
SSH框架,不联网就报错 求大神
严重: Context initialization failedrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input streamrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input streamrn at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:555)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:677)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)rn ... 27 morernCaused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.orgrn at org.dom4j.io.SAXReader.read(SAXReader.java:484)rn at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:546)rn ... 31 morern2013-3-26 17:09:18 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input streamrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input streamrn at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:555)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:677)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)rn ... 27 morernCaused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.orgrn at org.dom4j.io.SAXReader.read(SAXReader.java:484)rn at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:546)rn ... 31 more
base action报错 求大神帮帮忙
代码 59行setaction那边rnpackage action;rnrnimport com.opensymphony.xwork2.*;rnrnimport java.util.*;rnrnimport javax.servlet.ServletContext;rnimport javax.servlet.http.*;rnimport common.*;rnimport service.*;rnrnpublic class BaseAction extends ActionSupport implementsrn org.apache.struts2.interceptor.ServletRequestAware,rn org.apache.struts2.interceptor.ServletResponseAware,org.apache.struts2.util.ServletContextAwarernrnrn protected ServiceManager serviceManager;rn protected UserInfo userInfo;rn protected String result; rn protected Map cookies;rn protected javax.servlet.http.HttpServletResponse response;rn protected javax.servlet.http.HttpServletRequest request;rn protected ServletContext servletContext;rnrnrnrn public void setServletResponse(HttpServletResponse response)rn rn this.response = response;rnrn rn public void setServletContext(ServletContext servletContext)rn rn this.servletContext = servletContext;rn rnrn protected String getCookieValue(String name)rn rn javax.servlet.http.Cookie cookies[] = request.getCookies();rn if (cookies != null)rn rn for (Cookie cookie : cookies)rn rnrn if (!cookie.getName().equals(name))rn continue;rn return cookie.getValue();rn rnrn rn return null;rn rnrn public void setServletRequest(HttpServletRequest request)rn rn this.request = request;rn rn rn userInfo.setCookieUser(getCookieValue("user"));rn rn rn rnrn /**rn * result属性的getter方法rn */rn public String getResult()rn rn return result;rn rnrn /**rn * result属性的setter方法rn */rn public void setResult(String result)rn rn this.result = result;rnrn rnrn public void setServiceManager(ServiceManager serviceManager)rn rn this.serviceManager = serviceManager;rn rnrn /**rn * userInfo属性的setter方法rn */rn public void setUserInfo(UserInfo userInfo)rn rn this.userInfo = userInfo;rnrn rnrn protected void saveCookie(String name, String value, int maxAge)rn rn javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(name,rn value);rn cookie.setPath(request.getContextPath());rn cookie.setMaxAge(maxAge);rn response.addCookie(cookie);rn rnrn
ssh做导出报错!求大神解决!!!!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cronTriggerBean' defined in ServletContext resource [/WEB-INF/config/crontabServiceContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:rnPropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'cronExpression' threw exception; nested exception is java.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.rnCaused by: rnorg.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:rnPropertyAccessException 1:rnorg.springframework.beans.MethodInvocationException: Property 'cronExpression' threw exception; nested exception is java.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.rnCaused by: rnjava.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.rn at org.quartz.CronExpression.storeExpressionVals(CronExpression.java:552)rn at org.quartz.CronExpression.buildExpression(CronExpression.java:430)rn at org.quartz.CronExpression.(CronExpression.java:255)rn at org.quartz.CronTrigger.setCronExpression(CronTrigger.java:460)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:821)rn at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)rn at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)rn at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1127)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn2012-7-13 11:18:06 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cronTriggerBean' defined in ServletContext resource [/WEB-INF/config/crontabServiceContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:rnPropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'cronExpression' threw exception; nested exception is java.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.rnCaused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:rnPropertyAccessException 1:rnorg.springframework.beans.MethodInvocationException: Property 'cronExpression' threw exception; nested exception is java.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.rnCaused by: java.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.rn at org.quartz.CronExpression.storeExpressionVals(CronExpression.java:552)rn at org.quartz.CronExpression.buildExpression(CronExpression.java:430)rn at org.quartz.CronExpression.(CronExpression.java:255)rn at org.quartz.CronTrigger.setCronExpression(CronTrigger.java:460)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:821)rn at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)rn at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)rn at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1127)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424)
ssh整合WebService报错,求大神解决
java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/Class;)Zrn at org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal(SpringAopClassHelper.java:85)rn at org.apache.cxf.common.util.ClassHelper.getRealClass(ClassHelper.java:55)rn at org.apache.cxf.jaxws.EndpointImpl.getImplementorClass(EndpointImpl.java:215)rn at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:397)rn at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)rn at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)rn at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1706)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1645)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)rn at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:160)rn at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)rn at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:71)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)
在ssh中找不到action问题
javax.servlet.UnavailableException: Cannot initialize RequestProcessor of class org.springframework.web.struts.ContextLoaderPlugIn: java.lang.ClassCastException: org.springframework.web.struts.ContextLoaderPlugIn
求大神指点 SSH框架部分
public class LoginAction extends ActionSupportn n public ActionForward execute(n ActionMapping mapping,n ActionForm form,n HttpServletRequest request,n HttpServletResponse response) n return mapping.findForward("success");n n nn n这段代码 execute 中的 属性都是做什么的 本人初学者请大神指点
SSH框架,Websocket连接失败,求大神指导
环境:jdk8、tomcat8rn使用的是Spring API for WebSocket,项目框架是SSH。rn问题:websocket客户端一直连接失败,rn报错信息:WebSocket connection to 'ws://192.168.1.110:8080/项目名/collectionList' failed: Error during WebSocket handshake: Unexpected response code: 404。rn下面贴上前后台代码,求大神帮忙分析一下
运行时报错:“找不到Int32 System.String.Compare。。。。。” 求指教
运行时报错:“找不到Int32 System.String.Compare(System.String,System.String,System.Globalization.CultureInfo,System.Globalization.CompareOptions)”。rn引用中添加了"System"。rn但其实这个函数是micorlib.dll中的system的,而引用中无法添加这个文件,此项目系统自动引用。rn查看此文件,确实没有这个Compare函数。但是另一台机子中也没有这个函数,但能正常运行。。。。。。rn很奇怪,原来没问题,突然产生了这个问题。rnrn求指教
一个简单的存储过程报错,求大神指教
[code=sql]rn--Drop PROCEDURE [dbo].[FenYe]rnCREATE PROCEDURE [dbo].[FenYe]rnrn @curPage int, --当前页数rn @pageSize int, -- 每页显示的数量rn @th varchar(200) = '', --查询,图号rn @mc varchar(200) = '', --查询,名称rn @tm varchar(200) = '', --查询,条码rn @gysdm varchar(200)='' --查询,供应商代码 rnASrnrnBeginrnrnDeclare @before int,@sql nvarchar(1000)rnrnSet @before=(@curpage-1)*@pageSizernSet @sql='select top '+cast(@pageSize as varchar(10))+' th,bh,mc,wlbh,tx,dw,nx,xfdw_dm,xfdw_mc,no_bh,rq,bz,glry,bgy From tm_wlbhrnwhere id not in (Select top '+cast(@before as varchar(10))+' id from tm_wlbh where (th like ''%''+@th+''%'' or bh like ''%''+@th+''%'') and mc like ''%''+@mc+''%'' and wlbh like ''%''+@tm+''%'' and xfdw_dm like ''%''+@gysdm+''%'' order by id)'rnExec (@sql)rnrnEndrnrn--exec FenYe 1,30,'','','',''rnrn调用时报错:消息 137,级别 15,状态 2,第 2 行rn必须声明标量变量 "@th"。rn[/code]
3Dmax塌陷报错求各路大神指教
-
androidstudio运行时总是报错:求大神指教
报的错:Error:Execution failed for task ':app:dexDebug'.n> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.7.0\bin\java.exe'' finished with non-zero exit value 2n网上说的更改架包,和设置studio里的默认路径等,试过了,不是这个问题;ndos系统里用cmd以及javac都试过了,jdk、sdk都配置好了工作空间里也试过新建一个工程验证是否是代码问题,但都不是;n工程里build.gradle文件里更改sdk版本,也试过了没反应。n所以,现在很肯定是androidstudio里系统配置的问题,因为此问题对我很重要,所以请教大神,求指教
SVN上传报错,求大神指教
[img=https://img-bbs.csdn.net/upload/201511/18/1447826067_534433.png][/img]rn求大神提点下,为什么我把代码上传的SVN指定的目录下,总出现这种情况,代码中改过东西我才Commit的,不怎么会用这东西,还有我想问下我Commit之前是不是要先从SVN上更新下再上传?
为什么会报错 求大神指教
[code=html]rnrnrnrn rn rn rnrnrnrn rn rn 喜欢rn 0rn rn rn 喜欢rn 1rn rn rnrnrn rn[/code]rnTypeError: num[i] is undefinedrnalert(num[i].innerHTML);rnrn为什么说没定义呢 要怎么样才能 输出 num每个的innerHTML
hibernate3.6+spring3.2.13整合报错,求大神指教
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:921)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:864)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)rn at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:817)rn at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:745)rn ... 54 morernCaused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:244)rn at org.hibernate.service.internal.AbstractServiceRegistryImrnpl.initializeService(AbstractServiceRegistryImpl.java:208)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)rn at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)rn at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)rn at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)rn at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)rn at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)rn at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)rn at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)rn at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)rn at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)rn at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418)rn at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:692)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:863)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:782)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)rn ... 65 morernCaused by: org.hibernate.HibernateException: Could not instantiate connection provider [org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider]rn at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:194)rn at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:111)rn at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:41)rn at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)rn at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234)rn ... 90 morern[b][color=#FF0000]Caused by: java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider cannot be cast to org.hibernate.engine.jdbc.connections.spi.ConnectionProvider[/color][/b]rn at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:191)rn ... 94 more
maven 项目打包时报错,求大神指教!
[img=https://img-bbs.csdn.net/upload/201401/28/1390896159_351186.jpg][/img]rnrn刚开始学maven,这个包在库中是有的,不知道这个错误怎么回事,还请大神指教。
新手寒假作业多报错求大神指教
/*1、 会议记录管理系统rn基本功能要求:会议信息包括:会议编号,会议名称、部门名称、会议地点,会议日期,会议主持人,会议记录人,rn出席人员,会议摘要。rn 会议信息以二进制形式存储在文件中。rn要求能够:rn(1) 添加会议记录rn(2) 浏览所有会议记录信息rn(3) 按不同字段(会议编号,会议名称等)查询会议记录rn(4) 修改会议记录rn(5) 删除会议记录rn扩展功能要求: (1) 按某些字段进行排序浏览rn (2) 不同部门的会议纪录存放在不同的文件中rn (3) 把文件中的会议记录导入到程序中*/rnrn#includern#includern#define FILENAME "meeting.dat"rntypedef struct tagMeetingrnrn int num;rn char name[20];rn char department[20];rn char place[20];rn char date[20];rn char host[20];rn char recorder[20];rn int member[50];rn char abstruct[50];rn struct tagMeeting *next;rnMEETING,*PMEETING;rnMEETING g_head;rn//1.显示菜单rnvoid ShowMenu();rn//2.获取用户选择的菜单编号rnint GetMenuChoose();rn//3.创建一个节点,它会返回一个新创建的会议信息节点的指针rnPMEETING CreateMeeting();rn//4.把会议信息节点加入到链表中rnint AddMeeting(PMEETING pmee);rn//5.返回指定编号会议节点的上一个节点的指针rnPMEETING GetPrevAddr(int num);rn//6.显示所有会议信息rnvoid ShowAll();rn//7.显示信息数量 rn int ShowMeetingCount(); rn//7.修改会议信息,参数为要修改会议的编号rnvoid ModityMeeting(int num);rn//8.获取用户的选择rnint Question(const char *pstr);rn//9.获取用户输入的会议的编号rnint GetInputNum();rn//10.删除编号为num的会议信息rnvoid DelMeeting(int num);rn//11.删除全部会议信息rnvoid DelAll(int num);rn//12.存档rnvoid SaveToFile();rn//13.读档rnvoid LoadFromFile();rnint main()rnrn while(1)rn rn switch(GetMenuChoose())rn rn case 1:AddMeeting(CreateMeeting());break;rn case 2:DelMeeting(GetInputNum());break;rn case 3:;break;rn case 4:ModityMeeting(GetInputNum());break;rn case 5:DelAll();break;rn case 6:ShowAll();break;rn case 7:ShowMeetingCount();break;rn case 8:LoadFromFile();break;rn case 9:SaveToFile();break;rn rnrn rn return 0;rnrn//1.显示菜单rnvoid ShowMenu()rnrn printf("会议管理系统");rn printf("1.添加会议记录 2.删除会议记录 3.查询会议记录\n");rn printf("4.修改会议记录 5.删除所有会议信息 6.显示所有会议信息\n");rn printf("7.显示指定会议信息 8.读档 9.存档 0.退出\n");rnrn//2.获取用户选择的编号rnint GetMenuChoose()rnrn int num;rn ShowMenu();rn printf("请选择菜单(0 ~ 9):");rn while(1 != scanf("%d", &num) || num < 0 || num > 9)rn rn ShowMenu();rn printf("选择菜单错误,请重新选择(0 ~ 9):");rn fflush(stdin);rn rn return num;rn//3.创建一个节点,它会返回一个新创建的会议信息节点的指针 rnPMEETING CreateMeeting() rn rn PMEETING pmee=(PMEETING)malloc(sizeof(MEETING));//在堆内存申请空间,存储会议信息 rn if(!pmee) rn rn printf("申请内存空间失败!\n"); rn return NULL; rn rn printf("请输入会议编号(数字):"); rn while(1 != scanf("%d", &pmee->num) || GetPrevAddr(pmee->num)) rn rn printf("会议编号输入错误或已经有了,请重新输入会议的编号:"); rn fflush(stdin); rn rn printf("请输入会议名称:"); rn scanf("%20s",pmee->name);rn printf("请输入部门名称:");rn scanf("%20s",pmee->department);rn printf("请输入会议地点:");rn scanf("%20s",pmee->place);rn printf("请输入会议日期(年月日中间用.等符号隔开");rn scanf("%20s",pmee->date);rn printf("请输入会议主持人:");rn scanf("%20s",pmee->host);rn printf("请输入会议记录人:");rn scanf("%20s",pmee->recorder);rn printf("请输入出席人员:");rn scanf("%50s",pmee->member);rn printf("请输入会议摘要:");rn scanf("%50s",pmee->abstruct);rn pmee->next = NULL;rn return pmee;rnrn//4.把会议信息节点加入到链表中 rnint AddMeeting(PMEETING pmee) rn rn PMEETING pm = &g_head; rn if(!pmee) rn rn return 0; rn //看输过没有rn if(GetPrevAddr(pmee->num)) rn rn printf("会议信息已存在.\n", pmee->num); rn free(pmee);//释放该节点内存空间 rn return 0; rn rn while(pm->next) rn pm=pm->next; rn pm->next=pmee; rn pmee->next=NULL; rn return 1;rnrn//5.返回指定编号会议节点的上一个节点的指针 rnPMEETING GetPrevAddr(int num) rnrn PMEETING pmee=&g_head;rn while(pmee->next)rn rn if(pmee->next->num==num)rn return pmee;rn pmee=pmee->next;rn rn return NULL; rnrn//6.显示所有会议信息 rnvoid ShowAll() rn rn PMEETING pmee=&g_head; rn while(pmee->next) rn rn printf("会议编号:%d\n", pmee->next->num); rn printf("会议名称:%20s\n", pmee->next->name);rn printf("部门名称:%20s\n",pmee->next->department);rn printf("会议地点:%20s\n",pmee->next->place);rn printf("会议日期:%20s\n",pmee->next->date);rn printf("会议主持人:%20s\n",pmee->next->host);rn printf("会议记录人:%20s\n",pmee->next->recorder);rn printf("出席人员:%50s\n",pmee->next->member);rn printf("会议摘要:%50s\n",pmee->next->abstruct); rn pmee=pmee->next;rn rnrn//7.显示信息数量 rnint ShowMeeting() rn rn int count = 0; rn PMEETING pmee = &g_head; rn while(pmee->next) rn rn ++count; rn pmee=pmee->next; rn rn printf("\n当前共有%d位学生信息。\n", count); rn return count;rnrn//8.修改会议信息rnvoid ModityMeeting(int num) rn rn PMEETING pmee = GetPrevAddr(num); rn int choose; rn if(!pmee) rn rn printf("没有编号为%d的会议信息。\n", num); rn return; rn rn pmee=pmee->next;rn printf("当前会议名称为%s,", pmee->name); rn if(Question("确定要修改吗?"))rn rn printf("请输入会议名称:"); rn scanf("%20s", pmee->name); rn rn printf("当前部门名称为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入部门名称:");rn scanf("%20s",pmee->department);rn rn printf("当前会议地点为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入会议地点:");rn scanf("%20s",pmee->place);rn rn printf("当前会议日期为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入会议日期:");rn scanf("%20s",pmee->date);rn rn printf("当前会议主持人为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入会议主持人:");rn scanf("%20s",pmee->host);rn rn printf("当前会议记录人为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入会议记录人:");rn scanf("%20s",pmee->recorder);rn rn printf("当前出席人员为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入出席人员:");rn scanf("%50s",pmee->member);rn rn printf("当前会议摘要为%s,", pmee->name);rn if(Question("确定要修改吗?"))rn rn printf("请输入会议摘要:");rn scanf("%50s",pmee->place);rn rn printf("修改完毕!\n"); rnrn//9.获取用户的选择 rnint Question(const char *pmee) rn rn char answer; rn printf("%s请选择(y or n):", pmee); rn while(1 != scanf(" %c", &answer) || (answer != 'y' && answer != 'n')) rn rn printf("输入错误!%s请重新选择(y or n):", pmee); rn fflush(stdin); rn rn if('y' == answer) rn return 1; rn else rn return 0; rnrn//10.获取用户输入的会议的编号 rnint GetInputNum() rn rn int num; rn printf("请输入会议编号:"); rn while(1 != scanf("%d", &num)) rn rn printf("编号输入错误!请重新输入会议编号(整型):"); rn fflush(stdin); rn rn return num; rnrn//11.删除编号为num的会议信息 rnvoid DelMeeting(int num) rn rn PMEETING pmee, ptmp; rn if(pmee = GetPrevAddr(num)) rn rn if(!Question("确定要删除该会议信息吗?")) rn rn return; rn rn ptmp = pmee->next; rn pmee->next = ptmp->next; rn free(ptmp); rn printf("删除了编号为%d的会议信息。\n", num); rn rn else rn rn printf("没有找到编号为%d的会议信息。\n", num); rn rnrn//12.删除所有会议信息 rnvoid DelAll() rn rn PMEETING pmee=g_head.next, ptmp; rn int count = 0; rn if(!Question("确定要删除当前所有的会议信息吗?")) rn rn return; rn rn while(pmee) rn rn ptmp=pmee; rn pmee=pmee->next; rn free(ptmp); rn ++count; rn rn printf("共删除了%d位会议信息。\n", count); rn g_head.next = NULL; rnrn//13.存档rnvoid SaveToFile() rn rn FILE *pf = fopen(FILENAME, "wb"); rn PMEETING pmee=&g_head; rn int i=0, count=ShowMeetingCount(); rn if(!pf) rn rn printf("打开待写入的文件失败!\n"); rn return; rn rn if(!Question("确定要将当前会议信息保存到文件中吗?")) rn rn fclose(pf); rn return; rn rn fwrite(&count, 1, sizeof(count), pf);//把会议信息的数量先写入到文件头 rn while(pmee->next) rn rn fwrite(pmee->next, 1, sizeof(MEETING), pf);//把每项会议信息写入文件 rn ++i; rn pmee=pmee->next; rn rn fclose(pf); rn if(i==count) rn rn printf("成功的写入了%d条会议信息。\n", count); rn rn else rn rn printf("应写入%d条会议信息,实际写入%d条会议信息。\n", count, i); rn rnrn//14.读档rnvoid LoadFromFile() rn rn int i, count = 0, repeat = 0; rn FILE *pf; rn PMEETING pmee; rn printf("从文件中读取会议信息会询问是否清空已有会议信息(不清空表示合并所有信息)。\n"); rn if((pf = fopen(FILENAME, "rb")) == NULL) rn rn printf("文件还没有创建,请手工输入会议信息并保存吧!\n"); rn return; rn rn DelAll();//删除之前的所有会议信息,然后从文件中读取 rn fread(&count, 1, sizeof count, pf);//获取会议信息的数量 rn for(i = 0; i < count; ++i) rn rn pmee=(PMEETING)malloc(sizeof(MEETING)); rn fread(pmee, 1, sizeof(MEETING), pf); rn if(!AddMeeting(pmee)) rn rn ++repeat;//保持有多少个和当前链表中相重复的会议信息 rn rn rn fclose(pf); rn printf("文件读取完毕!新增会议信息%d条。\n", count - repeat); rnrn修改了好多次还是很多错误
django 迁移数据库 报错,求大神指教!
不知道为什么,创建一个新的app,迁移数据库就报错了,报错信息如下,求大神帮帮忙 rnrn报错信息:[img=https://img-bbs.csdn.net/upload/201809/04/1536055846_867787.png][/img]rnrn评论app的models:[img=https://img-bbs.csdn.net/upload/201809/04/1536055961_370835.png][/img]rnrnrn博客app的models:[img=https://img-bbs.csdn.net/upload/201809/04/1536055977_949971.png][/img]rn [img=https://img-bbs.csdn.net/upload/201809/04/1536055999_769812.png][/img]rnrnsetting:[img=https://img-bbs.csdn.net/upload/201809/04/1536056016_142390.png][/img]
执行SQL报错,求大神指教!!
该SQL用本机访问数据库无问题,用服务器的应用访问就报一下错误!rnrn[INFO ][admin_1410801622342][09:36:59,186]结果集获取sql=select PROVNO,ORG_ID,ORG_NAME,ORG_DESC,ORG_TYPE,ORG_LEVEL,ABOVEPROVNO,ABOVE_ORG_ID,ACCTPROVNO,ACCTORGNO,CCPROVNO,CCORGNO,OUTPROVNO,OUTPROXYORG,INPROVNO,INPROXYORG,PAYSYSBKID,CLEARBKID,INNERPROVNO,INNER_ORG_ID,LINKNM,TEL,EMAIL,ORG_ADRESS,BAK1,BAK2,BAK3,AUTHLOWAMT,AUTHABOVEAMT,CREATETS,UPDATETS from t_org_cnaps order by org_id rnorg.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select PROVNO,ORG_ID,ORG_NAME,ORG_DESC,ORG_TYPE,ORG_LEVEL,ABOVEPROVNO,ABOVE_ORG_ID,ACCTPROVNO,ACCTORGNO,CCPROVNO,CCORGNO,OUTPROVNO,OUTPROXYORG,INPROVNO,INPROXYORG,PAYSYSBKID,CLEARBKID,INNERPROVNO,INNER_ORG_ID,LINKNM,TEL,EMAIL,ORG_ADRESS,BAK1,BAK2,BAK3,AUTHLOWAMT,AUTHABOVEAMT,CREATETS,UPDATETS from t_org_cnaps order by org_id ]; SQL state [null]; error code [-99999]; null; nested exception is com.ibm.db2.jcc.b.SqlException rnat org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:121)rnat org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)rnat org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382) rnat org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:433) rnat com.hundsun.tamcx.database.JdbcDaoSupport.find(JdbcDaoSupport.java:185) rnat sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source) rnat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) rnat java.lang.reflect.Method.invoke(Method.java:611) rnat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301) rnat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)rnat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)rnat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)rnat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rnat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) rnat $Proxy0.find(Unknown Source) rnat com.hundsun.tamcx.systemx.ext.util.dbUtil.ExtOrgDao.jgInit(ExtOrgDao.java:78) rnat com.hundsun.tamcx.systemx.ext.util.dbUtil.ExtOrgDao.(ExtOrgDao.java:44) rnat com.hundsun.tamcx.systemx.ext.util.dbUtil.ExtOrgDao.getInstance(ExtOrgDao.java:51) rnat com.hundsun.tamcx.systemx.ext.util.dict.TamcDict.tree(TamcDict.java:132) rnat com.hundsun.tamcx.systemx.ext.util.dict.TamcDict.exeAjax(TamcDict.java:496) rnat com.hundsun.tamcx.systemx.base.AjaxDictServlet.doPost(AjaxDictServlet.java:70) rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:647) rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:729) rnat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) rnat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) rnat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) rnat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) rnat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) rnat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) rnat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) rnat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) rnat org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) rnat org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rnat org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) rnat org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) rnat org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) rnat java.lang.Thread.run(Thread.java:736) rnCaused by: com.ibm.db2.jcc.b.SqlException rnat com.ibm.db2.jcc.b.s.a(s.java:1517) rnat com.ibm.db2.jcc.b.s.n(s.java:532) rnat com.ibm.db2.jcc.b.s.W(s.java:1436) rnat com.ibm.db2.jcc.b.kf.a(kf.java:1075) rnat com.ibm.db2.jcc.b.kf.getObject(kf.java:1062) rnat org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.java:286) rnat org.springframework.jdbc.support.JdbcUtils.getResultSetValue(JdbcUtils.java:137) rnat org.springframework.jdbc.core.ColumnMapRowMapper.getColumnValue(ColumnMapRowMapper.java:96) rnat com.hundsun.tamcx.database.util.CommonRowMapper.mapRow(CommonRowMapper.java:38) rnat org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)rnat org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:423) rnat org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:371) rn... 34 more
SSH框架报错?
我也不知道是什么原因,只能把错误贴上来,需要看代码的说一声,我也可以贴出来rnexceptionStack java.lang.reflect.InvocationTargetException rnat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) rnat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) rnat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) rnat java.lang.reflect.Method.invoke(Method.java:597) rnat com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) rnat com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) rnat com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) rnat org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) rnat com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) rnat com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) rnat com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) rnat com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept
搭建ssh框架报错
今天重新搭建ssh框架报以上错误,后来才知道少了jar包:缺少aspectjweaver.jar这个包,该包是spring集成AspectJ LTW织入器所需包。
SSH框架报错什么原因?
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'transaction' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'dataSource': Set this property value or disable dependency checking for this bean.rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1243)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1063)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:451)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:552)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn2012-2-4 18:21:17 org.apache.catalina.core.StandardContext start
SSH框架的程序报错
报的错的一些信息是:rnInitialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/TypernrnCaused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Typern at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180)rn at net.sf.cglib.core.KeyFactory.(KeyFactory.java:66)rn at net.sf.cglib.proxy.Enhancer.(Enhancer.java:69)rn at org.springframework.aop.framework.Cglib2AopProxy.createEnhancer(Cglib2AopProxy.java:228)rn at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:170)rn at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)rn at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:476)rn at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362)rn at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:404)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)rn ... 40 morernCaused by: java.lang.ClassNotFoundException: org.objectweb.asm.Typern at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn ... 52 morern2010-12-19 14:57:44 org.apache.catalina.core.ApplicationContext logrn信息: Marking servlet action as unavailablern2010-12-19 14:57:44 org.apache.catalina.core.StandardContext loadOnStartuprn严重: Servlet /SSHCaseOfBook threw load() exceptionrnjavax.servlet.UnavailableExceptionrn at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)rn at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnrn请分析下是什么原因
整合SSH框架报错
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/classPath:applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classPath:applicationContext.xml]rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:578)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: java.io.FileNotFoundException: Could not open ServletContext resource [/classPath:applicationContext.xml]rn at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:117)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)rn ... 36 morernrnrnweb.xmlrnrnrn rn index.jsprn rn rnrn rn contextConfigLocationrn classPath:applicationContext.xmlrn rnrn rn org.springframework.web.context.ContextLoaderListenerrn rnrnrn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn utf-8rn rn rn rn encodingFilterrn /*rn rnrn rn Struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn Struts2rn /*rn rn rnrn
配置ssh框架报错
严重: Context initialization failedrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundErrorrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:578)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundErrorrn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)rn at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)rn ... 31 morernCaused by: java.lang.NoClassDefFoundErrorrn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.(LocalSessionFactoryBean.java:174)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)rn ... 33 morernCaused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configurationrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:169)rn ... 40 morern2012-3-6 15:28:52 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnrnCaused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configurationrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:169)rn ... 40 morern
ssh框架 c3po 报错
[code=java]rnrn16:54:47,017 WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1c1d189 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: rnjava.sql.SQLException: No suitable driverrn at java.sql.DriverManager.getDriver(DriverManager.java:289)rn at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:224)rn at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rnrnrn[/code]
求大神指教 关于volley框架
今天看了volley框架 其中有些不明白 就是post请求 内容是json格式数据 想问一下服务器那边 怎么接收到这数据rnrequest.getparam(XX) xx应该是什么????不知道我说清楚没有
ssm框架运行出错,求大神指教
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListenerrnjava.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListenerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)rn at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)rn at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)rn at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4932)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)rn at java.util.concurrent.FutureTask.run(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)
初学play框架遇到问题,求大神指教
Application类rn[code=java]package controllers;rnrnimport model.Task;rnimport play.data.Form;rnimport play.mvc.*;rnrnpublic class Application extends Controller rnrn static Form taskForm = Form.form(Task.class);rn rn public static Result index() rn //return ok(index.render("Your new application is ready."));rn return redirect(routes.Application.tasks());rn rnrn rn public static Result tasks()rn return ok(views.html.index.render(Task.all(),taskForm));rn rn rn public static Result newTask()rn Form filledForm = taskForm.bindFromRequest();rn if(filledForm.hasErrors())rn return badRequest(rn views.html.index.render(Task.all(),filledForm)rn );rn elsern Task.create(filledForm.get());rn return redirect(routes.Application.tasks());rn rn rn rn public static Result deleteTask(Integer id)rn Task.delete(id);rn return redirect(routes.Application.tasks());rn rnrn[/code]rnrnTask类rn[code=java]package model;rnrnimport java.util.List;rnimport javax.persistence.*;rnimport play.data.validation.Constraints.*;rnimport play.db.ebean.*;rnrn@Entityrn@Table(name="task")rnpublic class Task extends Modelrnrn private static final long serialVersionUID = 1L;rn @Idrn public Integer id;rn @Requiredrn public String label;rn rn public static Finder find = new Finder(Integer.class,Task.class);rn rn public static List all()rn return find.all();rn rn rn public static void create(Task task)rn task.save();rn rn rn public static void delete(Integer id)rn find.ref(id).delete();rn rnrn[/code]rnrnroutes文件内容rn[code=java]# Routesrn# This file defines all application routes (Higher priority routes first)rn# ~~~~rnrn# Home pagernGET / controllers.Application.index()rnrn# Map static resources from the /public folder to the /assets URL pathrnGET /assets/*file controllers.Assets.at(path="/public", file)rnrnrn# TasksrnGET /tasks controllers.Application.tasks()rnPOST /tasks controllers.Application.newTask()rnPOST /tasks/:id/delete controllers.Application.deleteTask(id: Integer)rn[/code]rnrnapplication.conf文件内容rn[code=java]# This is the main configuration file for the application.rn# ~~~~~rnrn# Secret keyrn# ~~~~~rn# The secret key is used to secure cryptographics functions.rn# If you deploy your application to several instances be sure to use the same key!rnapplication.secret="Xte]]5>ggfU1@MCpV9]HP7yhB?@OwH4yU>ZkosmNgyEnLr18lGIl2::@3;rpraYM"rnrn# The application languagesrn# ~~~~~rnapplication.langs="en"rnrn# Global object classrn# ~~~~~rn# Define the Global object class for this application.rn# Default to Global in the root package.rn# application.global=Globalrnrn# Routerrn# ~~~~~rn# Define the Router object to use for this application.rn# This router will be looked up first when the application is starting up,rn# so make sure this is the entry point.rn# Furthermore, it's assumed your route file is named properly.rn# So for an application router like `conf/my.application.Router`,rn# you may need to define a router file `my.application.routes`.rn# Default to Routes in the root package (and `conf/routes`)rn# application.router=my.application.Routesrnrn# Database configurationrn# ~~~~~rn# You can declare as many datasources as you want.rn# By convention, the default datasource is named `default`rn#rn db.default.driver=com.mysql.jdbc.Driverrn db.default.url="jdbc:mysql://127.0.0.1:3306/play"rn db.default.user=rootrn db.default.password="123456"rn#rn# You can expose this datasource via JNDI if needed (Useful for JPA)rn# db.default.jndiName=DefaultDSrnrn# Evolutionsrn# ~~~~~rn# You can disable evolutions if neededrn evolutionplugin=disabledrnrn# Ebean configurationrn# ~~~~~rn# You can declare as many Ebean servers as you want.rn# By convention, the default server is named `default`rn#rn ebean.default="models.*"rnrn# Loggerrn# ~~~~~rn# You can also configure logback (http://logback.qos.ch/),rn# by providing an application-logger.xml file in the conf directory.rnrn# Root logger:rnlogger.root=ERRORrnrn# Logger used by the framework:rnlogger.play=INFOrnrn# Logger provided to your application:rnlogger.application=DEBUGrnrn[/code]rnrnindex.scala.html 内容rnrn@(tasks: List[model.Task] , taskForm: Form[model.Task])rnrn@import helper._rn@main("Welcome to Play") rnrn @tasks.size() task(s)rn rn @for(task <- tasks)rn rn @task.labelrn @form(routes.Application.deleteTask(task.id))rn rn rn rn rn rnrnrn 增加一个内容rn rn @form(routes.Application.newTask())rn @inputText(taskForm("label"))rn rn rn rnrnrnrn出现下面错误,rn[img=https://img-bbs.csdn.net/upload/201607/17/1468752906_487820.png][/img]rnrnrn明明加了@Entity 为什么还出现这个问题,求解
ssm框架报错。求大神解决
Struts Problem Reportrnrn Struts has detected an unhandled exception: rnrnrnMessages:A ResourcePool could not acquire a resource from its primary factory or source.rnConnections could not be acquired from the underlying database!rnCould not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!rnrnFile:com/mchange/v2/resourcepool/BasicResourcePool.javarnLine number:1,319rnrnrnStacktracesrnrnorg.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database! rn org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:241)rn org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:372)rn org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:417)rn org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:255)rn org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)rn com.sun.proxy.$Proxy10.add(Unknown Source)rn com.njwangbo.action.UserAction.regist(UserAction.java:17)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn java.lang.reflect.Method.invoke(Method.java:606)rn ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:870)rn ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1293)rn ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)rn com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)rn com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)rn ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1369)rn ognl.ASTMethod.getValueBody(ASTMethod.java:90)rn ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)rn ognl.SimpleNode.getValue(SimpleNode.java:258)rn ognl.Ognl.getValue(Ognl.java:494)rn ognl.Ognl.getValue(Ognl.java:458)rn com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.java:309)rn com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:340)rn com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:307)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:423)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:287)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:250)rn org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)rn org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)rn org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)rn org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn java.lang.Thread.run(Thread.java:744)rn rnrn
shiro框架报错空指针,求大神帮忙
下面代码是shiro中的权限验证部分代码,List posts打印不出来,从这里开始报错。rn没加入权限验证的时候 用户登录验证是可以用的,在外面使用相同的语句 posts是可以打印出来的。求大神指点。rn[code=java]public class UserRealm extends AuthorizingRealm rnrn @Resourcern UserinfoService userinfoService;rn PostsService postsService;rn rn// 访问权限rn @Overridern protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection token) rn String userName = (String) token.getPrimaryPrincipal(); //获取用户名usersbmrn System.out.println(userName);rn Set roles =new HashSet();//创建身份rn System.out.println(roles);rn List posts = postsService.QueryPosts(); //查询所有权限信息保存到postsrn System.out.println(posts);rn Userinfo userinfo = userinfoService.QueryUserByUsersbm(userName);rn int userposts=userinfo.getUserclass();//获取用户等级rn int one= posts.get(0).getPostclass();//设置权限one等于数据库内第一个权限用户的postclassrn int two=posts.get(1).getPostclass();rn int three=posts.get(2).getPostclass();rn int four=posts.get(3).getPostclass();rn int five=posts.get(4).getPostclass();rn rn //为roles 添加对应 postsclass的中文身份。rn if (userposts==one) rn roles.add(posts.get(0).getPosts());rn rn if (userposts==two) rn roles.add(posts.get(1).getPosts());rn rn if (userposts==three) rn roles.add(posts.get(2).getPosts());rn rn if (userposts==four) rn roles.add(posts.get(3).getPosts());rn rn if (userposts==five) rn roles.add(posts.get(4).getPosts());rn rn rn Set permissions = new HashSet();rn// //所有用户可以访问的地址:rn permissions.add("/login");rn permissions.add("/dologin");rn permissions.add("/QueryStationByLines");rn permissions.add("/QueryCodexByStation");rn permissions.add("/QueryUserByStation");rn permissions.add("/index");rn// //权限用户可以访问的地址:rn if(userposts == one)rn permissions.add("/upuserpwd");rn rn rn SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();rn authorizationInfo.addRoles(roles);//设置角色rn authorizationInfo.addStringPermissions(permissions);//设置权限rn return authorizationInfo;rn// return null;rn rn [/code]rnrnweb.xml中的配置rn[code=text] rn rn shiroFilterrn rn org.springframework.web.filter.DelegatingFilterProxyrn rn rn rn shiroFilterrn /*rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn contextConfigLocation rn classpath:applicationContext.xml rn [/code]rnapplicationContext.xml中的配置:rn[code=text] rnrn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn /login = anonrn /dologin = anonrn /QueryStationByLines = anonrn /QueryCodexByStation = anonrn /QueryUserByStation = anonrn /static/** = anonrn /** = authcrn /** = permsrn rn rn [/code]rn
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池