JavanetConnectException Connection refused | Rest Assured Forum
S
Swapnil Salunke Posted on 18/11/2018
Hi,
While running test case, I am getting "java.net.ConnectException: Connection refused" error even after providing my valid userid and password.

S
Swapnil Salunke Replied on 18/11/2018

This is for Module 19, retail application project


A
Abhinav Replied on 19/11/2018

Hi Swapnil,

You are getting this error because retail application is not started yet. Please check again xamp and tomcat. also use the same version of xamp and tomcat that is used in video. You can find that in the download code.


S
Swapnil Salunke Replied on 20/11/2018

Hi Abhinav, Thank you for your reply. And yes, you are right, i was running test case without starting the retail application. Now after staring the application I am getting response like this...
<html>
<head>
<title>Apache Tomcat/6.0.37 - Error report</title>
<style>&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;</style>
</head>
<body>
<h1>HTTP Status 404 - /Retail_App_Rest/retail/admin/login</h1>
<hr noshade="noshade" size="1"/>
<p>
<b>type</b>
Status report </p>
<p>
<b>message</b>
<u>/Retail_App_Rest/retail/admin/login</u>
</p>
<p>
<b>description</b>
<u>The requested resource is not available.</u>
</p>
<hr noshade="noshade" size="1"/>
<h3>Apache Tomcat/6.0.37</h3>
</body>
</html>
PASSED: testCase1

It says, The requested resource is not available. I am using the same version of xamp and tomcat that is used in video and have correctly copied the Retail_App_Rest folder in the webapps folder of Tomcat 6.0.
Will you please look into the issue?   


A
Abhinav Replied on 20/11/2018

Sawpnil please share the screenshot of the eclipse (Console), in that way i can help you better.


S
Swapnil Salunke Replied on 20/11/2018

PFA screenshot

Responsive image

S
Swapnil Salunke Replied on 20/11/2018

Screenshot (Consol)

Responsive image

A
Abhinav Replied on 20/11/2018

You code looks fine to me, lets have a skype session, for debugging the issue.


A
Abhinav Replied on 20/11/2018

Or send me the zip file of you project, I will look into it.


S
Swapnil Salunke Replied on 30/11/2018

Hi Abhinav,
Kindly let me know when we can have a skype session. 


S
Swapnil Salunke Replied on 30/11/2018

I have pasted Retail_App folder in webapps folder of Tomcat. I think the Retail_App folder doesn't have correct code to run the app. Will you please check it?


A
Abhinav Replied on 30/11/2018

Hi Swapnil, i checked the file you have shared. Please try the file that i am sharing now in the attachment. Put it inside the tomcat directory and then try again.


S
Swapnil Salunke Replied on 01/12/2018

Hi,
I have tried the file that you have shared. PFA screenshot for ref.
I am still not able to run the application locally.
Request you to please look into the issue.
If possible kindly let me know when we can have a skype session.

Responsive image

A
Abhinav Replied on 06/12/2018

Lets have a Skype Session Today. To resolve the query. Please add me on Skype live:abhinav_385.


E
Enem Ndubuisi Replied on 03/05/2019

Hi Sir , 

I am having similar issues , this correction should have been shared on the forum so students with similar issues would have cue in and solve it without a burden on the instructor always, i followed this thread to an inconclusive end because the solution was not made public. 

Please how can i solve this issue? 

Thanks in advance.


A
Ashish Thakur Replied on 17/05/2019

Hi Enem,

This issue arise when the app is not installed properly.

Please try again and follow all the instructions. Contact again if the issue persists.