[JDEV] peculiar Connection problem !

Dov B Katz Dov.Katz at morganstanley.com
Fri Jul 11 05:00:07 CDT 2003


Mike/Satish

While the applet problem of security is indeed tied to which server is
used, the fundamental problem Satish is describing is due to having a
version of JVM which is too low to run with his particular applet....

The setKeepAlive method of java.net.Socket is only available in JRE 1.3 and
higher... See the javadoc for Socket there... I'm sure he's using the
standard browser install of either Sun JRE 1.1.8, or Microsoft JVM which is
also <1.2 compatible.

What you need to do is either:

compile your applet with the target compatibility version set to 1.1.8, and
see where the errors are and fix them, 

or upgrade your browser's java plugin to use Sun's JRE 1.3 or higher. (This
may be nothing more than changing some settings, if you have JVM installed
already on the target machine)

Then it is very possible that a security exception like the one described
by Mike might occur. But currently, that code is never reached because the
socket can't even be created to connect to anywhere.

-Dov

"Mike Prince" <mike at mikeprince.com> wrote:
>
>Solve the root problem; Applets can make connections back to the server
>where they came from.	Just make sure that Jabber is on the same
>machine, or your load balancer/firewall makes it look like both are on
>the same machine.
>
>I know this works because I use Jabber applet clients on my website :)
>
>Hope that helps,
>
>Mike
>
>> -----Original Message-----
>> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On 
>> Behalf Of Satish Plakote
>> Sent: Thursday, July 10, 2003 3:42 AM
>> To: jdev at jabber.org
>> Subject: [JDEV] peculiar Connection problem !
>> 
>> 
>> 
>> 
>> hi
>> I have hit upon a problem while making a connection to a 
>> jabber server.. I am trying to  establish a connection to a 
>> jabber server thro a servlet on my tomcat engine.I am doing 
>> this coz of restriction placed by jvm on applets to make a 
>> connection. I get this exception thrown when i try to make a 
>> connection.
>> 
>> java.lang.NoSuchMethodError: java.net.Socket: method 
>> setKeepAlive(Z)V not found
>>	   at 
>> com.echomine.net.SocketConnector$_1.run(SocketConnector.java:280)
>>	   at java.lang.Thread.run(Thread.java:479)
>> 
>> can anyone give me tips to handle this ?
>> Thnkx
>> Satish
>> 
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> http://mailman.jabber.org/listinfo/jdev
>> 
>
>
>_______________________________________________
>jdev mailing list
>jdev at jabber.org
>http://mailman.jabber.org/listinfo/jdev
>
>



--
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited.




More information about the JDev mailing list