PostgreSQL 9.0 JDBC 驱动程序可以在 64 位 java 上正常工作吗?

发布于 2024-10-17 06:56:02 字数 3525 浏览 2 评论 0原文

我一直在努力让 James Mail Server 在 64 位 Slackware 13.1 上与 PostgreSQL 配合使用。 64 位 linux 和 64 位 java 下的驱动程序是否存在任何已知问题?

我的同一台服务器在 32 位 Slackware 上再次运行 PostgreSQL 9.0,运行良好。

有人知道可能是什么问题吗?

编辑:有关此问题的更多详细信息... 当我通过 ./bin/phoenix stop 停止 james 邮件服务器时,我在日志中看到以下内容:

James Mail Server 2.3.2
Remote Manager Service started plain:4555
POP3 Service started plain:110
SMTP Service started plain:25
NNTP Service started plain:119
FetchMail Disabled
JVM exiting abnormally. Shutting down Phoenix.
 org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "thread-manager" failed to pass through the Destruction stage. (Reason: java.lang.IllegalThreadStateException).
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:288)
at org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:482)
at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at org.apache.avalon.phoenix.components.application.DefaultApplication.stop(DefaultApplication.java:233)
at org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:292)
at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:66)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.shutdown(DefaultKernel.java:346)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.removeApplication(DefaultKernel.java:455)
at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.undeploy(DefaultDeployer.java:244)
at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dispose(DefaultDeployer.java:154)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.shutdownComponents(DefaultEmbeddor.java:598)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dispose(DefaultEmbeddor.java:342)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
at org.apache.avalon.phoenix.frontends.CLIMain.shutdown(CLIMain.java:326)
at org.apache.avalon.phoenix.frontends.CLIMain.forceShutdown(CLIMain.java:295)
at org.apache.avalon.phoenix.frontends.ShutdownHook.run(CLIMain.java:386)
Caused by: java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.destroy(ThreadGroup.java:754)
at org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.dispose(DefaultThreadPool.java:76)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.cornerstone.blocks.threads.AbstractThreadManager.dispose(AbstractThreadManager.java:69)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:274)
... 19 more
STOPPED Sun Feb 13 00:01:37 EET 2011

当我启动服务器时,一切都开始良好,日志显示 james 已添加文件和数据库存储库,但它不会在数据库中创建表。如果它创建表,则不会在其中插入任何内容。我确信我设置的用户/通行证是正确的,并且用户可以写入数据库(手动测试)。 我使用的是 9.0-801 JDBC 4 和 jdk1.6.0_23x64。

希望这有助于解决问题。

I've been struggling with getting James Mail Server to work with PostgreSQL on a 64bit Slackware 13.1.
Are there any known problems with the driver under 64 bit linux and 64bit java ?

I have the same server running fine on a 32bit Slackware again with PostgreSQL 9.0.

Does anybody know what may be the problem?

Edit: Some more details around this problem...
When I stop james mail server via ./bin/phoenix stop I get this in the logs:

James Mail Server 2.3.2
Remote Manager Service started plain:4555
POP3 Service started plain:110
SMTP Service started plain:25
NNTP Service started plain:119
FetchMail Disabled
JVM exiting abnormally. Shutting down Phoenix.
 org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "thread-manager" failed to pass through the Destruction stage. (Reason: java.lang.IllegalThreadStateException).
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:288)
at org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:482)
at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at org.apache.avalon.phoenix.components.application.DefaultApplication.stop(DefaultApplication.java:233)
at org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:292)
at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:66)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.shutdown(DefaultKernel.java:346)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.removeApplication(DefaultKernel.java:455)
at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.undeploy(DefaultDeployer.java:244)
at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dispose(DefaultDeployer.java:154)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.shutdownComponents(DefaultEmbeddor.java:598)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dispose(DefaultEmbeddor.java:342)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
at org.apache.avalon.phoenix.frontends.CLIMain.shutdown(CLIMain.java:326)
at org.apache.avalon.phoenix.frontends.CLIMain.forceShutdown(CLIMain.java:295)
at org.apache.avalon.phoenix.frontends.ShutdownHook.run(CLIMain.java:386)
Caused by: java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.destroy(ThreadGroup.java:754)
at org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.dispose(DefaultThreadPool.java:76)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.cornerstone.blocks.threads.AbstractThreadManager.dispose(AbstractThreadManager.java:69)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:274)
... 19 more
STOPPED Sun Feb 13 00:01:37 EET 2011

When I start the server everything starts great, the logs say james has added file and db repositories but it doesn't create the tables in the database. If it creates the tables it doesn't insert anything inside. I'm sure the user/pass I've set are right and the user can write to the database (tested manually).
I'm using 9.0-801 JDBC 4 and jdk1.6.0_23x64.

Hope this helps for solving the problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丶视觉 2024-10-24 06:56:02

PostgreSQL JDBC 驱动程序是用纯 Java 编写的,因此它甚至不知道 32 位和 64 位平台之间的差异。这不太可能是问题所在;该驱动程序在 64 位主机上使用非常广泛。

The PostgreSQL JDBC driver is written in pure Java, so it wouldn't even know the difference between a 32-bit and a 64-bit platform. It's unlikely that that's the problem; the driver is very widely used on 64-bit hosts.

又怨 2024-10-24 06:56:02

彼得回答了主题问题。

关于你的堆栈跟踪:
根本原因是java.lang.IllegalThreadStateException异常,只有在以下情况下才会抛出:

if (destroyed || (nthreads > 0)) {
    throw new IllegalThreadStateException();
}

这意味着你已经销毁了它或者没有真正停止。

我看到 Excalibur 中的池被处理了两次。这意味着您每次停车后都会收到这样的消息。

Peter answered on topic question.

About your stacktrace:
The root cause is java.lang.IllegalThreadStateException exception, which thrown only in following cases:

if (destroyed || (nthreads > 0)) {
    throw new IllegalThreadStateException();
}

it means you already destroyed it or not really stopped.

I see pool is disposed twice in excalibur. It means you will have such message after stop always.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文