Issue Details (XML | Word | Printable)

Key: GLASSFISH-18648
Type: Bug Bug
Status: Resolved Resolved
Resolution: Invalid
Priority: Major Major
Assignee: Jakub Podlesak
Reporter: carlavmott
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

intermittent failure with Jersey client

Created: 19/Apr/12 11:22 PM   Updated: 14/Feb/13 05:38 PM   Resolved: 14/Feb/13 05:38 PM
Component/s: jax-rs
Affects Version/s: 4.0_b32_ms1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File SimpleSessionDemo.war (6 kB) 19/Apr/12 11:22 PM - carlavmott


Mac OS 10.5.8 but should happen on all OS

Participants: Bhakti Mehta, carlavmott and Jakub Podlesak

 Description  « Hide

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
asadmin create-ims-config-native
asadmin deploy SimpleSessionDemo.war
asadmin create-tenant acme
asadmin create-jvm-alert --environment SimpleSessionDemo --tenantid acme alert1

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||_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
at org.glassfish.web.loader.WebappClassLoader.loadClass(
at org.glassfish.web.loader.WebappClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.sun.jersey.core.reflection.ReflectionHelper.classForNameWithException(
at com.sun.jersey.spi.service.ServiceFinder$AbstractLazyIterator.hasNext(
at com.sun.jersey.spi.service.ServiceFinder.toClassArray(
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(
at com.sun.jersey.core.spi.component.ProviderServices.getProviderAndServiceClasses(
at com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(
at com.sun.jersey.core.spi.factory.InjectableProviderFactory.configure(
at com.sun.jersey.api.client.Client.init(
at com.sun.jersey.api.client.Client.access$000(
at com.sun.jersey.api.client.Client$1.f(
at com.sun.jersey.api.client.Client$1.f(
at com.sun.jersey.spi.inject.Errors.processWithErrors(
at com.sun.jersey.api.client.Client.<init>(
at com.sun.jersey.api.client.Client.<init>(
at com.sun.jersey.api.client.Client.create(
at org.glassfish.elasticity.metrics.util.CollectMetricData.getRestData(
at org.glassfish.elasticity.metrics.jvm.memory.JVMMemoryMetricHolder$JVMInstanceMemoryHolder.gatherMetric(
at org.glassfish.elasticity.metrics.jvm.memory.JVMMemoryMetricHolder.gatherMetric(
at org.glassfish.elasticity.engine.container.ElasticServiceContainer$
at java.util.concurrent.Executors$
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(
at java.util.concurrent.FutureTask.runAndReset(
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(
at java.util.concurrent.ScheduledThreadPoolExecutor$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$


No work has yet been logged on this issue.