Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade cometd library to version 8 #107

Open
kubav182 opened this issue Jun 14, 2024 · 13 comments
Open

Upgrade cometd library to version 8 #107

kubav182 opened this issue Jun 14, 2024 · 13 comments

Comments

@kubav182
Copy link

We need to upgrade libraries like spring boot etc. and we are forced to use jakarta packages so we need new version of jetty and cometd library.

Is upgrading to newer version of cometd in plan or is this project dead? Cometd is now at version 8, but this project is using version 4 out of support long time ago. If we stay to this version we are forced to use out of support spring versions etc.

@vladokrsymphony
Copy link

We have the same problem on our side, because we try to migrate to java 17.

@kubav182
Copy link
Author

we forked this project to our private git repo and private packages repo a few years ago, so finally we made the update on our own, I could create PR, but I'm afraid this project is not maintained

@vladokrsymphony
Copy link

We did the same on our side and we forked the project.
If you could open a pull request with your changes for java 17 it would be great.

@kubav182
Copy link
Author

@vladokrsymphony I think java version itself is not an issue, we were able to run it with java 21 project (java is backward compatible), our issue was after upgrading to SB3 as it forces to use jakarta packages instead of javax. So we needed to upgrade jetty and cometd. Java is still version 8 in this lib and 21 in our project.

@anhtt116
Copy link

anhtt116 commented Jul 26, 2024

@kubav182 So you still use SB3 in your project? And update cometd 8 and jetty 12 using java 8 in emp-connector right? Because we do the same thing but are having problems when jetty 12 httpClient.start(). It's failed to connect cometd/61.0

@kubav182
Copy link
Author

@anhtt116 this is constructor of class EmpConnector, you can compare. I'm not sure about that number 61.0, we dont specify it anywhere

public EmpConnector(BayeuxParameters parameters) {
        this.parameters = parameters;
        HttpClientTransport transport = new HttpClientTransportOverHTTP();
        httpClient = new HttpClient(transport);
        httpClient.setSslContextFactory(new SslContextFactory.Client());
        parameters.proxies().forEach(proxy -> {
            httpClient.getProxyConfiguration().addProxy(proxy);
        });
}

@anhtt116
Copy link

anhtt116 commented Jul 29, 2024

@anhtt116 this is constructor of class EmpConnector, you can compare. I'm not sure about that number 61.0, we dont specify it anywhere

public EmpConnector(BayeuxParameters parameters) {
        this.parameters = parameters;
        HttpClientTransport transport = new HttpClientTransportOverHTTP();
        httpClient = new HttpClient(transport);
        httpClient.setSslContextFactory(new SslContextFactory.Client());
        parameters.proxies().forEach(proxy -> {
            httpClient.getProxyConfiguration().addProxy(proxy);
        });
}

Thanks. I tried with your way now It can run subscribe but error with message error -> 403::Unknown client but with this config I can run with version java 1.8. Did you get this issue @kubav182

@anhtt116
Copy link

anhtt116 commented Aug 2, 2024

@kubav182 Did you meet the same problem?

@kubav182
Copy link
Author

kubav182 commented Aug 2, 2024

@anhtt116 No I haven't seen this error. This may help you https://help.salesforce.com/s/articleView?id=001119042&type=1

@yellapusony229
Copy link

@kubav182 we are trying to migrate our project to spring boot 3, but facing difficulties how to use the emp-connector. Could you share the code base that you tried and working

@kubav182
Copy link
Author

kubav182 commented Aug 6, 2024

I opened PR #108 we have more changes in our private repo, but not related to this library update.

@anhtt116
Copy link

image
I cloned your code to my local to test and I got the error not found org.eclipse.jetty.http.HttpMethod.
What is the JDK version you are using for the emp-connector? And do you still load normally?

@kubav182
Copy link
Author

I can build it using java 8 or higher, jetty-http should be included in dependencies as transitive dependency, maybe some cache on your side?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants