Big thanks for your help. I change -ds.xml and use instead of "java:PostgresDS",
"PostgresDS". In connection stage i don't have visible problems,
but on
| ResultSet rs = st.executeQuery("SELECT * FROM TestTable");
|
i see
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy2.execute(Unknown Source)
at org.ConnectFromJndi.main(ConnectFromJndi.java:36)
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(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
at
org.jboss.resource.adapter.jdbc.remote.StatementInterceptor.invoke(StatementInterceptor.java:58)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
... 2 more
Caused by: java.lang.ClassNotFoundException: org.postgresql.util.PSQLException (no
security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
... 11 more
Maybe its my errors. After your message I am declined to not use jndi and will be limited
simple JDBC to connection. It is a lot of complexities and not enough practical advantage
in my case.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038550#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...