You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/05/28 18:31:45 UTC
[jira] Commented: (LUCENE-1666) Constants causing
NullPointerException when fetching metadata "Implementation Version" in
MANIFEST
[ https://issues.apache.org/jira/browse/LUCENE-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714046#action_12714046 ]
Michael McCandless commented on LUCENE-1666:
--------------------------------------------
Much simpler, thanks Uwe!
But, shouldn't we protect for null return from LucenePackage.get()? Googling, it seems there are some occasions where .getPackage() might return null (seems to be w/ custom classloaders).
And.... are there any situations where .getPackage() would fail but the current way would work (and vice/versa)? (This is all voodoo magic to me!).
> Constants causing NullPointerException when fetching metadata "Implementation Version" in MANIFEST
> --------------------------------------------------------------------------------------------------
>
> Key: LUCENE-1666
> URL: https://issues.apache.org/jira/browse/LUCENE-1666
> Project: Lucene - Java
> Issue Type: Bug
> Components: Other
> Environment: os=Linux, os.version=2.6.28-11-generic, source=flush, lucene.version=2.9-dev, os.arch=i386, java.version=1.6.0_13, java.vendor=Sun Microsystems Inc.
> Reporter: Renaud Delbru
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1666.patch, LUCENE-1666.patch
>
>
> If the MANIFEST.MF file does not contain the metadata IMPLEMENTATION_VERSION, a null value is returned, causing NullPointerException during commit:
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.lucene.store.IndexOutput.writeString(IndexOutput.java:109)
> at org.apache.lucene.store.IndexOutput.writeStringStringMap(IndexOutput.java:229)
> at org.apache.lucene.index.SegmentInfo.write(SegmentInfo.java:558)
> at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:337)
> at org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:808)
> at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:5319)
> at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3895)
> at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3956)
> This happened after having build a jar assembly using Maven, the original MANIFEST.MF of lucene jar has been overwritten, and didn't contain anynore the implementation version metadata.
> Path attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org