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

application.properties missing when using latest kamel-1.0.0 release #1542

Closed
doru1004 opened this issue Jun 17, 2020 · 4 comments
Closed

application.properties missing when using latest kamel-1.0.0 release #1542

doru1004 opened this issue Jun 17, 2020 · 4 comments
Labels
status/waiting-for-feedback Needs some feedback

Comments

@doru1004
Copy link
Contributor

When using the latest kamel 1.0.0 release and trying to run the Kafka sample consumer example I get:

java -cp ./resources:/etc/camel/conf.d/_configmaps/kafka.props:/etc/camel/resources:/etc/camel/sources/i-source-000:dependencies/com.github.luben.zstd-jni-1.4.0-1.jar:dependencies/commons-io.commons-io-2.6.jar:dependencies/org.apache.camel.camel-api-3.0.1.jar:dependencies/org.apache.camel.camel-base-3.0.1.jar:dependencies/org.apache.camel.camel-bean-3.0.1.jar:dependencies/org.apache.camel.camel-core-engine-3.0.1.jar:dependencies/org.apache.camel.camel-endpointdsl-3.0.1.jar:dependencies/org.apache.camel.camel-jaxp-3.0.1.jar:dependencies/org.apache.camel.camel-kafka-3.0.1.jar:dependencies/org.apache.camel.camel-main-3.0.1.jar:dependencies/org.apache.camel.camel-management-api-3.0.1.jar:dependencies/org.apache.camel.camel-support-3.0.1.jar:dependencies/org.apache.camel.camel-util-3.0.1.jar:dependencies/org.apache.camel.camel-util-json-3.0.1.jar:dependencies/org.apache.camel.k.camel-k-loader-java-1.1.0.jar:dependencies/org.apache.camel.k.camel-k-runtime-core-1.1.0.jar:dependencies/org.apache.camel.k.camel-k-runtime-main-1.1.0.jar:dependencies/org.apache.camel.spi-annotations-3.0.1.jar:dependencies/org.apache.commons.commons-lang3-3.9.jar:dependencies/org.apache.kafka.kafka-clients-2.3.1.jar:dependencies/org.apache.logging.log4j.log4j-api-2.13.0.jar:dependencies/org.apache.logging.log4j.log4j-core-2.13.0.jar:dependencies/org.apache.logging.log4j.log4j-slf4j-impl-2.13.0.jar:dependencies/org.jooq.joor-java-8-0.9.12.jar:dependencies/org.lz4.lz4-java-1.6.0.jar:dependencies/org.slf4j.slf4j-api-1.7.29.jar:dependencies/org.xerial.snappy.snappy-java-1.1.7.3.jar org.apache.camel.k.main.Application
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /etc/camel/conf/application.properties
	at org.apache.camel.k.support.PropertiesSupport.loadProperties(PropertiesSupport.java:78)
	at org.apache.camel.k.support.PropertiesSupport.loadProperties(PropertiesSupport.java:61)
	at org.apache.camel.k.main.ApplicationSupport.configureLogging(ApplicationSupport.java:35)
	at org.apache.camel.k.main.Application.<clinit>(Application.java:33)
Caused by: java.nio.file.NoSuchFileException: /etc/camel/conf/application.properties
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:370)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:421)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
	at java.base/java.nio.file.Files.newInputStream(Files.java:155)
	at java.base/java.nio.file.Files.newBufferedReader(Files.java:2838)
	at java.base/java.nio.file.Files.newBufferedReader(Files.java:2870)
	at org.apache.camel.k.support.PropertiesSupport.loadProperties(PropertiesSupport.java:73)
	... 3 more

This error does not occur when using kamel RC2 and the sample consumer is deployed successfully.

@lburgazzoli
Copy link
Contributor

Is this happening on a fresh install ?

@lburgazzoli lburgazzoli added the status/waiting-for-feedback Needs some feedback label Jun 18, 2020
@doru1004
Copy link
Contributor Author

I had the RC2 version installed, I uninstalled it then I installed version 1.0.0.

@doru1004
Copy link
Contributor Author

In the source I see that this: /etc/camel/conf/application.properties is hardcoded. What's the underlying assumption? Who is supposed to create that file and is it going be created in that location in all cluster types?

@doru1004
Copy link
Contributor Author

I tried building from source. I cloned the latest master branch and ran

make

This build a kamel executable which I used to install kamel in my kind cluster.

The command succeeded.

I was also able to deploy the KafkaConsumer in the Kafka example.

It looks like the files missing error might be an error only in the release version and it is no longer a problem in the latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-feedback Needs some feedback
Projects
None yet
Development

No branches or pull requests

2 participants