#### How to repeat #### (Assume you already know how to use opengrok) opengrok -v -d ./data -s ./refs -W ./config.xml SEVERE: Unexpected Exception java.lang.NoClassDefFoundError: org/apache/lucene/analysis/standard/StandardAnalyzer at org.opensolaris.opengrok.index.Indexer.doIndexerExecution(Indexer.java:769) at org.opensolaris.opengrok.index.Indexer.main(Indexer.java:560) Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.standard.StandardAnalyzer at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 2 more #### Quick & Dirty Fix #### 1.install lucene-analyzers-common cd /usr/ports/devel/opengrok make patch cd `make -V WRKSRC` cp ./lib/lib/lucene-analyzers-common-4.7.1.jar /usr/local/share/opengrok/lib/ 2.fix script /usr/local/bin/opengrok like this: set LIBFILES = "/usr/local/share/opengrok/lib/ant.jar /usr/local/share/opengrok/lib/bcel-5.2.jar /usr/local/share/opengrok/lib/jrcs.jar /usr/local/share/opengrok/lib/lucene-core-4.7.1.jar /usr/local/share/opengrok/lib/lucene-analyzers-common-4.7.1.jar /usr/local/share/opengrok/lib/lucene-queryparser-4.7.1.jar /usr/local/share/opengrok/lib/lucene-suggest-4.7.1.jar /usr/local/share/opengrok/lib/swing-layout-0.9.jar" #### Fix 404 issue #### see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181321
(In reply to shen.elf from comment #0) > #### Quick & Dirty Fix #### > 1.install lucene-analyzers-common > cd /usr/ports/devel/opengrok > make patch > cd `make -V WRKSRC` > cp ./lib/lib/lucene-analyzers-common-4.7.1.jar /usr/local/share/opengrok/lib/ This is another way of saying to add lucene-analyzers-common-4.7.1.jar to LIBFILES in the port makefile, I think. > 2.fix script /usr/local/bin/opengrok like this: > set LIBFILES = "/usr/local/share/opengrok/lib/ant.jar > /usr/local/share/opengrok/lib/bcel-5.2.jar > /usr/local/share/opengrok/lib/jrcs.jar > /usr/local/share/opengrok/lib/lucene-core-4.7.1.jar > /usr/local/share/opengrok/lib/lucene-analyzers-common-4.7.1.jar > /usr/local/share/opengrok/lib/lucene-queryparser-4.7.1.jar > /usr/local/share/opengrok/lib/lucene-suggest-4.7.1.jar > /usr/local/share/opengrok/lib/swing-layout-0.9.jar" This is unnecessary after doing the step above, it will adjust opengrok during installation to include the missing file. I was going to ask for a patch but it seems in the end it's a one-line change plus a revbump.
*** Bug 181321 has been marked as a duplicate of this bug. ***
Created attachment 148023 [details] opengrok patch Can you apply this patch and tell me if it fixes opengrok to work out of the box?
(In reply to John Marino from comment #3) > Created attachment 148023 [details] > opengrok patch > > Can you apply this patch and tell me if it fixes opengrok to work out of the > box? As soon as I get a confirmation that the patch is the correct fix, I'll commit it. You got lucky that somebody picked up this PR so quickly with 150 PRs in triage right now.
shen.elf, why are you not responding? Are you unable to test this patch?
Created attachment 148182 [details] shen.elf's patch(1/2)
Created attachment 148183 [details] shen.elf's patch(2/2)
(In reply to John Marino from comment #5) > shen.elf, why are you not responding? Are you unable to test this patch? Sorry for that... I submitted my patches, check about them please.
But I asked you to test the patch that *I* submitted! What is wrong with attachment 148023 [details]? It contains fixes that your two patches do not. Did you understand what I wanted? I have a patch already waiting, I just wanted confirmation that it was a good patch before committing it. You didn't discuss my patch at all.
Each of your two patches contains something the first patch doesn't, but you completely skipped pkg-plist. Also, in the future, just put patches together into 1 attachment as I did.
A commit references this bug: Author: marino Date: Sat Oct 11 07:28:58 UTC 2014 New revision: 370625 URL: https://svnweb.freebsd.org/changeset/ports/370625 Log: devel/opengrok: Make the installed version runnable (and usable) PR: 194177 Reported by: shen.elf (gmail) Fixed by: marino and shen.elf Changes: head/devel/opengrok/Makefile head/devel/opengrok/files/opengrok.in head/devel/opengrok/pkg-plist
I committed a composite of the original patch and your two new patches. I trust this was the correct thing to do. Thanks for reporting the issue and helping with the solution.
(In reply to John Marino from comment #12) > I committed a composite of the original patch and your two new patches. I > trust this was the correct thing to do. > > Thanks for reporting the issue and helping with the solution. Thanks for your work and patient.