lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Svensson (JIRA)" <>
Subject [jira] [Commented] (LUCENENET-496) System.NotImplementedException occurred in Microsoft.VisualStudio.QualityTools.Common.dll
Date Thu, 21 Jun 2012 15:58:42 GMT


Simon Svensson commented on LUCENENET-496:

QueryParserTokenManager.InitBlack creates a StreamWriter for debugging purposes. It will write
to Console.OpenStandardOutput() using Console.Out.Encoding, and the later is a NotSupportedOperation
for EqtStringPerThreadWriter (which is a TextWriter). I would guess that the testing framework
sets Console.Out to a new EqtStringPerThreadWriter, and you may be able to workaround this
issue by Console.SetOut(new StreamWriter(new MemoryStream())) before creating the QueryParser.

I'm not sure who uses the writer created by QueryParserTokenManager, and why Console.Out isn't
used directly.
> System.NotImplementedException occurred in Microsoft.VisualStudio.QualityTools.Common.dll
> -----------------------------------------------------------------------------------------
>                 Key: LUCENENET-496
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 2.9.4g
>         Environment: VS2010sp1 + mstest on win7 64-bit
>            Reporter: Nicklas Norling
>            Priority: Minor
> When enabling parallel tests in VS2010 one of our tests failed consistently with a weird
NotImplementedEsxception inside the MS tool.
> The following code is use Lucene.NET from NuGet:
>             analyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29);
>             parser = new QueryParser(Lucene.Net.Util.Version.LUCENE_29, "All", analyzer);
> The exception is thrown inside the new QueryParser call. This is the call stack:
> System.NotImplementedException was unhandled by user code
>   Message=The method or operation is not implemented.
>   Source=Microsoft.VisualStudio.QualityTools.Common
>   StackTrace:
>        at Microsoft.VisualStudio.TestTools.Common.EqtStringPerThreadWriter.get_Encoding()
>        at Lucene.Net.QueryParsers.QueryParserTokenManager.InitBlock()
>        at Lucene.Net.QueryParsers.QueryParserTokenManager..ctor(CharStream stream)
>        at Lucene.Net.QueryParsers.QueryParser..ctor(CharStream stream)
>        at Lucene.Net.QueryParsers.QueryParser..ctor(Version matchVersion, String f, Analyzer
>        at AuthoringServer.SearchEngine.Searcher..ctor(SearchSettings settings) in [Our
code path]\Searcher.cs:line 45
>        at BuildUp_AuthoringServer.SearchEngine.Searcher(IBuilderContext )
>        at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext
>        at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext
>        at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext
> Do not know if this is a MS bug or if Lucene.NET should behave in a different way when
logging. Registering here for your judgement.
> Regards,
> Nicke

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message