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

A null pointer exception is thrown when trying to list bucket objects on the buckets directory. #551

Open
douglasAtJoyent opened this issue Sep 17, 2019 · 1 comment

Comments

@douglasAtJoyent
Copy link
Contributor

A null pointer exception is thrown when trying to list bucket objects on the buckets directory.

e.g.
client.listObjects(client.getContext().getMantaBucketsDirectory());

The exception that I see is :
java.lang.NullPointerException: Modification time is null
at com.joyent.manta.org.apache.commons.lang3.Validate.notNull(Validate.java:225)
at com.joyent.manta.client.MantaObjectConversionFunction.apply(MantaObjectConversionFunction.java:83)
at com.joyent.manta.client.MantaObjectConversionFunction.apply(MantaObjectConversionFunction.java:29)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.joyent.jmetersampler.AtomicBucketListing.runTest(AtomicBucketListing.java:93)
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:197)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:745)

@kennethvt437
Copy link

Before the line that is throwing the exception, I would recommend writing the following:
System.out.println(client == null);
System.out.println(client.getContext() == null);

If either of the booleans printed is true, look back in your code to see whether you correctly initialized the exception-causing variable.

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