Error: "com.day.commons.httpclient.impl.ProxyContextListener..."

Issue

The Error.log shows the following error:

Unexpected error while instantiating listener com.day.commons.httpclient.impl.ProxyContextListener
java.lang.NoSuchMethodError:
com.day.commons.httpclient.impl.ProxySelector$1.setHostName(Ljava/lang/String;)V
at com.day.commons.httpclient.impl.ProxySelector$1.<init>(ProxySelector.java:64)
at com.day.commons.httpclient.impl.ProxySelector.<clinit>(ProxySelector.java:62)
at com.day.commons.httpclient.impl.ProxyWrapper.<clinit>(ProxyWrapper.java:21)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at
com.day.j2ee.servletengine.WebApplication.setupListeners(WebApplication.java:412)
at com.day.j2ee.servletengine.WebApplication.start(WebApplication.java:619)
at com.day.j2ee.servletengine.ServletContainer.start(ServletContainer.java:318)
at com.day.j2ee.servletengine.ServletEngine.start(ServletEngine.java:285)
at com.day.j2ee.server.Server.start(Server.java:227)
at com.day.j2ee.server.Server.main(Server.java:607)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.day.launcher.Bootstrap.run(Bootstrap.java:118)
at com.day.crx.quickstart.Quickstart.run(Quickstart.java:680)
at com.day.crx.quickstart.Main.<init>(Main.java:675)
at com.day.crx.quickstart.Main.main(Main.java:730)

Solution

This error can occur when more that one jar commons-httpclient exists under  crx-quickstart/server/runtime/0/_crx/WEB-INF/lib.

Move the jar commons-httpclient-3.0.jar to crx-quickstart. Or, create a directory "BAK" as a sibling to crx-quickstart and move the jar to the BAK directory and restart the server.

It doesn't matter where you put the jar file; it just needs to be moved.

 

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online