当前位置: 代码迷 >> junit的解决方案
 
  • 怎么测试struts2的action

    如何测试struts2的action? 在web应用中做action的单元测试,一向比较麻烦.因为它对web容器的依赖。现在有办法了。struts提供了个测试插件,结合JUnit,可以很方便的进行单元测试,一、加入struts2-junit-plugin.xxx.jar插件二、测试类 /** * */ packagecom.auth; importorg.apache.struts2.Strut...

    107
    热度
  • Struts2的Action应该如何测试

    Struts2的Action应该怎么测试网上找了大半天。好多都是讲Struts的Action。我继承StrutsSpringTestCaserequest.setParameter("xx","xx");的时候,会出空指针异常。另外我的struts.xml也不再默认的位置。。求方案。。color='#e78608'>------解决方案-----------...

    295
    热度
  • 新手 shh整合有关问题

    新手求助shh整合问题org.springframework.beans.factory.BeanDefinitionStoreException:UnexpectedexceptionparsingXMLdocumentfromclasspathresource[applicationContext.xml];nestedexceptionisjava.lang.NoSuchMethodErro...

    647
    热度
  • 请问spring3.1和hibernate4整合中的一个有关问题

    请教spring3.1和hibernate4整合中的一个问题我在整合spring3.1和hibernate4的时候发现了一个问题,就是spring去创建sessionFactory的时候,报java.lang.NoClassDefFoundError:org/hibernate/context/CurrentSessionContext的错误。具体的错误如下:Javacodejava.lang.N...

    0
    热度
  • mysql有关问题:求解决。Could not obtain connection metadata

    mysql问题:求解决。。。Couldnotobtainconnectionmetadata用junit测试时,连接的是mysql,出现了这种异常,请问是什么问题呀?03:06:17,335WARNSettingsFactory:109-Couldnotobtainconnectionmetadatacom.mysql.jdbc.exceptions.MySQLSyntaxErrorExcepti...

    283
    热度
  • hibenate+oracle报错:could not get next sequence value,该怎么处理

    hibenate+oracle报错:couldnotgetnextsequencevalue在sql*plus下执行语句:insertintouserinfo(userid,username,userpw)values(105,'a','b');commit后数据可以插入到数据库xml:Javacode<idname="userid"type="java.lan...

    846
    热度
  • hibernate dialect 有关问题

    hibernatedialect问题2008-10-111:04:24org.hibernate.connection.UserSuppliedConnectionProviderconfigure警告:Noconnectionpropertiesspecified-theusermustsupplyJDBCconnectionsorg.hibernate.HibernateException:H...

    43
    热度
  • java 发 email 附件有关问题

    java发email附件问题在doc,png,csv我试了,都没有问题但是xml就不行了。javax.mail.MessagingException:IOExceptionwhilesendingmessage;nestedexceptionis: java.io.IOException:"text/xml"DataContentHandlerrequiresStringobject,wasgiv...

    3161
    热度
  • spring 3.2 + ehcache 注解 请问

    spring3.2+ehcache注解请教晚上在网上搞了个例子,spring-ehcache.xml:<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:cache="http://www.springframew...

    393
    热度
  • 解决施用Selenium2进行Web自动化测试时IE启动失败的方法

    解决使用Selenium2进行Web自动化测试时IE启动失败的方法 我的机器环境是WIN7,IE8,JDK1.5.0,Selenium2.19.0版本,在调试WEB自动化测试过程中,遇到Firfox启动正常,但是IE8却启动报如下的错误: ? java.lang.RuntimeException:org.openqa.selenium.WebDriverException:Unexpected...

    150
    热度
  • Cannot resolve reference to bean 'sessionFactory' while setting bean property 's解决方案

    Cannotresolvereferencetobean'sessionFactory'whilesettingbeanproperty'sstruts1.X,hibernate3.2,Spring2.x一直包上面的错误,也按照网上说的,删除hibernate的asm,用spring下的asm开头的3个jar可以程序还是报错,如下:Javacodeorg.springframework.beans...

    680
    热度
  • Hibernate_多种查询形式介绍

    Hibernate_多种查询模式介绍 packagecom.sun.test; importjava.util.Iterator; importjava.util.List; importjava.util.Map; importjava.util.Set; importorg.hibernate.Criteria; importorg.hibernate.Query; importorg.h...

    277
    热度
  • lucene-运用QueryParser和IndexSearcher

    lucene-使用QueryParser和IndexSearcher QueryParser QueryParser把查询表达式转换为lucene内置的查询类型 查询表达式 匹配的文档 java 默认域包含java项的文档 javajunit javaorjunit 默认域中包含java和junit中的一个或两个文档。 +java+junit javaAN...

    717
    热度
  • commons-pool.jar 有关问题

    commons-pool.jar问题org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sessionFactorySale'definedinfile[D:\project\MyEclipse8.5\ssh_team0\WebRoot\WEB-INF\applicationContex...

    441
    热度
  • Spring单元测试,SQL数据预备

    Spring单元测试,SQL数据准备在测试中,一般的数据库数据Mock是不可少的。在前文的基础上,我们写读取脚本把数据写入数据库的工具类。packagecom.jje.travel.provider;importcom.jje.travel.InitTestEnvironment;importorg.junit.After;importorg.junit.Before;importorg.juni...

    25
    热度
  • spring与hibernate的有关问题?

    spring与hibernate的问题????org.hibernate.exception.ConstraintViolationException:couldnotinsert:[com.bjsxt.model.User] atorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94) atorg.h...

    37
    热度
  • 关于Hibernate应射错误

    关于Hibernate应射错误 程序代码:<?xmlversion='1.0'encoding='UTF-8'?><!DOCTYPEhibernate-configurationPUBLIC\"-//Hibernate/HibernateConfigurationDTD2.0//EN\"\"http://hibernate.sourceforge.ne...

    307
    热度
  • ejb持久层测试时候抛出错误

    ejb持久层测试时候抛出异常publicclassPersonServiceTest{ privatestaticPersonServicepersonService; @BeforeClass publicstaticvoidsetUpBeforeClass()throwsException{ try{ InitialContextctx=newInitialContext(); p...

    7
    热度
  • spring配置出错

    spring配置报错2014-10-279:56:20org.springframework.context.support.AbstractApplicationContextprepareRefresh信息:Refreshingorg.springframework.context.support.GenericApplicationContext@a981ca:startupdate[Mon...

    63
    热度
  • mybatis的出错…ORA-00911: 无效字符

    mybatis的报错……ORA-00911:无效字符xml里的配置<selectid="findLocalPeopleSfzh"parameterType="com.tzyt.common.model.PageMap"resultType="java.lang.String">selectt.sfzhfromt_ldrkt <trimprefix="where"prefixOve...

    689
    热度