Running scheduled tasks over SSL causes java.lang.NoClassDefFoundError:

Description

Create a scheduled task to an HTTPS URL and attempt to execute it.
This is after manually updating the two jars that aren't mentioned in the release notes in the admin.

You get this exception logged :

Exception in thread "Thread-10" java.lang.NoClassDefFoundError: org/apache/http/config/Lookup
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
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.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.privateGetMethodRecursive(Class.java:3058)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at lucee.commons.net.http.httpclient4.HTTPEngine4Impl.execute(HTTPEngine4Impl.java:415)
at lucee.commons.net.http.httpclient4.HTTPEngine4Impl._invoke(HTTPEngine4Impl.java:252)
at lucee.commons.net.http.httpclient4.HTTPEngine4Impl.get(HTTPEngine4Impl.java:112)
at lucee.commons.net.http.HTTPEngine.get(HTTPEngine.java:86)
at lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:108)
at lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)
Caused by: java.lang.ClassNotFoundException: org.apache.http.config.Lookup
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 24 more

Environment

Java 1.8 64bit on Ubuntu 14.04 LTS

Activity

Show:

Pothys - MitrahSoft 15 March 2018 at 11:27

Closed this ticket as per reporter's comment.

tom chiverton 14 March 2018 at 13:48

Seems to have started working at some point in later 4.x releases

Pothys - MitrahSoft 22 February 2018 at 11:09

Hi , ,

I've analyzed this ticket & I set up SSL configuration on my local & tested with Lucee 4.5.5.006 version. I couldn't able to reproduce the issue my scheduled tasks running fine for me over https URL.

Can you please check once again & post the result here. It helps me to close this ticket

Former user 23 July 2015 at 09:56

I'm afraid that is a bit outside of where I've got with debugging Lucee (having only started poking around in Java relatively recently) - I believe that the way this is handled has changed within Lucee 5 though due to the changes that were made for OSGi.

I'll have a look around though but I'm sure if there was a simple way then it would have already been done disappointed face

tom chiverton 23 July 2015 at 09:52

On the dev release, CFHTTP fails with the same error.
On the current stable it is OK but the admin fails with the exception below.

Updated those three jars, and on the dev release, CFHTTP is now working, and so is the admin.

Can I suggest you either find a way to update these jars with the updater, or do a much better job of spreading the manual step around ? It's not listed in the 'changes' area of the admin, for instance, and if the server were to auto update you'd not see it at all anyway.

Stable admin stack trace :

"ERROR","Thread-17","07/23/2015","10:42:35","","schedule task:t;peer not authenticated;javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at lucee.commons.net.http.httpclient4.HTTPEngine4Impl.execute(HTTPEngine4Impl.java:416)
at lucee.commons.net.http.httpclient4.HTTPEngine4Impl._invoke(HTTPEngine4Impl.java:252)
at lucee.commons.net.http.httpclient4.HTTPEngine4Impl.get(HTTPEngine4Impl.java:112)
at lucee.commons.net.http.HTTPEngine.get(HTTPEngine.java:86)
at lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:108)
at lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)

Fixed

Details

Assignee

Reporter

Priority

Labels

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

Affects versions

Created 23 July 2015 at 09:28
Updated 15 March 2018 at 11:27
Resolved 15 March 2018 at 11:27

Flag notifications