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

Getting started guide external task worker for Java doesn't work #4520

Closed
1 task done
ingorichtsmeier opened this issue Aug 6, 2024 · 1 comment
Closed
1 task done
Assignees
Labels
type:bug Issues that describe a user-facing bug in the project.

Comments

@ingorichtsmeier
Copy link
Contributor

ingorichtsmeier commented Aug 6, 2024

Environment (Required on creation)

7.21.0

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

Creating a project from the snipptes provided in the documentation here https://docs.camunda.org/get-started/quick-start/service-task/#add-camunda-external-task-client-dependency and here https://docs.camunda.org/get-started/quick-start/service-task/#add-the-java-class lead to an error when starting the project:

[main] INFO org.camunda.bpm.client - TASK/CLIENT-01026 Discovered data format provider: org.camunda.bpm.client.variable.impl.format.serializable.SerializableDataFormatProvider[name = application/x-java-serialized-object]
[main] INFO org.camunda.bpm.client - TASK/CLIENT-01025 Discovered data format: org.camunda.bpm.client.variable.impl.format.serializable.SerializableDataFormat[name = application/x-java-serialized-object]
[main] INFO org.camunda.bpm.client - TASK/CLIENT-01026 Discovered data format provider: org.camunda.bpm.client.variable.impl.format.xml.DomXmlDataFormatProvider[name = application/xml]
Exception in thread "main" java.lang.NoClassDefFoundError: jakarta/xml/bind/JAXBException
	at org.camunda.bpm.client.variable.impl.format.xml.DomXmlDataFormatProvider.createInstance(DomXmlDataFormatProvider.java:31)
	at org.camunda.bpm.client.impl.ExternalTaskClientBuilderImpl.lookupProvider(ExternalTaskClientBuilderImpl.java:348)
	at org.camunda.bpm.client.impl.ExternalTaskClientBuilderImpl.lookupCustomDataFormats(ExternalTaskClientBuilderImpl.java:339)
	at org.camunda.bpm.client.impl.ExternalTaskClientBuilderImpl.lookupDataFormats(ExternalTaskClientBuilderImpl.java:327)
	at org.camunda.bpm.client.impl.ExternalTaskClientBuilderImpl.initVariableMappers(ExternalTaskClientBuilderImpl.java:286)
	at org.camunda.bpm.client.impl.ExternalTaskClientBuilderImpl.build(ExternalTaskClientBuilderImpl.java:224)
	at com.camunda.consulting.basic_external_task_worker.ExampleWorker.main(ExampleWorker.java:15)
Caused by: java.lang.ClassNotFoundException: jakarta.xml.bind.JAXBException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 7 more

Steps to reproduce (Required on creation)

  1. Create a new maven project
  2. Add content to the pom as described in docs
  3. Add a java class as described in the docs
  4. Start the Java program.

Observed Behavior (Required on creation)

Exception as shown above.

Expected behavior (Required on creation)

The external task client starts without error.

Root Cause (Required on prioritization)

Using Jakarta classes in internal classes in the client library.

Solution Ideas

Improve the documentation.

Hints

Links

Breakdown

camunda-docs-static PR

Preview Give feedback
  1. psavidis

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment
@ingorichtsmeier ingorichtsmeier added the type:bug Issues that describe a user-facing bug in the project. label Aug 6, 2024
@psavidis psavidis self-assigned this Aug 7, 2024
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 7, 2024
- Using the documentation, the example created by the user does not start and fails with a ClassNotFoundException: jakarta.xml.bind.JAXBException
- This fix adjusts the jaxb dependency to use the same jakarta dependency as used in camunda-bpm-platform.

Related-to: camunda/camunda-bpm-platform#4520
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 7, 2024
- Using the documentation, the example created by the user does not start and fails with a ClassNotFoundException: jakarta.xml.bind.JAXBException
- This fix adjusts the jaxb dependency to use the same jakarta dependency as used in camunda-bpm-platform.

Related-to: camunda/camunda-bpm-platform#4520
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 8, 2024
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 8, 2024
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 8, 2024
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 8, 2024
psavidis added a commit to camunda/camunda-docs-static that referenced this issue Aug 8, 2024
- Using the documentation, the example created by the user does not start and fails with a ClassNotFoundException: jakarta.xml.bind.JAXBException
- This commit adjusts the jaxb dependency to use the same jakarta dependency as used in camunda-bpm-platform.

Related-to: camunda/camunda-bpm-platform#4520
@psavidis
Copy link
Contributor

psavidis commented Aug 8, 2024

The Get Started Documentation has been updated (External Task Client, charge-card-worker source code).

Closing the ticket.

@psavidis psavidis closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Issues that describe a user-facing bug in the project.
Projects
None yet
Development

No branches or pull requests

2 participants