[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-dev
Subject: [jira] Commented: (LUCENE-2182) DEFAULT_ATTRIBUTE_FACTORY faills to
From: "Uwe Schindler (JIRA)" <jira () apache ! org>
Date: 2009-12-28 22:21:31
Message-ID: 975308019.1262038891165.JavaMail.jira () brutus ! apache ! org
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/LUCENE-2182?page=com.atlassian.jira.plugin \
.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794949#action_12794949 ]
Uwe Schindler commented on LUCENE-2182:
---------------------------------------
I will commit and backport tomorrow!
> DEFAULT_ATTRIBUTE_FACTORY faills to load implementation class when iterface comes \
> from different classloader
> ------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-2182
> URL: https://issues.apache.org/jira/browse/LUCENE-2182
> Project: Lucene - Java
> Issue Type: Bug
> Components: Other
> Affects Versions: 2.9.1, 3.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 2.9.2, 3.0.1, 3.1
>
> Attachments: LUCENE-2182.patch
>
>
> This is a followup for \
> [http://www.lucidimagination.com/search/document/1724fcb3712bafba/using_the_new_tokenizer_api_from_a_jar_file]:
> The DEFAULT_ATTRIBUTE_FACTORY should load the implementation class for a given \
> attribute interface from the same classloader like the attribute interface. The \
> current code loads it from the classloader of the lucene-core.jar file. In solr \
> this fails when the interface is in a JAR file coming from the plugins folder. The \
> interface is loaded correctly, because the addAttribute(FooAttribute.class) loads \
> the FooAttribute.class from the plugin code and this with success. But as \
> addAttribute tries to load the class from its local lucene-core.jar classloader it \
> will not find the attribute. The fix is to tell Class.forName to use the \
> classloader of the corresponding interface, which is the correct way to handle it, \
> as the impl and the attribute should always be in the same classloader and file. I \
> hope I can somehow add a test for that.
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic