Solution: Missing datasources after Lucee conversion

662 views
Skip to first unread message

Jake Hand

unread,
Feb 10, 2015, 3:19:27 PM2/10/15
to lu...@googlegroups.com
Just wanted to post a quick solution for an issue I encountered during a Lucee conversion, in case anyone else runs into it.

Essentially what had happened was we followed the conversion guide to convert a Railo 4 on Tomcat installation to Lucee, but none of the sites on the server had their datasources after the conversion. When we checked each site's WEB-INF folder, it still had a railo subfolder instead of one named lucee. Within the WEB-INF/railo folder for each site there was a file named lucee-web.xml.cfm but it didn't have any of the settings from the corresponding railo-web.xml.cfm file.

It turns out the problem was this init-param setting for the GlobalCFMLServlet within Tomcat's web.xml:

    <init-param>
        <param-name>railo-web-directory</param-name>
        <param-value>{web-root-directory}/WEB-INF/railo/</param-value>
        <description>Railo Web Directory directory</description>
    </init-param>


When we commented that out and restarted Tomcat Lucee handled the conversion for each site (context) as expected. Each site ended up with a WEB-INF/lucee folder, and the lucee-web.xml.cfm file had all the datasources and other settings in-tact. This might elicit a "Well, duh." response from some of the more experienced users out there, but I wanted to share in case anyone else encounters a similar issue.

Best,

Jake

Michael Offner

unread,
Feb 10, 2015, 3:22:34 PM2/10/15
to lu...@googlegroups.com
Thx for the input, we already are working on a solution for that, this week will come a fix for this.

Micha
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d1dfc4fd-9238-4fce-b20c-d6e6ed5a67fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Tully

unread,
Feb 20, 2015, 11:16:22 PM2/20/15
to lu...@googlegroups.com
I have this same issue, and can't update our production servers until its fixed. Sadly, the solution you suggested did not work for me.

Robert Munn

unread,
Feb 21, 2015, 5:07:58 AM2/21/15
to lu...@googlegroups.com
I built a version from source to do a clean war deployment on Tomcat. I’ll blog about it tomorrow if I can, here are some suggestions for places to check your config. You should be able to do the same thing with the war download from the Lucee site.

tomcat/conf/web.xml: make sure you have your config updated. In this case I took the Railo definitions and did search/replace Railo->Lucee and railo->lucee.

<servlet>
   <servlet-name>LuceeCFMLServlet</servlet-name>
   <description>CFML runtime Engine</description>
   <servlet-class>lucee.loader.servlet.CFMLServlet</servlet-class>
   <init-param>
<param-name>configuration</param-name>
<param-value>/WEB-INF/lucee</param-value>
<description>Configuration directory</description>
</init-param>   
   <!-- init-param>
<param-name>lucee-server-root</param-name>
<param-value>.</param-value>
<description>directory where lucee root directory is stored</description>
</init-param -->
   <load-on-startup>1</load-on-startup>
</servlet>   
<servlet>
   <servlet-name>LuceeAMFServlet</servlet-name>
   <description>AMF Servlet for flash remoting</description>
   <servlet-class>lucee.loader.servlet.AMFServlet</servlet-class>
   <load-on-startup>1</load-on-startup>
</servlet>   
<servlet>
   <servlet-name>LuceeFileServlet</servlet-name>
   <description>File Servlet for simple files</description>
   <servlet-class>lucee.loader.servlet.FileServlet</servlet-class>
   <load-on-startup>2</load-on-startup>
</servlet>

tomcat/conf/catalina.properties:


#common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/railo,${catalina.home}/railo/*.jar
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lucee,${catalina.home}/lucee/*.jar

I created ${catalina.home}/lucee by extracting the war and copying the contents of WEB-INF/lib into the tomcat/lucee folder.

tomcat/conf/setenv.sh

JAVA_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=128m  -javaagent:${CATALINA_HOME}/lucee/lucee-inst.jar”;

Go into tomcat/webapps. Remove ./ROOT, rename the lucee war file ROOT.war, copy it into ./webapps. Start Tomcat. Goto http://servername:8080//lucee/admin/server.cfm. (Unless you are running Tomcat on another port, e.g. 8888, or proxying through Apache/Nginx, etc.).

Remove the old WEB-INF folder from any other web doc roots. 

This is very preliminary and may contain mistakes, when I can I will do a blog and video post with more complete instructions.



--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Jason Tully

unread,
Feb 24, 2015, 1:33:47 PM2/24/15
to lu...@googlegroups.com
I still can't get the data sources to migrate over correctly. The solution from Jake did not work for me. I completely uninstalled Railo to have a fresh start, and I used the latest lucee-4.5.1.000-pl0-windows-installer.exe to have a complete fresh base. Everything setup fine. I then pulled down the site which was running on Railo, and it still did not migrate the datasources into the Lucee web admin. With 50+ Railo sites in production, there is no way I can go in and re-setup the data sources manually. Is there any solution for this that anyone has gotten to work?

Thanks!


On Tuesday, February 10, 2015 at 3:19:27 PM UTC-5, Jake Hand wrote:

Robert Munn

unread,
Feb 24, 2015, 6:32:16 PM2/24/15
to lu...@googlegroups.com
I have not had the installer update datasources to Lucee either, but I don’t have to deal with that many sites, so it hasn’t been an issue.

Does anyone know if there is a way to expose the code that is supposed to be migrating the datasources so it could be called manually? 

WEB-INF/lib/lucee-server/context/lucee-server.xml holds admin settings like datasources. Not sure where else they are held, if anywhere, or whether you could copy them by copying the XML files or whether you need to copy them programmatically using the admin api or something else. 





--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Jason Tully

unread,
Feb 24, 2015, 8:53:54 PM2/24/15
to lu...@googlegroups.com
Okay, So I just updated to 4.5.1.003 thru the server admin, and now the datasources and mail settings are all migrating correctly from Railo. So looks like that update did the trick. The railo folder under WEB-INF is now being converted to "lucee" as well. 

Michael Offner

unread,
Feb 25, 2015, 2:29:38 AM2/25/15
to lu...@googlegroups.com
The simplest solution is to search for the old railo-web.xml.cfm files (if you have defined your data sources in the web admin or the railo-server.xml
Then look for <data-source> tag in this file, simply copy all tags over to the equivalent
lucee-server.xml | lucee-web.xml.cfm

Micha
--
Reply all
Reply to author
Forward
0 new messages