解决glassfish 3 + eclipselink 2 下 is not a known entity type 错误
时间:2010-10-16 来源:guojianlv
运行时一直报 is not a known entity type 错误,代码基本都是用netbeans自动生成的,
怎么就出问题了????后来又写了一个一般的java控制台程序,同样的代码却能正常运行
对比一下感觉应该是跟web容器glassfish有关
于是开始了漫长的Google之路,终于被我找到了:
http://forum.springsource.org/showthread.php?t=48514
The solution for Tomcat 5.5.x includes moving both the toplink-essentials.jar and persistence.jar to the ${TOMCAT.HOME}/common/lib (${TOMCAT.HOME}/lib for newer versions) directory. Everything worked perfect after that.
既然Tomcat可以这样解决,glassfish应该也差不多
把eclipselink-2.0.2.jar 和 eclipselink-javax.persistence-2.0.jar
拷到\Program Files\glassfish-3.0.1\glassfish\lib目录下,
运行.......不出所料,问题解决了,呵呵
相关阅读 更多 +