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

java.lang.NoSuchFieldError: _rootByteSymbols #2

Open
fmarelli opened this issue Sep 21, 2017 · 10 comments
Open

java.lang.NoSuchFieldError: _rootByteSymbols #2

fmarelli opened this issue Sep 21, 2017 · 10 comments

Comments

@fmarelli
Copy link

fmarelli commented Sep 21, 2017

Hi

I am running the example class "ExampleMain" updated for my environment. The query seems to be running ok, but I get an error when retrieving the results. Below log and stack trace, the first line of the stack trace is

final List<Result<SelectResultValue>> resultList = Sequences.toList(resultSequence, Lists.<Result<SelectResultValue>>newArrayList());

Thank You

2017-09-21T09:21:27,241 INFO [main] org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 5.1.3.Final
2017-09-21 09:21:27 INFO JsonConfigurator:70 - Loaded class[class io.druid.guice.ExtensionsConfig] from props[druid.extensions.] as [ExtensionsConfig{searchCurrentClassloader=true, directory='extensions', hadoopDependenciesDir='hadoop-dependencies', hadoopContainerDruidClasspath='null', loadList=null}]
2017-09-21 09:21:27 WARN Log4jShutterDownerModule:83 - Shutdown callback registry expected class [io.druid.common.config.Log4jShutdown] found [org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry]. Skipping shutdown registry
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.server.metrics.DruidMonitorSchedulerConfig] from props[druid.monitoring.] as [io.druid.server.metrics.DruidMonitorSchedulerConfig@5e76a2bb]
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.server.metrics.MonitorsConfig] from props[druid.monitoring.] as [MonitorsConfig{monitors=[]}]
2017-09-21 09:21:28 INFO MetricsModule:70 - Adding monitor[io.druid.query.ExecutorServiceMonitor@464a4442]
2017-09-21 09:21:28 INFO MetricsModule:70 - Adding monitor[io.druid.server.initialization.jetty.JettyServerModule$JettyMonitor@5c41d037]
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.query.search.search.SearchQueryConfig] from props[druid.query.search.] as [io.druid.query.search.search.SearchQueryConfig@585c13de]
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.query.metadata.SegmentMetadataQueryConfig] from props[druid.query.segmentMetadata.] as [io.druid.query.metadata.SegmentMetadataQueryConfig@5395ea39]
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.query.groupby.GroupByQueryConfig] from props[druid.query.groupBy.] as [io.druid.query.groupby.GroupByQueryConfig@6a714237]
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.query.topn.TopNQueryConfig] from props[druid.query.topN.] as [io.druid.query.topn.TopNQueryConfig@5cbb84b1]
2017-09-21 09:21:28 INFO JsonConfigurator:70 - Loaded class[class io.druid.guice.http.DruidHttpClientConfig] from props[druid.client.http.] as [io.druid.guice.http.DruidHttpClientConfig@773bd77b]
2017-09-21 09:21:28 DEBUG DruidClient:56 - Issuing query: {"queryType":"select","dataSource":{"type":"table","name":"damneat"},"intervals":{"type":"LegacySegmentSpec","intervals":["2000-01-01T00:00:00.000+01:00/2000-01-02T00:00:00.000+01:00"]},"descending":false,"filter":null,"granularity":{"type":"all"},"dimensions":[{"type":"default","dimension":"ndg_id","outputName":"ndg_id"},{"type":"default","dimension":"debtor_type","outputName":"debtor_type"},{"type":"default","dimension":"debtor_name","outputName":"debtor_name"},{"type":"default","dimension":"contract_id","outputName":"contract_id"},{"type":"default","dimension":"warranty_id","outputName":"warranty_id"},{"type":"default","dimension":"warranty_de","outputName":"warranty_de"},{"type":"default","dimension":"appraisal_id","outputName":"appraisal_id"},{"type":"default","dimension":"goods_id","outputName":"goods_id"}],"metrics":[],"pagingSpec":{"pagingIdentifiers":{},"threshold":50,"fromNext":false},"context":null}
2017-09-21 09:21:28 DEBUG DirectDruidClient:56 - Querying queryId[null] url[http://localhost:18082/druid/v2/]
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] starting
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 INFO ChannelResourceFactory:70 - Generating: http://localhost:18082
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] messageReceived: DefaultHttpResponse(chunked: true)
HTTP/1.1 200 OK
Date: Thu, 21 Sep 2017 07:21:28 GMT
Content-Type: application/x-jackson-smile
X-Druid-Query-Id: 867c6f76-8770-48ce-95d7-5f483e6ef95b
X-Druid-Response-Context: {}
Vary: Accept-Encoding, User-Agent
Transfer-Encoding: chunked
Server: Jetty(9.3.19.v20170502)
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] Got response: 200 OK
2017-09-21 09:21:28 DEBUG DirectDruidClient:56 - Initial response from url[http://localhost:18082/druid/v2/] for queryId[null]
2017-09-21 09:21:28 INFO Lifecycle$AnnotationBasedHandler:70 - Invoking stop method[public void com.metamx.http.client.NettyHttpClient.stop()] on object[com.metamx.http.client.NettyHttpClient@21a66d45].
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] messageReceived: org.jboss.netty.handler.codec.http.DefaultHttpChunk@2ab36f76
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] Got chunk: 21222B, last=false
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] messageReceived: org.jboss.netty.handler.codec.http.HttpChunk$1@6870ab0
2017-09-21 09:21:28 DEBUG NettyHttpClient:56 - [POST http://localhost:18082/druid/v2/] Got chunk: 0B, last=true
2017-09-21 09:21:28 DEBUG DirectDruidClient:56 - Completed queryId[null] request to url[http://localhost:18082/druid/v2/] with 21,222 bytes returned in 20 millis [10,611,000.000000 b/s].
2017-09-21 09:21:28 INFO ResourcePool:70 - giveBack called after being closed. key[http://localhost:18082]
Exception in thread "main" java.lang.NoSuchFieldError: _rootByteSymbols
at com.fasterxml.jackson.dataformat.smile.SmileFactory._createParser(SmileFactory.java:369)
at com.fasterxml.jackson.dataformat.smile.SmileFactory.createParser(SmileFactory.java:299)
at com.fasterxml.jackson.dataformat.smile.SmileFactory.createParser(SmileFactory.java:27)
at io.druid.client.DirectDruidClient$JsonParserIterator.init(DirectDruidClient.java:479)
at io.druid.client.DirectDruidClient$JsonParserIterator.hasNext(DirectDruidClient.java:442)
at com.metamx.common.guava.BaseSequence.makeYielder(BaseSequence.java:103)
at com.metamx.common.guava.BaseSequence.toYielder(BaseSequence.java:81)
at com.metamx.common.guava.BaseSequence.accumulate(BaseSequence.java:67)
at com.metamx.common.guava.MappedSequence.accumulate(MappedSequence.java:40)
at com.metamx.common.guava.Sequences.toList(Sequences.java:113)
at ExampleMain.main(ExampleMain.java:55)

@gianm
Copy link
Member

gianm commented Sep 21, 2017

Hi @fmarelli,

It looks likely that there is a jackson version mismatch of some kind, perhaps between two different jackson jars. Have you updated the pom.xml at all? Is it possible a change has introduced a different version of one of the jackson jars?

@fmarelli
Copy link
Author

Hi, in my application I was using jackson-core 2.9.0, but with this version the DruidClient gave the followng error

2017-09-21 09:44:32 INFO Lifecycle$AnnotationBasedHandler:70 - Invoking stop method[public void com.metamx.http.client.NettyHttpClient.stop()] on object[com.metamx.http.client.NettyHttpClient@57adfab0].
Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.dataformat.smile.SmileGenerator.getOutputContext()Lcom/fasterxml/jackson/core/json/JsonWriteContext;
at com.fasterxml.jackson.dataformat.smile.SmileGenerator.close(SmileGenerator.java:1537)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3686)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsBytes(ObjectMapper.java:3081)
at io.druid.client.DirectDruidClient.run(DirectDruidClient.java:331)
at io.imply.druid.query.DruidClient.execute(DruidClient.java:207)
at ExampleMain.main(ExampleMain.java:51)

I read they changed the signature of the getOutputContext in 2.8, so I "downgraded" to 2.7.9, the getOutputContext method error disappeared but now I am getting the error which is the subject of this issue.

Thanks a lot, Kind regards

@fmarelli
Copy link
Author

Hi @gianm

Reading the pom.xml of the druid client I see it references

UTF-8 0.9.1.1

Is this correct? Shouldnìt it be change to 0.10.1?

Cheers

@fmarelli
Copy link
Author

I meant

<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <druid.version>0.9.1.1</druid.version> </properties>

@gianm
Copy link
Member

gianm commented Sep 21, 2017

Yeah, 0.10.1 would be better, I just haven't updated that project in a while :)

You might need to downgrade Jackson even farther. Druid is built & tested using version 2.4.6.

@fmarelli
Copy link
Author

fmarelli commented Sep 21, 2017

@gianm

Ok I have built the java client against druid server 0.10.1 and also removed the explicit dependency in my pom.xml for Jackson, now I am getting a new error altogether, see below. Cheers

`Exception in thread "main" java.lang.ExceptionInInitializerError
at ExampleMain.main(ExampleMain.java:28)
Caused by: com.google.inject.CreationException: Unable to create injector, see the following errors:

  1. No implementation for java.util.Map<java.lang.Class<? extends io.druid.query.Query>, io.druid.query.QueryToolChest> was bound.
    while locating java.util.Map<java.lang.Class<? extends io.druid.query.Query>, io.druid.query.QueryToolChest>
    for the 1st parameter of io.druid.query.MapQueryToolChestWarehouse.(MapQueryToolChestWarehouse.java:36)
    at io.imply.druid.query.DruidClient$2.configure(DruidClient.java:88) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.imply.druid.query.DruidClient$2)

1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at io.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:390)
at io.imply.druid.query.DruidClient.(DruidClient.java:68)
... 1 more
`

@fmarelli fmarelli reopened this Sep 21, 2017
@rongnguyen
Copy link

Hi fmarelli,
Did you resolve this issue?

@fmarelli
Copy link
Author

fmarelli commented Jan 15, 2018

@rongnguyen no I gave up. It's a shame as a working http client would be very very useful. Did you run into the same issues I had? Cheers.

@rongnguyen
Copy link

@fmarelli I had the same issues. Now, I have to use 0.9 version :))(But I like newest)
This project had very poor support. So sad!

@spyk
Copy link

spyk commented Mar 6, 2018

I had to update as well to Druid v.0.11.0 and faced the same issue as above:

No implementation for java.util.Map<java.lang.Class<? extends io.druid.query.Query>, io.druid.query.QueryToolChest> was bound.

I resolved it by adding the line:
DruidBinders.queryToolChestBinder(binder);
before
binder.bind(QueryToolChestWarehouse.class).to(MapQueryToolChestWarehouse.class);

If there's some time I could open a pull request, since there are other changes to be made for 0.11.0 migration.

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

4 participants