Found the following:

1) ValidatorException: No trusted certificate found
You need to setup configure a few things for this for httpunit to work.  See
the jwebunit main site.  I think there is a link on how to setup this.

Unfortunately, I don't know much about the SSL implementation for httpunit.
This is a prerequisite for you to connect to any SSL sites with jWebUnit.  I
tried using this about 1 1/2 years ago with jwebunit/httpunit and found a
bit cumbersome to get work.  Right now, I only work on internal applications
that don't require SSL.

Good Luck, if you resolve your issue, please post to the list for archival
purposes for future users.

Nick Neuberger


> -----Original Message-----
> From: Alistair Young [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 09, 2005 8:49 AM
> To: Nick Neuberger
> Cc: jwebunit-users@lists.sourceforge.net
> Subject: Re: [Jwebunit-users] getDialog
> 
> 
> stack trace:
> 
> java.lang.RuntimeException: java.io.IOException
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
> pURLConnec 
> tion.java:602)
>       at  
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
>       at  
> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection
> OldImpl.ge 
> tResponseCode(DashoA12275)
>       at  
> com.meterware.httpunit.HttpWebResponse.readResponseHeader(Http
> WebRespons 
> e.java:147)
>       at  
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResp
> onse.java: 
> 185)
>       at  
> com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:53)
>       at  
> com.meterware.httpunit.WebConversation.newResponse(WebConversa
> tion.java: 
> 61)
>       at 
> com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
>       at  
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 
> 125)
>       at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
>       at 
> com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:141)
>       at  
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 
> 127)
>       at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
>       at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:99)
>       at 
> com.meterware.httpunit.WebClient.getResponse(WebClient.java:86)
>       at  
> net.sourceforge.jwebunit.HttpUnitDialog.gotoPage(HttpUnitDialog.java: 
> 977)
>       at 
> net.sourceforge.jwebunit.WebTester.gotoPage(WebTester.java:973)
>       at 
> net.sourceforge.jwebunit.WebTestCase.gotoPage(WebTestCase.java:400)
>       at  
> org.Guanxi.ShibbolethAccessTest.testAccess(ShibbolethAccessTest.java: 
> 28)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.jav 
> a:39)
>       at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessor 
> Impl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:324)
>       at junit.framework.TestCase.runTest(TestCase.java:154)
>       at junit.framework.TestCase.runBare(TestCase.java:127)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at junit.textui.TestRunner.doRun(TestRunner.java:116)
>       at  
> com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUni
> tAgent.jav 
> a:57)
>       at junit.textui.TestRunner.start(TestRunner.java:172)
>       at  
> com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWit
> hArgs(Text 
> TestRunner2.java:23)
>       at  
> com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAn
> dStart(JUn 
> itStarter.java:97)
>       at  
> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java: 
> 31)
> Caused by: javax.net.ssl.SSLHandshakeException:  
> sun.security.validator.ValidatorException: No trusted 
> certificate found
>       at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
>       at  
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
>       at 
> sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
>       at  
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.
> connect(Da 
> shoA12275)
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
> pURLConnec 
> tion.java:626)
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(
> HttpURLCon 
> nection.java:1504)
>       at  
> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection
> OldImpl.ge 
> tHeaderFieldKey(DashoA12275)
>       at  
> com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResp
> onse.java: 
> 201)
>       at  
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResp
> onse.java: 
> 183)
>       ... 32 more
> Caused by: sun.security.validator.ValidatorException: No trusted  
> certificate found
>       at  
> sun.security.validator.SimpleValidator.buildTrustedChain(Simpl
> eValidator 
> .java:304)
>       at  
> sun.security.validator.SimpleValidator.engineValidate(SimpleVa
> lidator.ja 
> va:107)
>       at sun.security.validator.Validator.validate(Validator.java:202)
>       at  
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerT
> rusted(Das 
> hoA12275)
>       at  
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerT
> rusted(Das 
> hoA12275)
>       ... 45 more
> java.lang.RuntimeException: java.io.IOException
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
> pURLConnec 
> tion.java:602)
>       at  
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
>       at  
> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection
> OldImpl.ge 
> tResponseCode(DashoA12275)
>       at  
> com.meterware.httpunit.HttpWebResponse.readResponseHeader(Http
> WebRespons 
> e.java:147)
>       at  
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResp
> onse.java: 
> 185)
>       at  
> com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:53)
>       at  
> com.meterware.httpunit.WebConversation.newResponse(WebConversa
> tion.java: 
> 61)
>       at 
> com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
>       at  
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 
> 125)
>       at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
>       at 
> com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:141)
>       at  
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 
> 127)
>       at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
>       at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:99)
>       at 
> com.meterware.httpunit.WebClient.getResponse(WebClient.java:86)
>       at  
> net.sourceforge.jwebunit.HttpUnitDialog.gotoPage(HttpUnitDialog.java: 
> 977)
>       at 
> net.sourceforge.jwebunit.WebTester.gotoPage(WebTester.java:973)
>       at 
> net.sourceforge.jwebunit.WebTestCase.gotoPage(WebTestCase.java:400)
>       at  
> org.Guanxi.ShibbolethAccessTest.testAccess(ShibbolethAccessTest.java: 
> 28)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.jav 
> a:39)
>       at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessor 
> Impl.java:25)
>       at  
> com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUni
> tAgent.jav 
> a:57)
>       at  
> com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWit
> hArgs(Text 
> TestRunner2.java:23)
>       at  
> com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAn
> dStart(JUn 
> itStarter.java:97)
>       at  
> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java: 
> 31)
> Caused by: javax.net.ssl.SSLHandshakeException:  
> sun.security.validator.ValidatorException: No trusted 
> certificate found
>       at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
>       at  
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
>       at 
> sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
>       at  
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.
> connect(Da 
> shoA12275)
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
> pURLConnec 
> tion.java:626)
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(
> HttpURLCon 
> nection.java:1504)
>       at  
> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection
> OldImpl.ge 
> tHeaderFieldKey(DashoA12275)
>       at  
> com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResp
> onse.java: 
> 201)
>       at  
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResp
> onse.java: 
> 183)
>       ... 32 more
> Caused by: sun.security.validator.ValidatorException: No trusted  
> certificate found
>       at  
> sun.security.validator.SimpleValidator.buildTrustedChain(Simpl
> eValidator 
> .java:304)
>       at  
> sun.security.validator.SimpleValidator.engineValidate(SimpleVa
> lidator.ja 
> va:107)
>       at sun.security.validator.Validator.validate(Validator.java:202)
>       at  
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerT
> rusted(Das 
> hoA12275)
>       at  
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerT
> rusted(Das 
> hoA12275)
>       ... 45 more
> 
>       at  
> net.sourceforge.jwebunit.HttpUnitDialog.gotoPage(HttpUnitDialog.java: 
> 979)
>       at 
> net.sourceforge.jwebunit.WebTester.gotoPage(WebTester.java:973)
>       at 
> net.sourceforge.jwebunit.WebTestCase.gotoPage(WebTestCase.java:400)
>       at  
> org.Guanxi.ShibbolethAccessTest.testAccess(ShibbolethAccessTest.java: 
> 28)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.jav 
> a:39)
>       at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessor 
> Impl.java:25)
>       at  
> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java: 
> 31)
> 
> 
> On 9 Mar 2005, at 14:39, Nick Neuberger wrote:
> 
> > I'm not sure.  Maybe someone else in the mailing list has 
> done the same
> > thing.
> >
> > I'm not familair with using the https portion of httpunit 
> or using the
> > "shibboleth SP/IdP"
> > that you mentioned.  On the httpunit side, I know you have to  
> > integrate some
> > SSL portion.
> >
> > Can you send the complete stacktrace?  I'm not sure which jwebunit  
> > method is
> > being called.
> >
> > See Ya,
> >
> > Nick
> >
> >
> >> -----Original Message-----
> >> From: Alistair Young [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, March 09, 2005 4:34 AM
> >> To: Nick Neuberger
> >> Cc: jwebunit-users@lists.sourceforge.net
> >> Subject: Re: [Jwebunit-users] getDialog
> >>
> >>
> >> I now use:
> >>
> >> beginAt("/");
> >> 
> getDialog().getWebClient().getClientProperties().setAutoRedire
> ct(true) 
> >> ;
> >> gotoPage("/secure/secure.php");
> >> assertTitleEquals("Authenticator");
> >>
> >> however, gotoPage results in a redirect from http -> https on a
> >> different server/domain and produces the error:
> >>
> >> java.lang.RuntimeException: java.io.IOException
> >>    at
> >> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
> >> pURLConnec
> >> tion.java:602)
> >>    at
> >> 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
> >>    at
> >> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection
> >> OldImpl.ge
> >> tResponseCode(DashoA12275)
> >>
> >> what I'm doing is writing some tests for a shibboleth SP/IdP
> >> interaction, where /secure/secure.php is protected .htaccess
> >> style by
> >> shibboleth, so you get redirected to your IdP for authentication.
> >>
> >> is what I'm trying to do possible with jwebunit?
> >>
> >> thanks,
> >> Alistair
> >>
> >>
> >> On 8 Mar 2005, at 19:49, Nick Neuberger wrote:
> >>
> >>> The beginAt method needs to be called first.  This will
> >> initialize the
> >>> dialog.
> >>>
> >>> I would recommend moving that line into your "test" methods
> >> after the
> >>> beginAt() method is called.
> >>>
> >>> Actually, in our superclass we implemented an
> >>> "authenticateApplication()"
> >>> method called at the setUp() method.
> >>>
> >>> //////////////////////////////////
> >>>   public void setUp() throws Exception {
> >>>           super.setUp();
> >>>           getTestContext().setBaseUrl("http://localhost:8080";);
> >>>
> >>>           authenticateApplication();
> >>>   }
> >>>
> >>>   public void authenticateApplication() {
> >>>   
> >>> beginAt("/ims/servlet/Login?
> >>> COLLABORATION=login&OPERATION=display&TARGET=hom
> >>> e");
> >>>
> >>>           //your line of code after the beginAt.
> >>>   
> >>>
> >> getDialog().getWebClient().getClientProperties().setAutoRedire
> >> ct(true);
> >>>
> >>>           assertTitleEquals("IMS Login");
> >>>
> >>>           setFormElement("userId", getUserId());
> >>>           setFormElement("password", getUserPass());
> >>>
> >>>           //submit("login-button");
> >>>           submit();
> >>>
> >>>           assertTitleEquals("Ims Home");
> >>>
> >>>   }
> >>>
> >>> //////////////////////////////////////
> >>>
> >>> Hope this Helps, HTH.
> >>>
> >>> Nick
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Alistair Young [mailto:[EMAIL PROTECTED]
> >>>> Sent: Tuesday, March 08, 2005 10:43 AM
> >>>> To: jwebunit-users@lists.sourceforge.net
> >>>> Subject: [Jwebunit-users] getDialog
> >>>>
> >>>>
> >>>> Hello folks,
> >>>> I'm trying to follow redirects by using:
> >>>>
> >>>> public class Test extends WebTestCase {
> >>>>    public void setUp() throws Exception {
> >>>>      super.setUp();
> >>>>      getTestContext().setBaseUrl("http:/somesite.org");
> >>>>
> >>>> getDialog().getWebClient().getClientProperties().setAutoRedire
> >>>> ct(true);
> >>>>    }
> >>>> }
> >>>>
> >>>> but getDialog always returns null
> >>>>
> >>>> is there something I'm missing?
> >>>>
> >>>> thanks,
> >>>> Alistair
> >>>>
> >>>>
> >>>>
> >>>> -------------------------------------------------------
> >>>> SF email is sponsored by - The IT Product Guide
> >>>> Read honest & candid reviews on hundreds of IT Products from
> >>>> real users.
> >>>> Discover which products truly live up to the hype. Start
> >> reading now.
> >>>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> >>>> _______________________________________________
> >>>> Jwebunit-users mailing list
> >>>> Jwebunit-users@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
> >>>>
> >>>
> >>>
> >>> - - - - - -
> >>> This e-mail message is intended only for the use of the
> >> individual or
> >>> entity
> >>> identified in the alias address of this message and may contain
> >>> confidential
> >>> and privileged information. Any unauthorized review, use,
> >> disclosure or
> >>> distribution of this e-mail message is strictly prohibited.
> >> If you have
> >>> received this e-mail message in error, please notify the sender
> >>> immediately
> >>> by reply e-mail and delete this message from your system. 
> Thank you.
> >>>
> >>>
> >>> -------------------------------------------------------
> >>> SF email is sponsored by - The IT Product Guide
> >>> Read honest & candid reviews on hundreds of IT Products from real
> >>> users.
> >>> Discover which products truly live up to the hype. Start
> >> reading now.
> >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> >>> _______________________________________________
> >>> Jwebunit-users mailing list
> >>> Jwebunit-users@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
> >>>
> >>
> >
> >
> > - - - - - -
> > This e-mail message is intended only for the use of the 
> individual or  
> > entity
> > identified in the alias address of this message and may contain  
> > confidential
> > and privileged information. Any unauthorized review, use, 
> disclosure or
> > distribution of this e-mail message is strictly prohibited. 
> If you have
> > received this e-mail message in error, please notify the sender  
> > immediately
> > by reply e-mail and delete this message from your system. Thank you.
> 


- - - - - - 
This e-mail message is intended only for the use of the individual or entity
identified in the alias address of this message and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution of this e-mail message is strictly prohibited. If you have
received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message from your system. Thank you.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jwebunit-users mailing list
Jwebunit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to