SSI框架中遇到的问题

1、Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource需要导入c3p0-0.9.1.2.jar

      详见http://pan.baidu.com/s/1bnCJkPx


2、Lcom/opensymphony/xwork2/util/logging/Logger原因是struts2-core-2.2.1.1与xwork-core-2.2.1.1的版本不匹配用这两个就行了

      详见http://pan.baidu.com/s/1gdFYVnH


3、The prefix "tx" for element "tx:annotation-driven" is not bound.——The prefix "context" for element "context:annotation-config" is not bound.

      类似这类找不到标签的情况通常是application配置文件开头没有引用网址。贴出一个比较全面的

      <beans xmlns="http://www.springframework.org/schema/beans "
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
                    xmlns:aop="http://www.springframework.org/schema/aop "
                    xmlns:tx="http://www.springframework.org/schema/tx "
                    xmlns:context="http://www.springframework.org/schema/context"
                    xsi:schemaLocation="http://www.springframework.org/schema/beans
                     http://www.springframework.org/schema/beans/spring-beans.xsd
                     http://www.springframework.org/schema/tx
                     http://www.springframework.org/schema/tx/spring-tx.xsd
                     http://www.springframework.org/schema/aop
                     http://www.springframework.org/schema/aop/spring-aop.xsd ">


4、配置事物:

     <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">  
        <property name="annotationClass" value="org.springframework.stereotype.Repository"/>  
        <property name="basePackage" value="com.itdatasystem.main.dao.**"/>  
    </bean>  
      
 
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">  
        <property name="dataSource" ref="dataSource" />  
    </bean>  
      
    <context:annotation-config/>
    <tx:annotation-driven transaction-manager="transactionManager" />  
      
    <context:component-scan base-package="com.itdatasystem.main.service.**"></context:component-scan> 


5、No result defined for action and result input需要配置<result name="input">/AddProducts.jsp</result>


6、总是无故返回input、在提交表单时有数据类型不符合要求。


7、启动服务器是出现error lienter的错误,造成这种错误的情况有很多,网上也有很多答案,但是没个人的情况都不一样,需要配置日志文件在具体打印一下错误日志:

在src下创建log4j.properties的文件,内容如下,同时需要导入log4j.jar和common-logger.jar的包

log4j.rootLogger=debug,console,file

log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p[%15t][%24F:%3L]%m%n

log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.DatePattern='-'yyyy-MM-dd
log4j.appender.file.File=D:\\log\\it.log
log4j.appender.file.Append=true
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p[%15t][%24F:%3L]%m%n



8、不允许从数据类型 varbinary 到 date  的隐式转换。请使用 CONVERT 函数来运行此查询。

      http://www.w3school.com.cn/sql/func_convert.asp


9、正则表达式 http://www.jb51.net/article/16829.htm


10、360浏览器js表单提交经常会出现问题,其实这是因为360浏览器会重复提交两次,而第二次是空值会覆盖掉前面的数据,所以导致提交失败。

        解决方法,ajax提交

        http://blog.sina.com.cn/s/blog_4f925fc30100la36.html 


11、jquery ajax:

$(function(){

    $('#send').click(function(){
         $.ajax({
             type: "GET",
             url: "<misc:contextPath/>/bg/materentry/edittitle",
             data: {id:$("#id").val(), title:$("#title").val(),title_en:$("#title_en").val()},
             dataType: "html",
             success: function(data){
                 if(data == "success"){
                    
                     window.opener.location.href=window.opener.location.href;window.close();
                 }
                      }
         });
    });
});


12、caused by:java.lang.InstantiationException:com.itdatasystem.main.entity.loginfo

         刚出现这个问题百思不得其解,后来经过查询,在映射实力类的时候,类中没有无参数构造方法就会出现这种情况

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值