出现junit.framework.AssertionFailedError: No tests found in hill.vo.CustomerDAO
不知出了什么问题, 测试的类的应该是CustomerDAOTest 而不是 CustomerDAO public static void main(String[] args)
{
TestRunner.run(CustomerDAO.class);
}
修改下
你用junit3的话还应该取消
// @Test
这个注释
不知出了什么问题, 测试的类的应该是CustomerDAOTest 而不是 CustomerDAO public static void main(String[] args)
{
TestRunner.run(CustomerDAO.class);
}
修改下
你用junit3的话还应该取消
// @Test
这个注释
解决方案 »
- Hibernate 自动生成的DAO,save方法可以用,findByException方法不能用???
- 关于自考本科 望有经验的同行给点建议~
- 不痛也不庠,hibernate级联问题,删除无响应,望大哥指点,在线等~~
- hibernate的连接查询问题
- 学习struts有什么好的源码吗?
- 学习struts(问题很简单,这分很好得)
- 求助:JBoss3.2.5下发部署War文件的问题
- 怎样设置ResultSet为可更新结果集?在线等待...
- 在jbuilder6中怎样配mysql的jdbc驱动?database pilot里Driver和URL又是怎样的格式?
- eclipse html链接到servlet时url不一致
- hibernate插入,删除数据后的奇怪问题
- 请问JBOSS4里的jms的queue或topic里如何设置只给专门的角色去访问这个queue或topic
// @Test
这个注释如果注释掉会有错误提示
TestRunner.run(CustomerDAOTest.class); 运行方式为java应用程序
出现以下错误提示
junit.framework.AssertionFailedError: Exception in constructor: testConfig (org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
han one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 21 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 22 more
)
.......
<bean id="customerDAO" class="hill.vo.CustomerDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
....................
// @Test
这个注释 如果注释掉会有错误提示 import it先排除其他问题
你跑个空Test 先跑起来再说