开发者

manually deployed war ignores jpa annotation mapping, but it works in eclipse

I have generated a spring web project with spring roo. Whe开发者_开发百科n I run the project inside eclipse via wtp on a jetty 7.2 it works fine. but when I package it to a war file, copy it manually into jetty's webapps folder and start jetty, the jpa annotated classes are not binded to tables and I get the error when I request something: "org.hibernate.hql.ast.QuerySyntaxException: .... is not mapped [SELECT o FROM .... o]; nested exception is java.lang.IllegalArgumentException: "

When I diffed the log between eclipse wtp log and the manual run on jetty, they look very similar besides

"org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: ......" which is only inside the eclipse wtp log

I guess something is omitted during the packaging...

does anyone have a clue what I'm missing?

Thanks in advance Max


I put the entities that needed to be mapped in the database now explictly in the persistence.xml

now the deployed war file works

still no clue why it works when started with jetty:run or inside eclipse wtp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜