camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Camel-K Java native support - native run of a java route fails

Open catshout opened this issue 3 years ago • 6 comments

I've a fresh installed Camel-K 1.8.0 Operator. My sample route hello.java like

from('timer:tick?period=3000')
  .setBody().constant('Hello world from Camel K')
  .to('log:info')

and tried to execute the following command

kamel run -t quarkus.package-type=native hello.java

With this I'm getting the error (excerpt from resource yaml

  status:
    conditions:
    - firstTruthyTime: "2022-02-18T07:43:59Z"
      lastTransitionTime: "2022-02-18T07:43:59Z"
      lastUpdateTime: "2022-02-18T07:43:59Z"
      message: integration/camel-k
      reason: IntegrationPlatformAvailable
      status: "True"
      type: IntegrationPlatformAvailable
    - lastTransitionTime: "2022-02-18T07:44:00Z"
      lastUpdateTime: "2022-02-18T07:44:00Z"
      message: native compilation for language "java" is not supported
      reason: UnsupportedLanguage
      status: "False"
      type: IntegrationKitAvailable
    - lastTransitionTime: "2022-02-18T07:44:00Z"
      lastUpdateTime: "2022-02-18T07:44:00Z"
      message: no host or service defined
      reason: IngressNotAvailable
      status: "False"

What am I missing here?

catshout avatar Feb 18 '22 07:02 catshout

I think we don't support Java because the joor dependency. @astefanutti can you confirm please?

squakez avatar Feb 21 '22 08:02 squakez

Right, native compilation is currently supported for YAML and XML integrations, as well as Kamelets.

astefanutti avatar Feb 21 '22 08:02 astefanutti

Thanks for your replies.

  1. Will the Java native compilation supported in one of the next releases (may be w/o joor support)?
  2. Can locally native compiled Java routes being used for Camel-K deployment?
  3. If using YAML native compiled, could the compiled resource be moved from one environment (e.g. DEV) to another (e.g. TEST) without re-compile again?

Background of this the significant reduction of memory footprint and startup time of native compiled resources. That's in my mind the real advantage for mass micro services.

catshout avatar Feb 21 '22 09:02 catshout

Hi @squakez and @astefanutti, the topic of a native compiled resource came up today again. Are there any plans to enable this for Java based Camel-K Integrations? Thanks for a hint ..

catshout avatar Mar 08 '22 14:03 catshout

Hi @squakez and @astefanutti. Could this also be turned into a feature request? Thanks in advance for your thoughts.

catshout avatar Mar 09 '22 17:03 catshout

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Jun 08 '22 00:06 github-actions[bot]