dev@grizzly.java.net

ssl problem with 1.9.0

From: <rama.rama_at_tiscali.it>
Date: Wed, 10 Dec 2008 11:47:00 +0100 (CET)

dear friend,
i am using a snippet taken from grizzlydocs (that btw,
have some errors with case of some variable and class)

this is the
example
271 *
272 * GrizzlyWebServer ws = new GrizzlyWebServer
(443,path,5,true);
273 * SSlConfig sslConfig = new SSLConfig();

274 * sslConfig.setTrustStoreFile("Path-to-trustore");
275
* sslConfig.setKeyStoreFile("Path-to-Trustore");
276 * ws.
setSSLConfig(sslConfig);


after changing the order of parameter (path
swap with 5)
and SSl --> SSL

and setup changed the various path-to-
something stuff,
i start it and i get this nasty error messages when
trying to connect to host

10-dic-2008 11.41.48 com.sun.grizzly.
DefaultProtocolChain executeProtocolFilter
GRAVE: ProtocolChain
exception
java.lang.NullPointerException
        at com.sun.grizzly.ssl.
SSLDefaultProtocolFilter.configureProcessorTask
(SSLDefaultProtocolFilter.java:81)
        at com.sun.grizzly.http.
DefaultProtocolFilter.execute(DefaultProtocolFilter.java:149)
        at com.
sun.grizzly.DefaultProtocolChain.executeProtocolFilter
(DefaultProtocolChain.java:136)
        at com.sun.grizzly.
DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
        at com.sun.
grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
        at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:
76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall
(ProtocolChainContextTask.java:67)
        at com.sun.grizzly.
SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
        at java.
util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.
util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.
concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:
885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)



So basycally to reproduce it
GrizzlyWebServer ws = new
GrizzlyWebServer(443,5,"c:\\",true);
 SSLConfig sslConfig = new
SSLConfig();
 sslConfig.setKeyStoreFile(keyStoreFile);
 sslConfig.
setKeyStorePass(keyStorePwd);
//Util.warn
(""+keyStorePwd); (just to check that pwd and filename
was correctly loaded)
ws.setSSLConfig(sslConfig);
ws.start();

tnx for
helping!

Rama


Con Tiscali Voce 8 Mega telefoni e navighi senza limiti a soli €15 AL MESE PER 1 ANNO. In seguito paghi €29,90 al mese. L'offerta è valida fino al giorno 11/12/08! http://abbonati.tiscali.it/promo/voce8mega/