How can I using Java Socket in Sybase ASE
I am a engineer for develop network with real-time service, wich can sending message to another remote applications.
First, I know Sybase have TIBCO-EMS System to achieving my requirement but TIBCO was not free software, thus I want it to do myself.
Ok, In my requirement, I find the Java Service in Sybase ASE and I followings with user guide:
- enable pci 1
- enable java 1
- install java class that include socket client.
- I use setp 3 of java socket connect to remote server(java Server Socket) and sending message.
My question is: Seem’s Sybase ASE can’t using socket directly ?
While I used socket, Sybase throws the exception:
There was an error reading the results of the SQL statement.
The displayed results may be incorrect or incomplete.
Unhandled Java Exception:
java.lang.ExceptionInInitializerError
at
java.net.Socket.setImpl(Socket.java:493)
at java.net.Socket.<init>
(Socket.java:414)
at java.net.Socket.<init>(Socket.java:208)
at org.
gms.client.ClientTest.send(ClientTest.java:13)
Caused by: java.lang.
SecurityException: Properties can not be inspected
at sybase.aseutils.
PCAJvmSecurityManager.checkPropertiesAccess(PCAJvmSecurityManager.java:
173)
at java.lang.System.getProperties(System.java:622)
at.
Sybase error code=10707
There was an error reading the results of the SQL statement.
The displayed results may be incorrect or incomplete.
Unhandled Java Exception:
java.lang.ExceptionInInitializerError
at
java.net.Socket.setImpl(Socket.java:493)
at java.net.Socket.<init>
(Socket.java:85)
Caused by: java.lang.SecurityException: Properties can
not be inspected
at sybase.aseutils.PCAJvmSecurityManager.
checkPropertiesAccess(PCAJvmSecurityManager.java:173)
at java.lang.
System.getProperties(System.java:622)
at java.net.PlainSocketImpl$1.
run(PlainSocketImpl.java:62)
at java.security.AccessController.
doPrivile.
Sybase error code=10707
Can anyone help me? Thank so much~!
Next time, you might want to post this as a discussion rather than a document - makes it easier for people to reply to you. However, if you check the back of the docs on Java in ASE, in order to use networking in Java on ASE you have to do some PCI configs. Specifically, you will need to enable 'pca_jvm_netio'