我遇到了一个性能问题,即当访问特定页面并且页面加载失败时,应用程序无法执行数据库查询。错误的堆栈跟踪如下:
Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.lang.ClassNotFoundException: org.postgresql.util.PSQLException (no security manager: RMI class loader disabled)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:246)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy27.getCallSynthData(Unknown Source)
at com.avaya.ces.gui.rmi.CallSynthDataServiceRmiClient.getCallSynthData(CallSynthDataServiceRmiClient.java:107)
... 98 more
Caused by: java.lang.ClassNotFoundException: org.postgresql.util.PSQLException (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:393)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:185)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:214)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:500)
at java.lang.Throwable.readObject(Throwable.java:914)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:244)
... 103 more
当数据库大小快速增长(每天大约3GB)时会出现此问题。任何关于如何防止或解决这个问题的建议都会非常感激。
此服务器运行的硬件规格: CPU:双核 - 2.3GHz,内存:4GB,磁盘:242G,操作系统:RHEL 6.4 64位
Postgres pgdata size:21839 MB
答案 0 :(得分:1)
实际的异常是ClassNotFoundException: org.postgresql.util.PSQLException
,这是因为没有在客户端部署PSQL JAR文件。