This is not strictly an issue with the module itself, but search_api_attachments_requirements() in .install reports that it cannot execute a java command. It returns an error,
Error occurred during initialization of VM
Unable to load native library: libjava.jnilib
when it runs,
exec('java -version');
When I run it on command line, there is no problem. It seems it is either permission or path issue. Could you help with resolving the issue? I am on OS X 10.6.
Thanks.
Ki
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | requirements_mamp-1257654-5.patch | 692 bytes | tauno |
Comments
Comment #1
ki commentedI have found a fix and share it for others who may have similar situation.
Inserting export command did the trick. According to http://stackoverflow.com/questions/278868/calling-java-from-php-exec, running JVM under MAMP, which I use, fails without the patch. This may not be an issue with hosting; I will see.
Ki
Comment #2
ki commentedI see that class method extract_tika() in callback_attachments_settings.inc already contains code checking for MAMP. So same checking could be implemented in .install since the issue is already known.
Comment #4
BarisW commentedThanks, same here. Might be an idea to change to hook_requirements()?
I changed
exec(variable_get('apachesolr_attachments_java', 'java') . ' -version > ' . $tmp . ' 2>&1');into:
exec('export DYLD_LIBRARY_PATH=""; ' . variable_get('apachesolr_attachments_java', 'java') . ' -version > ' . $tmp . ' 2>&1');And now it works. I'll re-activate this thread as it wasn't solved. The maintainer may decide what to do with it.
Comment #5
tauno commentedPatch to match how java is called in extract_tika()
Comment #6
lotyrin commentedComment #7
izus commentedassigning to me for review & merge
Comment #8
izus commentedHi,
merged in 7.x-1.x
Thank you all !
Comment #9
izus commented