2

I was trying to setup the Eclipse development environment for Apache Sling by following the instructions at https://sling.apache.org/documentation/development/ide-tooling.html

I got an error while trying to connect to an external Apache Sling server.

see screen shot below

enter image description here

I got following the tracing from the Eclipse logs(workspace/.metadata/.log)

!MESSAGE An internal error occurred during: "Starting Sling Server (external) at localhost".
!STACK 0
java.lang.LinkageError: org/apache/commons/httpclient/auth/AuthScope
    at org.apache.commons.httpclient.HttpMethodDirector.authenticateHost(HttpMethodDirector.java:273)
    at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:234)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at org.apache.sling.ide.osgi.impl.HttpOsgiClient.getBundleVersion(HttpOsgiClient.java:71)
    at org.apache.sling.ide.osgi.impl.TracingOsgiClient.getBundleVersion(TracingOsgiClient.java:48)
    at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.installBundle(SlingLaunchpadBehaviour.java:162)
    at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.start(SlingLaunchpadBehaviour.java:111)
    at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadLaunchConfigurationDelegate.launch(SlingLaunchpadLaunchConfigurationDelegate.java:45)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:731)
    at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3541)
    at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3477)
    at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:367)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I am working on Eclipse 4.2, Maven 3.0.5, ubuntu 14.04 LTS and Oracle JAVA 8. and the sling I am using is "org.apache.sling.launchpad-8.jar"

does anyone have any idea?

pleas advise

thanks

George Wang
  • 765
  • 2
  • 13
  • 28
  • Sounds to me like an OSGi runtime problem with the commons-httpclient bundle. I couple of questions to ask: - do you use the latest version of the IDE Tooling ( 1.1.0 ) ? - can you upload the list of bundles from your Eclipse installation? - can you try a newer version of Eclipse? The latest version is tested and built against Eclipse Luna – Robert Munteanu Apr 28 '16 at 11:01
  • Hello, Robert, to your questions: yes, I am using the latest Sling IDE Tooling (1.1.0); yes, I have uploaded/install the bundles from the eclipse market using the "install new software..." under the "help" in eclipse. yes, I am using the Eclipse luna (4.4.2) – George Wang Apr 29 '16 at 07:01
  • I notice that there were some extra information for the first time I try to connect with the sling. It says --- An internal error occurred during: "Starting Sling Server (external) at localhost". loader constraint violation: loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated loading for a different type with name "org/apache/commons/httpclient/auth/AuthScope" – George Wang Apr 29 '16 at 07:06
  • just an quick update, I have used another PC, install a new eclipse. and it works, so there must have be some conflicts with one of the projects or tools that reside within the same Eclipse work spce... – George Wang Apr 29 '16 at 08:17
  • glad to hear it works for you. Would still be interested to see the list of bundles in the Eclipse installation that does not work. Can you upload the information from Help → About Eclipse → Installation Details → Configuration somewhere? – Robert Munteanu Apr 29 '16 at 19:32
  • Hello, Robert, I have sent you an email at your registered email account with an attachment of the eclipse config of my pc. hope it helps – George Wang Apr 30 '16 at 01:40

0 Answers0