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

NullPointerException in readAllDocuments() #33

Closed
jchamberlain opened this issue Jan 27, 2020 · 2 comments
Closed

NullPointerException in readAllDocuments() #33

jchamberlain opened this issue Jan 27, 2020 · 2 comments

Comments

@jchamberlain
Copy link

jchamberlain commented Jan 27, 2020

When I run the first example,
./run.sh -s http://localhost:8983/solr/collection -a export -o /tmp/collection.json

I get the following error:

15:07:40.329 [main] INFO  i.d.s.i.App - Found config: CommandLineConfig{actionType=EXPORT, solrUrl='http://localhost:8983/solr/collection', fileName='/tmp/collection.json', deleteAll=false, disableCursors=false, skipFieldSet=[], includeFieldSet=[], filterQuery='null', uniqueKey='null', dryRun=false, skipCount=0, commitAfter=null, blockSize=5000, dateTimeFormat='YYYY-MM-dd'T'HH:mm:sss'Z'', user='null', password='**********'}
15:07:40.348 [main] WARN  i.d.s.i.App - unable to find valid uniqueKey defaulting to "id".
Exception in thread "main" java.lang.NullPointerException
	at it.damore.solr.importexport.App.readAllDocuments(App.java:324)
	at it.damore.solr.importexport.App.main(App.java:116)

I'm using Java 8 and running the master branch of this project. (To be clear, I've replaced "collection" with a real collection name when I get this error.)

Note that the following command succeeds (no NPE):
./run.sh -s http://localhost:8983/solr/collection -a export -o /tmp/collection.json --user= --password=

@freedev
Copy link
Owner

freedev commented Jan 28, 2020

Hi @jchamberlain thanks for pointing out the problem, now it is fixed.

@freedev
Copy link
Owner

freedev commented Jan 28, 2020

Recently I've added credential handling for basic authentication, but I forgot to check when there are no credential at all, ouch!

@freedev freedev closed this as completed Jan 28, 2020
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