English 中文(简体)
Is PostgreSQL 9.0 JDBC driver working well with 64 bit java?
原标题:

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.

最佳回答

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.

问题回答

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.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签