Upgrade from 4.5 to 5.2 failed


#1

I followed

The Lucee server admin (at http://host.name/lucee/admin/server.cfm) does not load.

The first error appears to be this, in the catalina.out.

Java 1.8 64bit on Amazon Linux.

SEVERE: Servlet.service() for servlet [CFMLServlet] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoClassDefFoundError: lucee/commons/collection/HashMapPro$KeySet
        at lucee.commons.collection.HashMapPro.keySet(HashMapPro.java:1110)
        at lucee.commons.collection.SyncMap.keySet(SyncMap.java:126)
        at lucee.commons.collection.SyncMap.keySet(SyncMap.java:126)
        at lucee.runtime.type.StructImpl.keys(StructImpl.java:165)
        at lucee.runtime.type.scope.CookieImpl.clear(CookieImpl.java:130)
        at lucee.runtime.type.scope.ScopeSupport.release(ScopeSupport.java:299)
        at lucee.runtime.type.scope.CookieImpl.release(CookieImpl.java:320)
        at lucee.runtime.PageContextImpl.release(PageContextImpl.java:577)
        at lucee.runtime.CFMLFactoryImpl.releaseLuceePageContext(CFMLFactoryImpl.java:210)

#2

Which version of lucee 5.2 did you try and upgrade to?

did you try restarting tomcat?


#3

The latest one on the download page. The upgrade instructions don’t give a particular version.

What do you mean by restart Tomcat ? Yes, I had to start Tomcat after updating the .jar files…


#4

can you explicitly state the version numbers of java, tomcat and lucee you are running?


#5

Java 1.8.0_66
Tomcat is whatever was bundled with Lucee 4.x - how do I find out ?
Upgrade to lucee-5.2.8.50.jar from 4.5.5.015 (as reported by server admin)

Update: I re-did the .jar removal/add steps, and restarted Lucee twice via the init script.

Now the admin loads, but says

HTTP Status 500 - Servlet.init() for servlet CFMLServlet threw exception

type Exception report

message Servlet.init() for servlet CFMLServlet threw exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet CFMLServlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)

root cause

java.lang.NoClassDefFoundError: lucee/aprint
lucee.runtime.config.XMLConfigWebFactory.createFileFromResourceCheckSizeDiffEL(XMLConfigWebFactory.java:1034)
lucee.runtime.config.XMLConfigWebFactory.createContextFiles(XMLConfigWebFactory.java:1150)


#6

Is this message from catalina.out helpful ?

Aug 10, 2018 10:39:02 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.59
java.lang.RuntimeException: engine is not initalized, you must first call getInstance(ServletConfig)
at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:190)
at lucee.loader.servlet.LuceeServletContextListener.contextInitialized(LuceeServletContextListener.java:23)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[DONE]


#7

first thing to try is updating your java version to 1.8 181, java 1.8 v66 is really old

as is your tomcat 7.0.59, released way back in 2015-02-04, latest in the 7 series is v7.0.90 2018-07-06

Generally speaking, I would always recommend just doing a fresh install instead of attempting to upgrade from 4.5 as the bundled java and tomcat are usually 3 years old and also need updating


End of Life for Lucee 4.5
#8

So how are you meant to upgrade 4.x to 5.x then ? Including migrating all existing settings ?
Sounds like you are saying the upgrade instructions are incorrect, and you have to rip and replace to upgrade from v4 to v5.


#9

it’s just that there is no automated upgrade available for the bundled tomcat and java versions, you need to do that yourself manually and it maybe easier to do a fresh install.


#10

It’s not easier :wink:
Is this still the best way to upgrade Tomcat ?


#11

I believe so, but only for minor releases, like your 7.0.59 to 7.0.90


#13

I updated Tomcat to the latest 7.x

Still get just a blank white page from server.cfm, with nothing in the catalina.out until I removed the Jasper setting.

Now I’m back again at a 500 error because of “java.lang.NoClassDefFoundError: lucee/aprint”


#14
Aug 10, 2018 1:22:04 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [CFMLServlet] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoClassDefFoundError: lucee/commons/collection/HashMapPro$KeySet
        at lucee.commons.collection.HashMapPro.keySet(HashMapPro.java:1110)

And indeed, when I do

unzip -t lib/lucee-5.2.8.50.jar |grep HashMapP

or

unzip -t /opt/lucee/lib/lucee-5.2.8.50.jar |grep aprint

there is no such class. Where is it meant to be ?


#15

Those are some odd errors indeed. It seems like a jar isn’t getting loaded. It’s possible the classes aren’t showing up because they’re not in the root of the jar. The Lucee 5 jar has a a bunch of bundled binaries inside of it which represent OSGI bundles and the Lucee core jar, all of which get extracted and classloaded. Your grep likely didn’t find it since it’s in a nested archive.

Perhaps @micstriit will recognize some of those errors. I can’t say I’ve had that happen before.

As far as copying your settings, if you do need to go to a new install, you can use CFConfig to export the settings from your old server into a JSON file and then re-import into a fresh installation.

https://cfconfig.ortusbooks.com/introduction/getting-started-guide


#16

@thefalken of the first stacktrace you have posted i think the most important part is missing, i’m assuming there is a “caused by” further below otherwise the exception would make no sense at all.
if it is only this, it would complain that it does not see it’s own sub class that is inside that class.


#17

catalina.out says as follows, and seemingly for every file in WEB-INF…

The folder exists, rwx by the owner (web) which is the same user ‘ps’ reports Lucee is running as.

2018-08-15 12:43:39.941 write file:/wwwroot/WEB-INF/lucee/context/admin/logging/appender/Appender.cfc
2018-08-15 12:43:39.942 java.lang.NullPointerException
        at org.apache.felix.framework.BundleRevisionImpl.getResourceLocal(BundleRevisionImpl.java:499)
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1611)
        at org.apache.felix.framework.BundleWiringImpl.getResourceByDelegation(BundleWiringImpl.java:1457)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.getResource(BundleWiringImpl.java:2586)
        at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1307)
        at java.lang.Class.getResourceAsStream(Class.java:2223)
        at lucee.runtime.config.XMLConfigFactory.createFileFromResource(XMLConfigFactory.java:282)
        at lucee.runtime.config.XMLConfigFactory.createFileFromResourceEL(XMLConfigFactory.java:302)
        at lucee.runtime.config.XMLConfigFactory.create(XMLConfigFactory.java:321)
        at lucee.runtime.config.XMLConfigFactory.create(XMLConfigFactory.java:312)
        at lucee.runtime.config.XMLConfigWebFactory.createContextFiles(XMLConfigWebFactory.java:1322)
        at lucee.runtime.config.XMLConfigWebFactory.newInstance(XMLConfigWebFactory.java:280)
        at lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(CFMLEngineImpl.java:816)
        at lucee.runtime.engine.CFMLEngineImpl.addServletConfig(CFMLEngineImpl.java:693)
        at lucee.loader.engine.CFMLEngineWrapper.addServletConfig(CFMLEngineWrapper.java:88)
        at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:219)
        at lucee.loader.servlet.RestServlet.init(RestServlet.java:42)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1230)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1174)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1066)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5409)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5707)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1017)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:993)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:712)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:2003)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Browser itself says

Type Exception Report

Message Servlet.init() for servlet CFMLServlet threw exception

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Servlet.init() for servlet CFMLServlet threw exception
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1136)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)

Root Cause

java.lang.NoClassDefFoundError: lucee/runtime/crypt/BlowfishEasy
	lucee.runtime.config.ConfigWebUtil.decrypt(ConfigWebUtil.java:84)
	lucee.runtime.config.XMLConfigWebFactory.loadDataSources(XMLConfigWebFactory.java:2056)
	lucee.runtime.config.XMLConfigWebFactory.load(XMLConfigWebFactory.java:469)
	lucee.runtime.config.XMLConfigWebFactory.newInstance(XMLConfigWebFactory.java:283)
	lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(CFMLEngineImpl.java:816)
	lucee.runtime.engine.CFMLEngineImpl.addServletConfig(CFMLEngineImpl.java:693)
	lucee.loader.engine.CFMLEngineWrapper.addServletConfig(CFMLEngineWrapper.java:88)
	lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:219)
	lucee.loader.servlet.CFMLServlet.init(CFMLServlet.java:42)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1136)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)