刚看完了视频,简直是太帅了....
banq老师,那个演示案例源码导入myeclipse里时怎么有错误
是吗?
2010-12-31 11:52:22,968 [http-8080-1] ERROR com.jdon.bussinessproxy.target.POJOObjectFactory - [JdonFramework]create error: java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.()V from class org.hibernate.cache.EhCacheProvider
2010-12-31 11:52:22,968 [http-8080-1] ERROR com.jdon.bussinessproxy.target.DefaultTargetServiceFactory - [JdonFramework]create error: java.lang.Exception: java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.()V from class org.hibernate.cache.EhCacheProvider
2010-12-31 11:52:22,968 [http-8080-1] ERROR com.jdon.aop.reflection.ProxyMethodInvocation - [JdonFramework]run error: java.lang.NullPointerException
2010-12-31 11:52:22,968 [http-8080-1] ERROR sample.ps.UserListAction - java.lang.reflect.UndeclaredThrowableException
2010-12-31 11:52:22,968 [http-8080-1] ERROR com.jdon.strutsutil.ModelListAction - getPageIterator not be implemented, you must implement either of them

sjh项目,打开主页时报以上错误,是什么原因呢?

UserlistAction.java中有实现
public PageIterator getPageIterator(HttpServletRequest request, int start,
int count) {
PageIterator pageIterator = null;
try {
UserService userService = (UserService) WebAppUtil.getService(
"userService", request);
pageIterator = userService.getUserList(start, count);
} catch (Exception ex) {
logger.error(ex);
}
return pageIterator;
}

UserServiceImpl.java中也实现
public PageIterator getUserList(int start, int count) throws Exception {

try{
return jd.getModels(start, count);
}catch(Exception e){
logger.error(e);
return null;
}
}

此问题终于解决了,是由于service接口中方法的名称与xml文件中写得不一致造成的。

还有一疑问:
是不是xml中






所有service中的方法都要在这里写出来并一一对应呢,
究竟什么样的情况下必须对应出来呢?

[该贴被davidtwins于2010-12-31 14:00修改过]

我把User的字段改成(uid,name,address),HibernateTemplateTest测试成功保存了。就是 web方式保存老是出错。

我贴出来配置了
jdonframework.xml



















class="com.jdon.persistence.hibernate.HibernateCRUDTemplate" />
class="com.jdon.persistence.hibernate.AnnotationConfFactory">



struts-config.xml



























界面出来了,保存的时候总是提示,
ERROR com.jdon.container.pico.PicoContainerWrapper - [JdonFramework] container start error: org.picocontainer.PicoIntrospectionException: Failed when calling start on com.jdon.components.encache.EncacheProvider@1642bd6

Caused by: net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was null:214: Element does not allow attribute "propertySeparator".
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:147)
at net.sf.ehcache.CacheManager.parseConfiguration(CacheManager.java:235)
at net.sf.ehcache.CacheManager.init(CacheManager.java:190)
at net.sf.ehcache.CacheManager.(CacheManager.java:172)
at com.jdon.components.encache.EncacheProvider.start(EncacheProvider.java:52)

2011-01-24 05:51:31,546 [http-8080-2] ERROR com.jdon.strutsutil.ModelListAction - getPageIterator not be implemented, you must implement either of them
2011-01-24 05:51:34,406 [http-8080-2] ERROR com.jdon.util.Debug - [JdonFramework] makeModel error: java.lang.NullPointerException
2011-01-24 05:51:34,406 [http-8080-2] ERROR com.jdon.strutsutil.ModelSaveAction - [JdonFramework]please check your service 、 model or form :java.lang.Exception: java.lang.NullPointerException
2011-01-24 05:51:34,406 [http-8080-2] WARN org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.Exception
banq。为我学jdon,我女朋友都要和我分手了,你多给点指教啊。