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

Ignore package when working with Java classes #1132

Closed
hguerrero opened this issue Dec 10, 2019 · 2 comments · Fixed by apache/camel-k-runtime#211
Closed

Ignore package when working with Java classes #1132

hguerrero opened this issue Dec 10, 2019 · 2 comments · Fixed by apache/camel-k-runtime#211
Labels
kind/bug Something isn't working
Milestone

Comments

@hguerrero
Copy link
Contributor

if trying to run a Java based integration that has package com.example; or any other package names causes a java.lang.NullPointerException, removing the package line returns a successful execution.

If packages are note required, then when receiving an integration that includes package word, remove it from the code and proceed to avoid the null pointer exception.

Full log:

[4] Exception in thread "main" org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
[4]     at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52)
[4]     at org.apache.camel.k.listener.RoutesConfigurer.load(RoutesConfigurer.java:69)
[4]     at org.apache.camel.k.listener.RoutesConfigurer.accept(RoutesConfigurer.java:51)
[4]     at org.apache.camel.k.listener.AbstractPhaseListener.accept(AbstractPhaseListener.java:32)
[4]     at org.apache.camel.k.main.ApplicationRuntime$MainListenerAdapter.lambda$invokeListeners$0(ApplicationRuntime.java:152)
[4]     at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
[4]     at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
[4]     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
[4]     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
[4]     at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
[4]     at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
[4]     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[4]     at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
[4]     at org.apache.camel.k.main.ApplicationRuntime$MainListenerAdapter.invokeListeners(ApplicationRuntime.java:151)
[4]     at org.apache.camel.k.main.ApplicationRuntime$MainListenerAdapter.beforeStart(ApplicationRuntime.java:125)
[4]     at org.apache.camel.main.MainSupport.beforeStart(MainSupport.java:114)
[4]     at org.apache.camel.main.MainSupport.run(MainSupport.java:76)
[4]     at org.apache.camel.k.main.ApplicationRuntime.run(ApplicationRuntime.java:70)
[4]     at org.apache.camel.k.main.Application.main(Application.java:42)
[4] Caused by: java.lang.NullPointerException
[4]     at org.joor.Reflect.create(Reflect.java:697)
[4]     at org.joor.Reflect.create(Reflect.java:662)
[4]     at org.apache.camel.k.loader.java.JavaSourceRoutesLoader.load(JavaSourceRoutesLoader.java:47)
[4]     at org.apache.camel.k.listener.RoutesConfigurer.load(RoutesConfigurer.java:67)
[4]     ... 17 more```
@lburgazzoli
Copy link
Contributor

this issue should have been fixed long time ago, can you share the java code ?

@hguerrero
Copy link
Contributor Author

@nicolaferraro nicolaferraro added the kind/bug Something isn't working label Dec 13, 2019
@nicolaferraro nicolaferraro added this to the 1.0.0-CR1 milestone Dec 13, 2019
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue Dec 16, 2019
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue Dec 16, 2019
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue Dec 16, 2019
lburgazzoli added a commit to apache/camel-k-runtime that referenced this issue Dec 16, 2019
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