You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Radim Kolar <hs...@filez.com> on 2012/09/22 01:17:50 UTC

solr4.0 compile: Unable to create javax script engine for javascript

I cant compile SOLR 4.0, but i can compile trunk fine.

ant create-package fails with:

BUILD FAILED
/usr/local/jboss/.jenkins/jobs/Solr/workspace/solr/common-build.xml:229: 
The following error occurred while executing this line:
/usr/local/jboss/.jenkins/jobs/Solr/workspace/solr/common-build.xml:279: 
Unable to create javax script engine for javascript

Total time: 1 minute 19 seconds


I tried google and discovered this: 
http://stackoverflow.com/questions/9663801/freebsd-ant-javax-script-engine

Documentation for ant - https://ant.apache.org/manual/Tasks/script.html 
it requires some external library. I placed bsf-all-3.1.jar into ant lib 
directory but it still fails.

Can you please update document 
http://wiki.apache.org/solr/HowToCompileSolr?highlight=%28compile%29 
with information what libraries are needed?

Re: solr4.0 compile: Unable to create javax script engine for javascript

Posted by Radim Kolar <hs...@filez.com>.
> I believe the problem is not that you need BSF -- because you are using
> java6 (you have to to compile Solr) so BSF isn't needed.  The problem (i
> think) is that FreeBSD's JDK doesn't include javascript by default - i
> believe you just need to install the rhino "js.jar"....
You are right. FreeBSD OpenJDK do not include Javascript.

I finally got it work, commented at 
https://issues.apache.org/jira/browse/LUCENE-4415

Re: solr4.0 compile: Unable to create javax script engine for javascript

Posted by Chris Hostetter <ho...@fucit.org>.
: I cant compile SOLR 4.0, but i can compile trunk fine.

Hmmm... that's suprising, the part of hte build file you pointed out as 
causing you problems on 4x also exists in trunk.

: Documentation for ant - https://ant.apache.org/manual/Tasks/script.html it
: requires some external library. I placed bsf-all-3.1.jar into ant lib
: directory but it still fails.

I believe the problem is not that you need BSF -- because you are using 
java6 (you have to to compile Solr) so BSF isn't needed.  The problem (i 
think) is that FreeBSD's JDK doesn't include javascript by default - i 
believe you just need to install the rhino "js.jar"....

http://stackoverflow.com/questions/4649519/jvm-missing-rhino

Or, you should be able to work arround this by specifying 
"-Dlucene.javadoc.url=..." on the command line.  (that's all the script is 
used for -- to compute that)

I've opened LUCENE-4415 to try and address this one way or another...

https://issues.apache.org/jira/browse/LUCENE-4415



-Hoss