Hello
We are using appdynamics for monitoring and our load test fails. we are trying to call a third party api below
URL obj = new URL("https://somewebsite.com/api/v1/discussion.json?Discussion.ForeignID=bd43537ec7509e4eafae63e037325300");
con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent",
"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)");
con.setConnectTimeout(500);
con.setRequestProperty("Accept","*/*");
con.connect();
if (con.getResponseCode() == HttpURLConnection.HTTP_OK) {
Once we establish a connection and call con.getResponseCode() in our java program the response code is 404 and it behaves fine there is no error in tomcat log file , but appdynamic registers an error as below and as a result because of exception per minute the load test fail.
java.io.FileNotFoundException.http://somestufff.com/api/v1/discussion.json?Discussion.ForeignID=fb7a4ce5025a0ef015f19c452b1da541
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at com.website.editorial.util.ConsumerCommentUtil.getVanillaUrl(ConsumerCommentUtil.java:119)
As of now in order to fix this we have put a ignore filter in place but is there any advice or suggestion to overcome this.
We're having the same issue. It seems like when the app uses HttpUrlConnection to call getResponseCode(), the getResponseCode() method also calls getInputStream(), which is the method that ultimately throws the error. The FileNotFoundException in this case is bundled in the rememberedException field in HttpUrlConnection class, which is protected. If you call HttpUrlConnection.getInputStream() from the app code, you'll see the FileNotFoundException in the console, which you can catch, but that doesn't prevent AppDynamics from logging it as an error in a Transaction.
How was the ignore filter configured specifically? I've tried java.io.FileNotFoundException with Is Not Empty and NOT (Is Not Empty) for the class name and exception message respectfully, but it still reports as an error.
Hi Steven,
Can you share the screenshot (if possible the exported snapshot PDF) with error details in view and also archive of agent logs? ,logs could be download from UI (refer screenshot attached)
Plan is to check the exact error or it is a message and the rule defined from logs requested
I don't have access to download agent log files unfortunately.