开发者

Glassfish + PostgreSQL, ClassNotFoundException, mysterious solutions

I have a very annoying problem with Glassfish and PostgreSQL. I have an EAR which contains a WAR and several other EJBs. I am using PostgreSQL. The annoying thing is that sometimes (this sometimes is the most d开发者_如何学Goisturbing thing because I have no clue what could go wrong) I get a ClassNotFoundException: java.lang.ClassNotFoundException: org.postgresql.core.Parser

Sometimes (!!!), the problem is solved if I clean and build the whole EAR, sometimes I have to restart the Glassfish, too.

I sometimes get NoClassDefFoundError, too.

Could anybody tell me how to include, package or do anything with the JAR which contains the missing class?

Thank you, Norbert


Where do you put the jar: directly inside the EAR? Or in the WAR inside the EAR? For JDBC drivers, I think the recommendation is to always put them in the container's shared area and never in an application. (When I used JBoss a couple of years ago, we always put JDBC drivers into server/lib and had trouble if they were included in EARs as well, especially if the versions got out of sync)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜