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)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:154)
at java.util.jar.JarFile.<init>(JarFile.java:118)
at lucee.runtime.osgi.BundleInfo.<init>(BundleInfo.java:91)
at lucee.runtime.osgi.BundleFile.<init>(BundleFile.java:42)
at lucee.runtime.osgi.BundleFile.<init>(BundleFile.java:38)
at lucee.runtime.config.XMLConfigAdmin.updateJar(XMLConfigAdmin.java:1047)
at lucee.runtime.config.XMLConfigAdmin.updateRHExtension(XMLConfigAdmin.java:4842)
at lucee.runtime.config.XMLConfigAdmin.updateRHExtension(XMLConfigAdmin.java:4789)
at lucee.runtime.config.XMLConfigAdmin._updateRHExtension(XMLConfigAdmin.java:4769)
at lucee.runtime.config.DeployHandler.deploy(DeployHandler.java:82)
at lucee.runtime.engine.Controler.control(Controler.java:213)
at lucee.runtime.engine.Controler.access$000(Controler.java:59)
at lucee.runtime.engine.Controler$ControlerThread.run(Controler.java:110)
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 5.2.4.37
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.
So, is it possible to deploy these libraries as a bundle? If I just copy the necessary files into the lib folder I have all sorts of problems with dependencies when working with SorlJ
The way I see it this is a bug with OSGI? Correct me if I’m wrong.
The WebSocket extension, for example, is made of 2 OSGi bundles and 1 regular JAR. The 2 OSGi bundles were deploying with no problem. It was only the regular JAR that had the issue.
So, no, I do not think that there is a bug with OSGi here, but I really can’t tell without seeing your files etc.
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?