第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

java高并發(fā)Junit測(cè)試問題

java高并發(fā)Junit測(cè)試問題

mjka5632 2016-12-03 11:22:29
java.lang.NoClassDefFoundError: Lorg/seckill/dao/SeckillDao; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2317) at java.lang.Class.getDeclaredFields(Class.java:1762) at org.junit.runners.model.TestClass.<init>(TestClass.java:49) at org.junit.runners.ParentRunner.<init>(ParentRunner.java:75) at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:57) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:111) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26) at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:31) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference.<init>(JUnit4TestMethodReference.java:25) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:54) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)Caused by: java.lang.ClassNotFoundException: org.seckill.dao.SeckillDao at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 26 morespring-dao.xml的配置文件<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"? ? ? ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"? ? ? ? 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/context? ? ? ? http://www.springframework.org/schema/context/spring-context-3.1.xsd"> <!-- 配置整合mybatis過程 --> <!-- 1.配置數(shù)據(jù)庫(kù)相關(guān)參數(shù) --><!-- <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"> <value>classpath:jdbc.properties</value> </property> <property name="fileEncoding" value="utf-8" /> </bean> --> <context:property-placeholder location="classpath:jdbc.properties"/> <!-- 2.配置連接池屬性 --> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooleDataSource"> <!-- 配置連接池屬性 --> <property name="driverClass" value="${driver}" /> <property name="jdbcUrl" value="${url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${password}" /> <!-- c3p0連接池私有屬性 --> <property name="maxPoolSize" value="30"/> <property name="minPoolSize" value="10"/> <!-- 關(guān)閉連接后不能自動(dòng)commit --> <property name="autoCommitOnClose" value="false"/> <!-- 獲取連接超時(shí)時(shí)間 --> <property name="checkoutTimeout" value="1000"/> <!-- ?獲取連接失敗重試次數(shù)--> <property name="acquireRetryAttempts" value="2"/> </bean> <!-- 3.配置SqlSessionFactory --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <!-- 注入數(shù)據(jù)庫(kù)連接池 --> <property name="dataSource" ref="dataSource"/> <!-- 配置mybatis全局配置文件 --> <property name="configLocations" value="classpath:mybatis-config.xml"/> <!-- 掃描sql配置文件 --> <property name="mapperLocations" value="mapper/*.xml"/> <!-- 掃描entity包 使用別名 --> <property name="typeAliasesPackage" value="org.seckill.entity"/> </bean> <!-- 4.配置掃描Dao接口包,動(dòng)態(tài)實(shí)現(xiàn)Dao接口,注入到Spring容器中 --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!-- 注入sqlSessionFactory --> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/> <!-- 給出掃描Dao接口包 --> <property name="basePackage" value="org.seckill.dao"/> </bean></beans>
查看完整描述

2 回答

?
永恒神話ch

TA貢獻(xiàn)1條經(jīng)驗(yàn) 獲得超0個(gè)贊

樓主怎么解決的,我現(xiàn)在也遇到這個(gè)問題。。。。

查看完整回答
反對(duì) 回復(fù) 2017-04-02
?
Its_forever

TA貢獻(xiàn)361條經(jīng)驗(yàn) 獲得超328個(gè)贊

沒找到這個(gè)類SeckillDao。

檢查有沒有這個(gè)類,

有就重新編譯一下。

查看完整回答
反對(duì) 回復(fù) 2016-12-03
  • mjka5632
    mjka5632
    怎么編譯啊,你看看,我的目錄結(jié)構(gòu)對(duì)嗎?
  • Its_forever
    Its_forever
    額。沒有配置文件,目錄結(jié)構(gòu)也看不出來什么啊。編譯就是idea就是build啊。eclipse就是重新部署啊。部署之前清理一下緩存。
  • mjka5632
    mjka5632
    是這個(gè)配置文件嗎?你看看
點(diǎn)擊展開后面4
  • 2 回答
  • 0 關(guān)注
  • 2396 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)