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

Error when using an external kit #2090

Closed
nicolaferraro opened this issue Mar 3, 2021 · 3 comments · Fixed by #2097
Closed

Error when using an external kit #2090

nicolaferraro opened this issue Mar 3, 2021 · 3 comments · Fixed by #2097
Labels
kind/bug Something isn't working
Milestone

Comments

@nicolaferraro
Copy link
Member

Strange that it did not happen before merging the global builder. I think it's not related to the global builder per se, it's more likely a problem with using external kits.

The test is pretty easy:

  • Empty namespace, newly installed operator
  • Run a timer to log integration
  • Get the image of the kit produced for it
  • Create a kit marked with "external", with spec->image pointing to the previous image and apply it to the cluster
  • Delete the previous integration, run it again with --kit=external --name=different-one

It fails (today):

-- FAIL: TestRunGlobalInstall/Global_test_on_namespace_without_platform_with_external_kit (80.37s)
        global_test.go:125: 
            Timed out after 60.025s.
            Expected
                <string>: 	at org.apache.camel.k.listener.SourcesConfigurer.accept(SourcesConfigurer.java:73)
                	at org.apache.camel.k.listener.AbstractPhaseListener.accept(AbstractPhaseListener.java:32)
                	at org.apache.camel.k.quarkus.Application$ListenerAdapter.invokeListeners(Application.java:135)
                	at org.apache.camel.k.quarkus.Application$ListenerAdapter.beforeConfigure(Application.java:97)
                	at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:521)
                	at org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:108)
                	at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:78)
                	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
                	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:129)
                	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
                	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
                	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
                	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
                	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:545)
                	at io.quarkus.runtime.Application.start(Application.java:90)
                	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
                	at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
                	at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
                	at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
                	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
                	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
                	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:48)
                	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:25)
                Caused by: org.joor.ReflectException: Compilation error: /Java.java:18: error: package org.apache.camel.builder does not exist
                import org.apache.camel.builder.RouteBuilder;
                                               ^
Error:                 /Java.java:20: error: cannot find symbol
                public class Java extends RouteBuilder {
                                          ^
                  symbol: class RouteBuilder
Error:                 /Java.java:21: error: method does not override or implement a method from a supertype
                  @Override
                  ^
Error:                 /Java.java:23: error: cannot find symbol
                	  from("timer:tick")
                	  ^
                  symbol:   method from(String)
                  location: class Java
                4 errors
                
                	at org.joor.Compile.compile(Compile.java:102)
                	at org.joor.Reflect.compile(Reflect.java:104)
                	at org.joor.Reflect.compile(Reflect.java:79)
                	at org.apache.camel.k.loader.java.JavaSourceLoader.load(JavaSourceLoader.java:54)
                	at org.apache.camel.k.support.SourcesSupport.load(SourcesSupport.java:103)
                	... 27 more

Any idea @lburgazzoli ?

@nicolaferraro nicolaferraro changed the title Error when using on external kit Error when using an external kit Mar 3, 2021
@nicolaferraro nicolaferraro added the kind/bug Something isn't working label Mar 3, 2021
@nicolaferraro nicolaferraro added this to the 1.4.0 milestone Mar 3, 2021
@lburgazzoli
Copy link
Contributor

maybe related to the fast-jar thing we have introduced ? it looks like the classpath is messed up

@nicolaferraro
Copy link
Member Author

maybe related to the fast-jar thing we have introduced ? it looks like the classpath is messed up

Oh, right! I didn't notice that this got merged yesterday and we switched to runtime 1.7.0-SNAPSHOT.

In case of external kit, the individual entries of the classpath are not expected to be be present on the kit.

cc: @jamesnetherton

@jamesnetherton
Copy link
Contributor

I can try to take a look tomorrow or Friday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants