# Error: java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won't be generated

**URL:** <https://community.gatling.io/t/error-java-lang-unsupportedoperationexception-there-were-no-requests-sent-during-the-simulation-reports-wont-be-generated/1969>\
**Category:** Gatling (Open-Source)\
**Created:** [February 4, 2015, 11:17pm UTC](https://community.gatling.io/t/error-java-lang-unsupportedoperationexception-there-were-no-requests-sent-during-the-simulation-reports-wont-be-generated/1969 "2015-02-04T23:17:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoj\_Chauhan](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Manoj\_Chauhan](https://community.gatling.io/u/Manoj_Chauhan)\
**Post date:** [February 4, 2015, 11:17pm UTC](https://community.gatling.io/t/error-java-lang-unsupportedoperationexception-there-were-no-requests-sent-during-the-simulation-reports-wont-be-generated/1969/1 "2015-02-04T23:17:46Z")

</div>

Trying to loop though a scenario until a specific response is returned by server, but seems no requests are being hit from gatling. `Gatling version used is 2.0.0-RC5

Below is code snippet.

val scn\_queueDepthCheck = scenario(“testing”).repeat(5) {  
//asLongAs(session =\> continue.get){

//doIf(session =\> continue.get){  
exec(http(“activeMQQueueDepth”)  
.get(activeMqUri + “/admin/xml/topics.jsp”)  
.check(xpath("//topic[@name=‘abc’]/stats/@dequeueCount").find.saveAs(“dequeueCount”))  
.check(xpath("//topic[@name=‘abc’]/stats/@enqueueCount").find.saveAs(“enqueueCount”))

)  
.exec((session: io.gatling.core.session.Session) =\> {  
print(“enqueue count: " + session(“enqueueCount”).as[String])  
print(” dequeueCount : " + session(“dequeueCount”).as[String])  
if (session(“enqueueCount”).as[String] != session(“dequeueCount”).as[String])  
continue.set(false)  
session  
})

}

Any help or guidance is much appreciated.

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [February 5, 2015, 7:21am UTC](https://community.gatling.io/t/error-java-lang-unsupportedoperationexception-there-were-no-requests-sent-during-the-simulation-reports-wont-be-generated/1969/2 "2015-02-05T07:21:22Z")

</div>

Some lines are commented. Is this intended? Is this the set up you actually tested?  
I don’t any problem here, you’d have to provide a full Simulation.  
I also advise that you upgrade to a stable version.

---

<div class="post-metadata">

**Author:** ![Manoj\_Chauhan](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Manoj\_Chauhan](https://community.gatling.io/u/Manoj_Chauhan)\
**Post date:** [February 5, 2015, 2:46pm UTC](https://community.gatling.io/t/error-java-lang-unsupportedoperationexception-there-were-no-requests-sent-during-the-simulation-reports-wont-be-generated/1969/3 "2015-02-05T14:46:16Z")

</div>

Thanks for the quick feedback.  
I was trying different loops do see to troubleshoot. So comments can be ignored. I did provide the full simulation by including below lines after setting the scenario as mentioned previously:

**setUp(**  
**scn\_queueDepthCheck.inject(atOnceUsers(1)).protocols(httpConf)**  
**)**

The code works fine if I take out the loop statements from the scenario. Else it goes into infinity. Any suggestions on what I might be missing or doing wrong?

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [February 5, 2015, 6:13pm UTC](https://community.gatling.io/t/error-java-lang-unsupportedoperationexception-there-were-no-requests-sent-during-the-simulation-reports-wont-be-generated/1969/4 "2015-02-05T18:13:58Z")

</div>

If you don’t have any requests, it means that continue’s initial value is false
