W***o 发帖数: 6519 | 1 再请教一下大家:
下面是我的mapper code:
public class CrimeMapper extends Mapper
IntWritable>
{
protected static final int DATE_INDEX = 2;
protected static final int CRIME_TYPE_INDEX = 5; // column index
protected static final int YEAR_INDEX = 17; // column index
private static final Log _log = LogFactory.getLog(CrimeMapper.class);
private static final IntWritable ONE = new IntWritable(1);
@Override
public void map(LongWritable key, Text... 阅读全帖 |
|
I*******e 发帖数: 1879 | 2 ☆─────────────────────────────────────☆
cherokee (qq) 于 (Sun Apr 29 19:49:11 2007) 提到:
我自学一个spring的例程,却给我这个Exception, 这个是不是说找不到class
ClassPathResource. 我什么都是按照他说的作的, 为什么会这样?谢谢。
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
commons/lo
gging/LogFactory
at org.springframework.util.ClassUtils.(ClassUtils.java:59)
at org.springframework.core.io.ClassPathResource.(
ClassPathResourc
e.java:82)
at org.springframework.core.io.ClassPathRe |
|
c***a 发帖数: 364 | 3 因为HttpClient4.0没有.commons了,所以使用HttpClient3.0.1。
其实就是run一个例子:
http://hc.apache.org/httpclient-3.x/tutorial.html
编译都通过了,我也能够在HttpClient的包中看到HttpClient这个class,但是运行的
时候就是找不到,报错NoClassDefFoundError。
写了一个很小的测试程序:
package test;
import org.apache.commons.httpclient.*;
public class test {
public static void main(String args[]){
HttpClient client = new HttpClient();
}
}
错误:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
commons/logging/LogFactory
at org.apac... 阅读全帖 |
|