ServletConfig has not been initialized

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ServletConfig has not been initialized

Scott Hardegree
Hello All,

I have a java7 application on JBoss 6.1 that I am testing.  My test is completing a form which creates a unique 5 digit id number.  I have a regex extractor after the call that finds the id and propagates it throughout the test.  I tested this and was successfully able to find 1 match on one sample, created a variable, ran the test, and all was green.  Currently when the test is run I am getting 500 errors back from the JBoss web server.  The server log states “ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/]] (http-0.0.0.0-8080-19) Exception while dispatching incoming RPC call: java.lang.IllegalStateException: ServletConfig has not been initialized”  When doing this manually, no errors occur.

My suspicion is that the regex extractor is not working correctly.  However, I have no way to prove this.  I also suspect that if I record the test again, everything will be green; the script is quite large and I would not want to re-record over and over again.

Has anyone encountered this with JMeter 3.3, JBoss 6.1, and Java 7?  If so, was there any resolution?

Scott Hardegree
Software QA Manager
Health Information Designs, LLC
Office: 334.502.3262 x3138
Reply | Threaded
Open this post in threaded view
|

Re: ServletConfig has not been initialized

glinius@live.com
1. Regarding "I have no way to prove this" - actually you do, you can
configure JMeter to save request and response details by adding the next
lines to /user.properties/ file:


> jmeter.save.saveservice.output_format=xml
> jmeter.save.saveservice.response_data=true
> jmeter.save.saveservice.samplerData=true
> jmeter.save.saveservice.requestHeaders=true
> jmeter.save.saveservice.url=true
> jmeter.save.saveservice.responseHeaders=true

and restart JMeter to pick the changes up. Once your test will be finished
you will be able to open the .jtl results file with  View Results Tree
<http://jmeter.apache.org/usermanual/component_reference.html#View_Results_Tree>  
listener and inspect request and response details. It will show whether your
regular expression extractor works or not as well.

 2. If request in real browser is successful and request by JMeter is not
there should be something different. Compare requests which originate from
JMeter and the real browser using a sniffer tool like  Wireshark
<https://www.wireshark.org/>   or  Fiddler <https://www.telerik.com/fiddler>
, you should be able to detect differences by inspecting HTTP packets. It
might be the case you need to correlate not only the form id, but few more
parameters. As a workaround you can try an alternative way of recording a
JMeter test which can export recorded requests in SmartJMX mode
automatically detecting and dynamic parameters and creating regular
expression extractors to handle them See  How to Cut Your JMeter Scripting
Time by 80%
<https://www.blazemeter.com/blog/how-cut-your-jmeter-scripting-time-80>  
article for more details.

 3. Last by not least: make sure to add  HTTP Cookie Manager
<http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Cookie_Manager>  
to your test plan, it automatically handles cookies which might be a
showstopper for web applications which rely on them.
 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]