Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting class cast error in OSGI container - Java API #1

Open
Saravanan245 opened this issue Mar 4, 2016 · 1 comment
Open

Getting class cast error in OSGI container - Java API #1

Saravanan245 opened this issue Mar 4, 2016 · 1 comment

Comments

@Saravanan245
Copy link

Caused by: com.sun.jersey.spi.service.ServiceConfigurationError: com.sun.jersey.spi.HeaderDelegateProvider: The class com.sun.jersey.core.impl.provider.header.LocaleProvider implementing provider interface com.sun.jersey.spi.HeaderDelegateProvider could not be instantiated: Cannot cast com.sun.jersey.core.impl.provider.header.LocaleProvider to com.sun.jersey.spi.HeaderDelegateProvider
at com.sun.jersey.core.osgi.OsgiRegistry$OsgiServiceFinder$1.next(OsgiRegistry.java:149)
at com.sun.jersey.core.spi.factory.AbstractRuntimeDelegate.(AbstractRuntimeDelegate.java:76)
at com.sun.ws.rs.ext.RuntimeDelegateImpl.(RuntimeDelegateImpl.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_73]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at java.lang.reflect.Constructor.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at java.lang.Class.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at com.sun.jersey.core.osgi.OsgiRegistry.hookUp(OsgiRegistry.java:421)
at com.sun.jersey.core.osgi.OsgiRegistry.getInstance(OsgiRegistry.java:119)
at com.sun.jersey.core.reflection.ReflectionHelper.getOsgiRegistryInstance(ReflectionHelper.java:842)
at com.sun.jersey.spi.service.ServiceFinder.(ServiceFinder.java:200)
at com.sun.jersey.api.client.Client.init(Client.java:214)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.(Client.java:188)
at com.sun.jersey.api.client.Client.(Client.java:171)
at com.sun.jersey.api.client.Client.create(Client.java:683)
at com.openalpr.api.invoker.ApiClient.getClient(ApiClient.java:579)
at com.openalpr.api.invoker.ApiClient.getAPIResponse(ApiClient.java:436)
at com.openalpr.api.invoker.ApiClient.invokeAPI(ApiClient.java:500)
at com.openalpr.api.DefaultApi.recognizePost(DefaultApi.java:118)
at com.ryder.integration.openlprreader.ReadUtils.readLicensePlate(ReadUtils.java:27)
at com.ryder.integration.openlprreader.LicensePlateReader.run(LicensePlateReader.java:50)
at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:104) [appian-process.jar:]
at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:101) [appian-process.jar:]
at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) [appian-common.jar:]
at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:101) [appian-process.jar:]
at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) [appian-process.jar:]
at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) [appian-process.jar:]
at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:80) [appian-process.jar:]
at com.appiancorp.mdb.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:26) [unattended-request-handler.jar:]
at sun.reflect.GeneratedMethodAccessor690.invoke(Unknown Source) [:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.8.0_73]
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:104) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 46 more
Caused by: java.lang.ClassCastException: Cannot cast com.sun.jersey.core.impl.provider.header.LocaleProvider to com.sun.jersey.spi.HeaderDelegateProvider
at java.lang.Class.cast(Unknown Source) [rt.jar:1.8.0_73]
at com.sun.jersey.core.osgi.OsgiRegistry$OsgiServiceFinder$1.next(OsgiRegistry.java:147)
... 93 more

@matthill
Copy link
Contributor

matthill commented Mar 6, 2016

How are you trying to run the library? Can you post a code snippet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants