[
https://issues.apache.org/jira/browse/ATLAS-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151177#comment-15151177
]
Tom Beerbower commented on ATLAS-454:
-------------------------------------
[~yhemanth]
If I copy the Jersey dependencies from Atlas to the {{storm/extlib}} folder, I
get the following ...
{code}
Exception in thread "main" java.lang.ExceptionInInitializerError
at
com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:182)
at
com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at
com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:343)
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.<init>(Client.java:188)
at com.sun.jersey.api.client.Client.<init>(Client.java:171)
at org.apache.atlas.AtlasClient.<init>(AtlasClient.java:124)
at org.apache.atlas.AtlasClient.<init>(AtlasClient.java:99)
at org.apache.atlas.hook.AtlasHook.<init>(AtlasHook.java:81)
at
org.apache.atlas.storm.hook.StormAtlasHook.<init>(StormAtlasHook.java:67)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at
backtype.storm.StormSubmitter.invokeSubmitterHook(StormSubmitter.java:259)
at
backtype.storm.StormSubmitter.submitTopologyAs(StormSubmitter.java:252)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:285)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:157)
at storm.starter.WordCountTopology.main(WordCountTopology.java:77)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.glassfish.jersey.internal.RuntimeDelegateImpl
at
javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
at javax.ws.rs.core.MediaType.valueOf(MediaType.java:179)
at com.sun.jersey.core.header.MediaTypes.<clinit>(MediaTypes.java:65)
... 24 more
Caused by: java.lang.ClassNotFoundException:
org.glassfish.jersey.internal.RuntimeDelegateImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:115)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
at
javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
... 27 more
{code}
Notice that the Jersey jars used to build Atlas are version {{1.19}} ...
{code}
jersey-client-1.19.jar
jersey-core-1.19.jar
{code}
In these older Jersey versions the package name {{com.sun.jersey}} was used.
Notice that in the stack trace above the ClassNotFoundException is for the
Jersey class {{org.glassfish.jersey.internal.RuntimeDelegateImpl}} (different
package). The class is available in jersey-common-2.x.jar which changes the
packaging to {{org.glassfish.jersey}}.
I'm thinking that we may need to update the version of Jersey used by Atlas.
What do you think?
> Storm hook is missing jersey client dependencies
> ------------------------------------------------
>
> Key: ATLAS-454
> URL: https://issues.apache.org/jira/browse/ATLAS-454
> Project: Atlas
> Issue Type: Bug
> Reporter: Hemanth Yamijala
> Assignee: Tom Beerbower
> Fix For: trunk
>
>
> While testing the Hive hook with latest storm-hive package from
> http://repo.hortonworks.com/content/repositories/releases (to be included in
> the next Apache Storm release), it was found that the Storm hook fails with
> an exception of this nature:
> {code}
> 3209 [main] INFO o.a.a.s.h.StormAtlasHook - Collecting metadata for a new
> storm topology: kafka-to-hive
> Jan 22, 2016 3:33:43 PM com.sun.jersey.api.client.ClientResponse getEntity
> SEVERE: A message body reader for Java class java.lang.String, and Java type
> class java.lang.String, and MIME media type application/json; charset=UTF-8
> was not found
> Jan 22, 2016 3:33:43 PM com.sun.jersey.api.client.ClientResponse getEntity
> SEVERE: The registered message body readers compatible with the MIME media
> type are:
> application/json; charset=UTF-8 ->
> com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
> com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$App
> com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$App
> com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
> com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
> */* ->
> com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
> com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General
> com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General
> com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
> com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
> com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
> Exception in thread "main" java.lang.RuntimeException:
> java.lang.RuntimeException: Atlas hook is unable to process the topology.
> at
> backtype.storm.StormSubmitter.invokeSubmitterHook(StormSubmitter.java:264)
> at
> backtype.storm.StormSubmitter.submitTopologyAs(StormSubmitter.java:252)
> at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:285)
> at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:157)
> at
> com.dsinpractice.storm.samples.WordCountTopology.main(WordCountTopology.java:78)
> Caused by: java.lang.RuntimeException: Atlas hook is unable to process the
> topology.
> at
> org.apache.atlas.storm.hook.StormAtlasHook.notify(StormAtlasHook.java:122)
> at
> backtype.storm.StormSubmitter.invokeSubmitterHook(StormSubmitter.java:261)
> ... 4 more
> Caused by: com.sun.jersey.api.client.ClientHandlerException: A message body
> reader for Java class java.lang.String, and Java type class java.lang.String,
> and MIME media type application/json; charset=UTF-8 was not found
> at
> com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549)
> at
> com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506)
> at
> org.apache.atlas.AtlasClient.callAPIWithResource(AtlasClient.java:588)
> at
> org.apache.atlas.AtlasClient.callAPIWithResource(AtlasClient.java:579)
> at org.apache.atlas.AtlasClient.getType(AtlasClient.java:257)
> at
> org.apache.atlas.storm.hook.StormAtlasHook.registerDataModel(StormAtlasHook.java:390)
> at
> org.apache.atlas.storm.hook.StormAtlasHook.notify(StormAtlasHook.java:102)
> ... 5 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)