我正在使用 Luke 浏览一些 Solr 索引,当我尝试“重建和编辑”文档中的浮点字段,然后“删除旧的并添加”时,出现异常:
java.lang.NullPointerException
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1106)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1021)
at org.getopt.luke.Luke.actionEditAdd(Unknown Source)
at org.getopt.luke.Luke.actionEditReplace(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at thinlet.Thinlet.invokeImpl(Unknown Source)
at thinlet.Thinlet.invoke(Unknown Source)
at thinlet.Thinlet.handleMouseEvent(Unknown Source)
at thinlet.Thinlet.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
没有其他消息说明我为什么会收到 NullPointerException。我正在针对使用 Solr 3.4 创建的一些索引运行最新的 Luke 3.5。任何想法还有什么可能是错的......?
为了安全起见,我已经停止了 Tomcat,并确保可以从运行 Luke 的用户那里编辑索引文件(试图排除问题可能是索引文件上的用户权限问题的情况)