New deployment gives nested exception is java.lang.NoClassDefFoundError: org/postgresql/core/types/PGLong

New deployment gives nested exception is java.lang.NoClassDefFoundError: org/postgresql/core/types/PGLong

每次我在 apache tomcat 服务器上部署我的应用程序时,它都会提供

java.lang.NoClassDefFoundError: org/postgresql/core/types/PGLong

我通过重新启动服务器和 Postgres 解决了这个问题,但这不是正确的解决方案

检查你的 postgresql 版本,确保它是 9.1-901.jdbc4 如果你使用 maven,请更改你 pom.xml 中的版本,否则检查你的服务器的位以及安装的 postgresql 版本

我在 apache tomcat 服务器

上部署新的 war 时遇到了同样类型的错误

java.lang.NoClassDefFoundError: org/postgresql/core/types/PGLong

为了解决它,我重新启动了 postgresql,然后错误解决并正确地投影 运行。