sorry........错误信息如下: [appfuse2] ERROR [http-8080-Processor23] DispatchAction.dispatchMethod(299) | Dispatch[/savePeople] to method 'save' returned an exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
pojo和配置文件太多了。那些应该没有问题,主要是我想知道我这么写对不
你的struts应用中那个地方调用了save的这个方法啊?查一下
Hibernate中一对多的写法,这样对么? Publication publication = new Publication(); publication.setBookName(peopleForm.getBookName()); publication.setDataTime(peopleForm.getDataTime()); publication.setAuthor(author); author.getPublications().add(publication);
[appfuse2] ERROR [http-8080-Processor23] DispatchAction.dispatchMethod(299) | Dispatch[/savePeople] to method 'save' returned an exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Publication publication = new Publication();
publication.setBookName(peopleForm.getBookName());
publication.setDataTime(peopleForm.getDataTime());
publication.setAuthor(author);
author.getPublications().add(publication);