Posted from the forum:
Just to add a bit more info to this.
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 126.96.36.199
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?
most likely this issue is limited to windows because windows in some situation locks files exclusively.
correction, unrelated to windows, i see the same issue on macos
Ok the reason this fails is very simple. the httpclient-4.5.3.jar bundled is not a OSGi Bundle it is only a regular jar.
But you try to register it as an OSGi bundle as follows
But there is no OSGi bundle with this name (btw all OSGi bundle i have seen so far by apache always start with "org.apache." or similar).
We convert the httpclient library with help of this project to an OSGi bundle
Then use like this
So problem is that you try to use a non OSGi bundle as a OSGi bundle.
Lucee fails while trying to detect if that jar is valid or not.
So not loading itself fails, the validation fails.
We will fix that.
we will address the bad handling of trying to use a non OSGi bundle as a OSGi bundle with this ticket LDEV-1749. But the reason this extension fails is based on the extension itself.
after fixing we now get the following log output:
Because the extension does not contain OSGi bundles matching the requirements of your bundle "solr.search.extension" (https://github.com/patmoody/extension-solr/blob/master/source/java/src/META-INF/MANIFEST.MF) Lucee tries to download them from the update provider and fails because they don't exists. i will see if i find time to change the extension a little bit so it works.