Closed chrisdpeters closed 8 years ago
Ahh, it looks like the extension isn't deploying properly to begin with.
When I inspect the server
directory, I see an entry like this
/opt/lucee/server/lucee-server/deploy/failed-to-deploy/cfspreadsheet-lucee-5.lex
I wonder why failed-to-deploy
.
The other piece of related info that I can find is in /opt/lucee/server/lucee-server/context/logs/deploy.log
:
"Severity","ThreadID","Date","Time","Application","Message"
"ERROR","Thread-8","07/12/2016","03:25:41","","Extension;/usr/local/tomcat/temp/poi-3.11-20141221.jar (No such file or directory);lucee.runtime.exp.NativeException: /usr/local/tomcat/temp/poi-3.11-20141221.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:130)
at lucee.runtime.osgi.BundleFile.<init>(BundleFile.java:70)
at lucee.runtime.osgi.BundleFile.<init>(BundleFile.java:66)
at lucee.runtime.config.XMLConfigAdmin.updateJar(XMLConfigAdmin.java:1050)
at lucee.runtime.extension.RHExtension.<init>(RHExtension.java:371)
at lucee.runtime.config.XMLConfigAdmin.updateRHExtension(XMLConfigAdmin.java:4569)
at lucee.runtime.config.XMLConfigAdmin._updateRHExtension(XMLConfigAdmin.java:4557)
at lucee.runtime.config.DeployHandler.deploy(DeployHandler.java:80)
at lucee.runtime.engine.Controler.control(Controler.java:204)
at lucee.runtime.engine.Controler.access$000(Controler.java:59)
at lucee.runtime.engine.Controler$ControlerThread.run(Controler.java:109)
Caused by: java.io.FileNotFoundException: /usr/local/tomcat/temp/poi-3.11-20141221.jar (No such file or directory)
Using Lucee 5.0.0.252.
re: adding the mapping to Application.cfc ... I have not found a way to do so yet.
Chris - I just downloaded latest express from Lucee.org (5.0.0.252), spun it up, added the component mapping in admin and dropped a fresh cfspreadsheet-lucee-5.lex from this Github repo and it deployed without error?
I have only tried on express so far as I have not had time to play with full Tomcat install, etc. I am also on Windows FWIW.
I will try to experiment when I have some more time. It seems as though Lucee is having issues extracting the poi jars from the "jars" folder inside the .lex file though...
When I was using the .lex
file from Leftbower/cfspreadsheet-lucee#2, I was able to put it in the web context auto-deploy folder, and Lucee would install it automatically. No need to log in anywhere to configure a mapping.
Unfortunately, when I upgraded to 5.0.0.252, that file stopped working, and now your file doesn't work either. Right when we were about to migrate our biggest app off of ACF. Now we're stuck there again. :(
My goal is to run without any Lucee Administrator, so logging into that is not an option. Docker rebuilds the entire image on each deploy, so I don't want a manual step of logging in to a Lucee Administrator to install the extension after every single deployment.
Can you think of any workarounds for this so we can get up and running?
Chris - as mentioned in the readme, this v5 extension only works for the server context, not the web context, until LDEV-797 is fixed.
As for the server deploy, unfortunately, it appears that the component directory is mapped by default in Lucee for the web contexts but not the server contexts, so it needs to be added. Perhaps there is a way to add the mapping programmatically via the cfadmin tag?
Alternatively, I believe that the mapping is saved in the lucee-server.xml file, so you could just manually add it in there ahead of time?
I've tried setting it up for auto-deploy in both web and server contexts, both with failure. If you see the details in my 2nd comment above, you'll see that I'm attempting to setup in the server context.
I'll probably take a moment to compare your extension vs. @paulklinkenberg's to see if there's something that you can be doing differently in yours to get it working for auto-deployment.
@chrisdpeters At the end of the day these are just a few files being copied to specific directories upon deployment. So, while not elegant, a simple script to manually copy these over is all you need to setup to get going programmatically.
I do need to see what issues you are having with the failed deploy on Tomcat installs, though. As I said, I've only worked with Lucee 5 Express so far and haven't had the bandwidth to test and explore multiple installations yet. However, I am not sure why a tomcat install would fail to deploy as above as the structure should be the same...
@chrisdpeters I just did a fresh install of Tomcat 8.0.36 and used the Lucee 5.0.0.252 war download. The .lex file deployed without issue in this setup as well. So now I have it working on multiple systems with Lucee Express and also custom Tomcat/Lucee... deploys right out of the box as it's supposed to.
The only thing I have not tested on is a Linux or MAC config as we are all Windows here. Perhaps there is a linux permissions issue you are running into?
@chrisdpeters I have updated this extension to work in both server and individual web contexts. I've also included the mapping as a .lar file so no longer any need to log in anywhere to configure a mapping. Finally, I converted the jars to an OSGI bundle which seems to have fixed further auto-deploy issues such as you were seeing above.
@Leftbower Works great when auto-deployed into the server context in Docker. 👍
Step 2 of the instructions read thusly:
Is there a way to accomplish this perhaps in
Application.cfc
?I've tried this:
And this:
But all I get is our friendly error,
undefined tag [cfspreadsheet]
.