It's all about the answers!

Ask a question

RTC 6.0.2 error using jetty

Rafael Rodriguez Montes (23013128254) | asked Jan 27 '17, 7:34 p.m.


When I start debugging getting the server up, I get this error:


Problem accessing /jazz/admin. Reason:

    loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@4afd0a39" previously initiated loading for a different type with name "org/apache/http/params/HttpParams" defined by loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@2ceadd57"

Caused by:

java.lang.LinkageError: loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@4afd0a39" previously initiated loading for a different type with name "org/apache/http/params/HttpParams" defined by loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@2ceadd57"
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(
    at java.lang.J9VMInternals.verify(
    at java.lang.J9VMInternals.initialize(
    at javax.servlet.http.HttpServlet.service(
    at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.mortbay.jetty.servlet.ServletHolder.handle(
    at org.mortbay.jetty.servlet.ServletHandler.handle(
    at org.mortbay.jetty.servlet.SessionHandler.handle(
    at org.mortbay.jetty.handler.ContextHandler.handle(
    at org.mortbay.jetty.webapp.WebAppContext.handle(
    at org.mortbay.jetty.handler.HandlerWrapper.handle(
    at org.mortbay.jetty.Server.handle(
    at org.mortbay.jetty.HttpConnection.handleRequest(
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
    at org.mortbay.jetty.HttpParser.parseNext(
    at org.mortbay.jetty.HttpParser.parseAvailable(
    at org.mortbay.jetty.HttpConnection.handle(
    at org.mortbay.thread.QueuedThreadPool$

Powered by Jetty://

Adam Wereszczynski commented Feb 17 '17, 6:19 a.m.

I have the same problem. Did you find a way to resolve it?

Ralph Schoon commented Feb 17 '17, 9:24 a.m.

 I have a setup that works without problems. Another workspace does not work at all. It shows the same error. I have no idea what the difference is and why one works and one does not.

Ian Wark commented Mar 10 '17, 5:44 a.m.

I also have an identical error. I looked at what may be the cause.. It seems to be a classloading issue with there being two of "org.apache.http.params.HttpParams" being loaded. If we can change the classloading order, I think we could fix this. I can find methods for Jetty that say they change the order.. but I am not sure how to implement such a change. For example, org.eclipse.jett .webapp.WebAppContext.setParentLoaderPriority(boolean) . Have you found a solution yet?

2 answers

permanent link
Matthew Inman Cochrane (3837) | answered Mar 22 '17, 12:53 p.m.

This is happening to me, too. Notably, however, this is happening after I upgraded from the old 6.0.2 SDK to the new one due to RTC Defect 390811 and tried to create a new Jetty server. I've noticed that there are also a couple of plugins missing from the "[RTCExt] Create RTC Test Database" launch when the new 6.0.2 SDK is set as the target platform.

My theory is that when, like Ralph has experienced, some workspaces (presumably created a while ago) have working 6.0.2 Jetty servers and workspaces with newly attempted 6.0.2 Jetty servers do not work, this is because the old workspaces' Jetty server databases were created using the "[RTCExt] Create RTC Test Database" launch when the old 6.0.2 SDK was in use (at the time, the "[RTCExt] Create RTC Test Database" launch saw all the bundles it needed, but the "[RTCExt] Jetty RTC Server" did not see all the bundles it needed due to the defect in the SDK) and the new workspace's Jetty server database was created with the new 6.0.2 SDK as the target platform either by the "[RTCExt] Create RTC Test Database" launch without all bundles visible or by skipping that workshop step and going straight to the "[RTCExt] Jetty RTC Server" launch (which should work on its own, as long as the server setup process is run with the ADMIN login), which sees all of its necessary bundles but for which the new 6.0.2 SDK has another issue.

There are certainly a lot of variables involved in that very long sentence. If I still had the old 6.0.2 SDK, I would be able to test this further. If anyone else has both available to them, that could be helpful. I'm wondering if a viable process would be to use the workshop's "[RTCExt] Create RTC Test Database" launch while pointing to the old 6.0.2 SDK, followed by changing the target platform to the new 6.0.2 SDK to run the "[RTCExt] Jetty RTC Server" launch.

permanent link
Ralph Schoon (63.2k33646) | answered Mar 10 '17, 6:43 a.m.

 As answer so that I can add some details. 

Ian, I don't have a solution for this. 

Adam pinged me with the problem and I went to my setup and everything worked fine. I have several workspaces (copied from the first  I created) and all worked for me. 
During our analysis I decided to re run the Unit Test to create the database. I did and afterwards the error came up for this workspace. All others still work.

I have no idea and can not explain the error. I don't think we can change the order of loading classes, because the Jetty configuration is built and in a Jar file and I don't see how we could change that.

The only option would be to create a defect and get developer involved.

Ian Wark commented Mar 17 '17, 8:44 p.m.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.