We are looking at upgrading our current Solr 4.6 SolrJ integration with Lucee to the latest Solr 7.1.0
I’m not sure if it is necessary to build a complete Lucee extension for this.
I’ve had some success just placing the JAR files in the server/lib folder and been able to reference individual ones directly but there are probably some dependency issues doing it that way. I’m not had much success with SolrInputDocument as a start.
The Solr documentation references ant using ivy, maven pom.xml, gradle or through pathing the classpath. Does anyone have any recommendations to the most suitable method of integration?
I’ve created an extension using the ant build mechanism as described in:
I based my extension on the lucene example:
Here is a starter repository for the work I’ve done:
When I deploy the generated .lex file it is failing on the 3rd JAR file with the error:
"ERROR","Thread-30","11/14/2017","16:17:49","","Extension;C:\Users\pjmoody\AppData\Local\Temp\httpclient-4.5.3.jar (The system cannot find the file specified);lucee.runtime.exp.NativeException: C:\Users\pjmoody\AppData\Local\Temp\httpclient-4.5.3.jar (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
Caused by: java.io.FileNotFoundException: C:\Users\pjmoody\AppData\Local\Temp\httpclient-4.5.3.jar (The system cannot find the file specified)
This looks similar to a problem reported by @John_Farrar on @21Solutions Web Sockets extension and reportedly fixed by an upgrade to Lucee.
I am running the latest version of Lucee 220.127.116.11
Is anyone able to help? I figure this could be a problem with OSGI and that I need to create a ticket in Jira?
Perhaps there is an easier way of deploying this as in my first post above?
In Lucee you really do not need JavaLoader, you can specify the path to the jar file as the 3rd argument of
createObject("java", className, path)
But OSGi bundles do not suffer from the issue described by @John_Farrar in the WebSocket installer. The issue there is with a regular jar that must be in the classpath (issue is resolved for the next version of Tomcat). OSGi bundles should deploy properly.
The link to the files is included in discussions above.
It looks as though I might have come up with a workaround solution using this.javaSettings and applying a specific path. It would be good to be able to load it as an extension though.
The issue when loading files through OSGI is the file not found problem.
I have raised a Jira issue for this as discussed above.
Perhaps @micstriit can take a look?