GWT与JPA [英] GWT with JPA

查看:103
本文介绍了GWT与JPA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用GWT 1.5.3构建数据库应用程序。我用我的对象使用JPA注释。它似乎在托管模式GWT的RPC工作正常。但是,当我尝试使用GWT编译器编译我的应用程序时,出现如下错误:导入的javax.persistence无法解析,实体无法解析为某种类型。 toplink-essentials.jar已经包含在我的项目路径中。我还需要什么设置来解决这个问题?

I'm trying to build database application using GWT 1.5.3. I use JPA annotations with my objects. It seems in hosted mode GWT's RPC works fine. But when I try to compile my app using GWT-compiler I get errors like: "The import javax.persistence cannot be resolved", "Entity cannot be resolved to a type". toplink-essentials.jar is already included in my project path. What settings else do I need to solve this problem?

推荐答案

好的,我发现我错过了。我需要将mypa-annotations-source.jar包含在我的GWT编译器路径中的myapp-compile.cmd脚本中(或者在ant构建文件中)。顺便说一下,任何人都可以告诉我这个jpa-annotations-source.jar文件的来源吗?

Ok, I've found what I was missing. I needed to include jpa-annotations-source.jar in my GWT-compiler path in myapp-compile.cmd script (or in ant build file). By the way can anyone tell me the origin of this jpa-annotations-source.jar file?

这篇关于GWT与JPA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆