我正在增加表哥 DBObject ob = new BasicDBObject(“ batchSize”,10); 聚合聚合= Aggregation.newAggregation(Aggregation.match(Criteria.where(lookup.getSearchKey())。in(lookup.getSearchValues())),lookupOperation).withOptions(newAggregationOptions()。cursor((DBObject)ob).build ()); 我得到这个错误 2019-04-16 18:44:23,611 Log4j2-AsyncLoggerConfig-2错误处理Appender文件java.lang.NullPointerException时发生异常 在com.vc.logging.api.layouts.LogMessageLayout.toSerializable(LogMessageLayout.java:47) 在com.vc.logging.api.layouts.LogMessageLayout.toSerializable(LogMessageLayout.java:1) 在org.apache.logging.log4j.core.layout.AbstractStringLayout.toByteArray(AbstractStringLayout.java:253) 在org.apache.logging.log4j.core.layout.AbstractLayout.encode(AbstractLayout.java:159) 在org.apache.logging.log4j.core.layout.AbstractLayout.encode(AbstractLayout.java:36) 在org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:120) 在org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:113) 在org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:104) 在org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender.append(RollingRandomAccessFileAppender.java:99) 在org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:155) 在org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:128) 在org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:119) 在org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84) 在org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:390) 在org.apache.logging.log4j.core.async.AsyncLoggerConfig.asyncCallAppenders(AsyncLoggerConfig.java:113) 在org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor $ Log4jEventWrapperHandler.onEvent(AsyncLoggerConfigDisruptor.java:111) 在org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor $ Log4jEventWrapperHandler.onEvent(AsyncLoggerConfigDisruptor.java:97) 在com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:137) 在java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源) 在java.lang.Thread.run(未知来源)