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

FUSETOOLS2-2517: Adapt tests to use folder selection while creating a Camel project #114

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

hdamarcelo
Copy link
Contributor

No description provided.

@hdamarcelo hdamarcelo force-pushed the FUSETOOLS2-2517 branch 3 times, most recently from 70784f8 to 080ae13 Compare January 17, 2025 04:27
@hdamarcelo
Copy link
Contributor Author

After trying some changes to make the tests work in the github actions pipeline I tried testing in fedora, ubuntu and win11 machines I am getting the following error during the test execution:

Error when trying to connect the Camel debugger: Cannot invoke "String.getBytes()" because "routes" is null
Please check that the Camel application under debug has the following requirements:
 - version 3.16+
 - camel-debug is available on the classpath
 - have JMX enabled
It might be interesting having also a look to the Debug Adapter for Camel log: /tmp/log-camel-dap.log.

The project and route are created, a breakpoint is set in the Demo.java file and while attaching the debugger the error is shown.

The log-camel-dap.log file contains the following:

2025-01-17 00:22:19.551 ERROR [ForkJoinPool.commonPool-worker-1] [com.github.cameltooling.dap.internal.BacklogDebuggerConnectionManager.attach(BacklogDebuggerConnectionManager.java:160)] - Error trying to attach
java.lang.NullPointerException: Cannot invoke "String.getBytes()" because "routes" is null
	at com.github.cameltooling.dap.internal.BacklogDebuggerConnectionManager.retrieveRoutesWithSourceLineNumber(BacklogDebuggerConnectionManager.java:347) ~[!/:?]
	at com.github.cameltooling.dap.internal.BacklogDebuggerConnectionManager.attach(BacklogDebuggerConnectionManager.java:149) ~[!/:?]
	at com.github.cameltooling.dap.internal.CamelDebugAdapterServer.lambda$attach$1(CamelDebugAdapterServer.java:114) ~[!/:?]
	at com.github.cameltooling.dap.internal.CamelDebugAdapterServer.lambda$runAsync$15(CamelDebugAdapterServer.java:412) ~[!/:?]
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1848) [?:?]
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1840) [?:?]
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1458) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2034) [?:?]
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:189) [?:?]

Another thing to note is that in the fedora, ubuntu and win11 machines I can´t reproduce this error.

@hdamarcelo hdamarcelo force-pushed the FUSETOOLS2-2517 branch 10 times, most recently from ffd199f to 1857ceb Compare January 17, 2025 17:23
@hdamarcelo
Copy link
Contributor Author

hdamarcelo commented Jan 17, 2025

Ubuntu 24 makes so that the method openResources() does not work correctly. I added a step in the pipeline with a workaround as suggested here. We could add this workaround in another PR if it makes more sense.

… Camel project

- Adapt tests to select a folder for the create camel project command.
- Add a step in the github actions to allow openResources() to work
  properly on ubuntu 24.

Signed-off-by: Marcelo Henrique Diniz de Araujo <mdinizde@redhat.com>
@hdamarcelo hdamarcelo merged commit ec69f93 into camel-tooling:main Jan 20, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants