Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

com.google.common.base.Preconditions.checkNotNull

Shakthi1
Level 4
Level 4

We are getting the below exception while tryig to process a excel file and update the nodes.

Please can you let us know if any config changes need to be done.

  1. java.lang.NullPointerException: null

        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)

        at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1361) [org.apache.jackrabbit.oak-jcr:1.8.2]

        at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:434) [org.apache.jackrabbit.oak-jcr:1.8.2]

1 Accepted Solution
Gaurav-Behl
Correct answer by
Community Advisor
Community Advisor

Not sure what is the ask here - reason for NPE at checkNotNull() or otherwise why your code throws NPE or something else?

Preconditions.checkNotNull() is doing what it's supposed to do. If the passed value/object is null it would throw NPE.

Probably when you are trying to set property on node, it is not checked-out by same user or its already checked-out by different user or it has specific properties set that do not allow your operation or the underlying object is null.

Check why/how the passed value/object is null in your source code and check node properties that you're dealing with and fix it accordingly. Share appropriate code/screenshots, if applicable.

View solution in original post

0 Replies
Gaurav-Behl
Correct answer by
Community Advisor
Community Advisor

Not sure what is the ask here - reason for NPE at checkNotNull() or otherwise why your code throws NPE or something else?

Preconditions.checkNotNull() is doing what it's supposed to do. If the passed value/object is null it would throw NPE.

Probably when you are trying to set property on node, it is not checked-out by same user or its already checked-out by different user or it has specific properties set that do not allow your operation or the underlying object is null.

Check why/how the passed value/object is null in your source code and check node properties that you're dealing with and fix it accordingly. Share appropriate code/screenshots, if applicable.

View solution in original post