[GLASSFISH-18648] intermittent failure with Jersey client Created: 19/Apr/12 Updated: 14/Feb/13 Resolved: 14/Feb/13
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Mac OS 10.5.8 but should happen on all OS
Metric Gatherers are using REST to collect data from instances. Around April 5th my code stopped working and I would see the following stack trace when I tried to create a Jersey client. With my latest testing I noticed that there are times when I can create the client and then get data but that things work intermittently. In other words, I see a failure then after some time I see that the data is collected for some time and then again it fails. I can create an alert and see that data is collected but I also see the stack traces. Not sure why this is happening.
Currently, the elasticity code is checked in but will not run unless a system property start.elasticity is set to true. The file that creates the Jersey client is CollectMetricData. There I create a client each time I try to collect data. Could that be part of the problem?
To recreate the issue (I've attached the app that I used to test).
start the server with the system property start.elasticity=true
tail the server log and see that the stack trace or metric values are printed.
[#|2012-04-19T15:16:55.793-0700|SEVERE|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-41;|java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [com.sun.jersey.core.impl.provider.xml.SAXParserContextProvider], because it has not yet been started, or was already stopped
|Comment by Bhakti Mehta [ 19/Apr/12 ]|
Assigning this to Jakub
|Comment by Jakub Podlesak [ 20/Apr/12 ]|
I have 3 comments to the issue:
1) we have not changed the client code in Jersey recently. The issue then can not be caused by a regression in the Jersey client code.
2) You should avoid creating a new client each time you want to get data, as client creation is an expensive operation.
3) We are about to update Jersey version in GlassFish 4.x soon, particularly to switch
|Comment by Jakub Podlesak [ 14/Feb/13 ]|
Resolving as invalid, since Jersey has been upgraded and referred classes are no longer present in GF.