我有一个非常简单的服务,它返回 500 错误 - 这是错误的详细信息:
[EL 信息]:2013-11-01 11:09:05.61--ServerSession(741529784)--EclipseLink,版本:Eclipse Persistence Services - 2.3.2.v20111125-r10461
[EL信息]:2013-11-01 11:09:06.452--ServerSession(741529784)--file:/C:/Users/Fred/workspace/.metadata/.plugins/org.eclipse.wst.server.core /tmp0/wtpwebapps/cheese-ws/WEB-INF/lib/cheese-jpa.jar_cheese 登录成功
34442 [http-bio-8080-exec-1] 错误 org.apache.wink.server.internal.handlers.FlushResultHandler - 系统找不到 javax.ws.rs.ext.MessageBodyWriter 或 Java 的 DataSourceProvider 类。 util.Vector 类型和 application/json mediaType。确保在 JAX-RS 应用程序中存在指定类型和媒体类型的 javax.ws.rs.ext.MessageBodyWriter。
34446 [http-bio-8080-exec-1] INFO org.apache.wink.server.internal.RequestProcessor - 调用处理程序链期间发生以下错误:WebApplicationException (500 - Internal Server Error) with message 'null'在处理发送到...的 GET 请求时
该代码非常简单,与其他运行良好的服务非常相似:
公共类 StudentTeacherCommunicationService 扩展 BaseService {
@GET
@Path("classroomId/{classroomId}/studentId/{studentId}")
@Produces(MediaType.APPLICATION_JSON)
public List<ClassroomStudentCommunication> getCandidatesAsJson(@PathParam("classroomId") int classroomId, @PathParam("studentId") int studentId) {
EntityManager em = createEM();
TypedQuery<ClassroomStudentCommunication> query;
if(studentId==0) {
query = em.createQuery("SELECT csc FROM ClassroomStudentCommunication csc where csc.classroomId = :classroomId ORDER BY csc.threadOrder", ClassroomStudentCommunication.class);
query.setParameter("classroomId", classroomId);
List <ClassroomStudentCommunication> classCommunication = query.getResultList();
return classCommunication;
有任何想法吗?