RE: Solr 3.1 / Java 1.5: Exception regarding analyzer implementation

2011-05-10 Thread Chris Hostetter

: The reason why this assert hits you in one of your tomcat installations
: could also be related to some instrumentation tools you have enabled in this
: tomcat. Lot's of instrumentation tools may dynamically change class bytecode
: and e.g. make them unfinal. In that case the assertion of course fails (with
: assertions enabled). Before saying Solr 3.1 is not compatible with Java 1.5:

It's also possible that whatever packaging of Java you are using; and the 
way your are running tomcat; is subtlely differnet between your Java5 and 
Java6 installs such that Java5 is run with assertions by default but Java6 
is not.

-Hoss


RE: Solr 3.1 / Java 1.5: Exception regarding analyzer implementation

2011-05-10 Thread Uwe Schindler
Hi,

> On 09.05.11 11:04, Martin Jansen wrote:
> > I just attempted to set up an instance of Solr 3.1 in Tomcat 5.5
> > running in Java 1.5.  It fails with the following exception on start-up:
> >
> >> java.lang.AssertionError: Analyzer implementation classes or at least
> >> their tokenStream() and reusableTokenStream() implementations must
> be
> >> final at
> >> org.apache.lucene.analysis.Analyzer.assertFinal(Analyzer.java:57)
> 
> In the meantime I solved the issue by installing Java 1.6.  Works without
a
> problem now, but I'm wondering if Solr 3.1 is intentionally incompatible
to
> Java 1.5 or if if happened by mistake.

Solr 3.1 is compatible with Java 1.5 and runs fine with that. The exception
you are seeing should not happen for Analyzers that are shipped with
Solr/Lucene, they can only happen if you wrote your own
Analyzer/TokenStreams that are not declared final as requested. In that case
the error will also happen with Java 6.

BUT: This is only an assertion to make development and debugging easier. The
assertions should not run in production mode, as they may affect performance
(seriously)! You should check you java command line for -ea parameters and
remove them on production.

The reason why this assert hits you in one of your tomcat installations
could also be related to some instrumentation tools you have enabled in this
tomcat. Lot's of instrumentation tools may dynamically change class bytecode
and e.g. make them unfinal. In that case the assertion of course fails (with
assertions enabled). Before saying Solr 3.1 is not compatible with Java 1.5:

- Disable assertions in production (by removing -ea command line parameters,
see http://download.oracle.com/javase/1.4.2/docs/guide/lang/assert.html)
- Check your configuration if you have some instrumentation enabled.

Both of the above points may not affect you on the other server that runs
fine with Java 6.

Uwe



Re: Solr 3.1 / Java 1.5: Exception regarding analyzer implementation

2011-05-09 Thread Martin Jansen
On 09.05.11 11:04, Martin Jansen wrote:
> I just attempted to set up an instance of Solr 3.1 in Tomcat 5.5 running
> in Java 1.5.  It fails with the following exception on start-up:
> 
>> java.lang.AssertionError: Analyzer implementation classes or at least their 
>> tokenStream() and reusableTokenStream() implementations must be final at 
>> org.apache.lucene.analysis.Analyzer.assertFinal(Analyzer.java:57)

In the meantime I solved the issue by installing Java 1.6.  Works
without a problem now, but I'm wondering if Solr 3.1 is intentionally
incompatible to Java 1.5 or if if happened by mistake.

Martin