简体   繁体   中英

Getting error "Cannot access org.eclipse.jetty.util.component.ContainerLifeCycle"

I am trying to create client for Web socket implementation. Getting above error while doing setConnectTimeout.

import org.eclipse.jetty.websocket.client.WebSocketClient;
WebSocketClient client = new WebSocketClient();
client.setConnectTimeout(20);

Can someone let me know why this error is coming?

I had this message for missing the http dependency in maven:

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-http</artifactId>
    <version> 9.4.28.v20200408</version>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM