Non-empty onSessionStart gives javax.servlet.http.HttpUpgradeHandler not found by lucee.core
Description
Environment
Using lucee jar with system java and tomcat.
tomcat-7.0.54-2.el7_1.noarch
tomcat-servlet-3.0-api-7.0.54-2.el7_1.noarch
java-1.8.0-openjdk-1.8.0.91-0.b14.el7_2.x86_64
Attachments
- 13 Jun 2016, 10:00 pm
relates to
Activity
tom chiverton 1 November 2018 at 10:26
Ack - happened on a 4.5 upgrade to 5.x today too.
I had to replace /opt/lucee/tomcat/lib/servlet-api.jar with the one from https://groups.google.com/d/msg/lucee/qRXtFzj03Lc/tYoRjuUKBQAJ ot any code like this line in Taffy```GetPageContext().getRequest().getHeader("Authorization")``` would throw.
The original .jar I replaced would have come from the latest Tomcat 7.x on their site.
Juan Aguilar 18 July 2016 at 14:30
Pardon the ignorance. Not quite sure how to re-open the ticket (unless this comment re-opens it).
I'm running:
Version Lucee 5.0.1.28-SNAPSHOT
Servlet Container Apache Tomcat/7.0.70
Java 1.8.0_91 (Oracle Corporation) 64bit
The following code:
<cfscript>
try {
tmpURL = getPageContext().getRequest().getRequestURL();
writeDump(tmpURL);
}
catch (Any excpt) {
writeDump(excpt);
}
</cfscript>
Throws the following error:
Message: javax.servlet.http.HttpUpgradeHandler
additional.cause: java.lang.ClassNotFoundException
StackTrace: lucee.runtime.exp.NativeException: javax.servlet.http.HttpUpgradeHandler at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:1010) at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1579) at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1509) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetPublicMethods(Class.java:2902) at java.lang.Class.getMethods(Class.java:1615) at lucee.runtime.reflection.storage.SoftMethodStorage.store(SoftMethodStorage.java:68) at lucee.runtime.reflection.storage.SoftMethodStorage.getMethods(SoftMethodStorage.java:50) at lucee.runtime.reflection.Reflector.getMethodInstanceEL(Reflector.java:483) at lucee.runtime.reflection.Reflector.callMethod(Reflector.java:845) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:774) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1576) [...]
Michael Offner 30 June 2016 at 07:05
please reopen ticket if it still happen in your env
Michael Offner 30 June 2016 at 07:03
Michael Offner 30 June 2016 at 06:02
what exactly happens here?
/opt/rh/httpd24/root/var/www/websites/think-soil.com/html/Application.cfc:378
Details
Details
Assignee
Reporter
Priority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
I updated my Lucee installation to 4.5 to 5 recently.
The error pattern was that the first load of a page would produce the error javax.servlet.http.HttpUpgradeHandler not found by lucee.core.
There was a mailing list suggestion that this was an upgrade problem, and replacing the tomcat-servlet-api.jar would make the problem go away.
A fresh install of lucee demonstrated that the problem wasn't isolated to upgrade installs for me. So I replaced the system tomcat-servlet-api.jar with the one from the mailing list.
This did not help my situation. The problem would always come back – once – every morning on my development machine.
The backtrace showed a line in Application.cfc inside onSessionStart. The code was only checking a server variable and setting a session variable. Since this was trivial to work around, I removed it. My problem went away.