ipolyzos commented on issue #862: camel-rest should load automatically for routes using Rest DSL URL: https://github.com/apache/camel-k/issues/862#issuecomment-514598656 Which version of camel-k you are using? I could not reproduce this issue using version 0.3.4 Below is a log of the steps taken to reproduce. > $ kamel version > Camel K Client 0.3.4 > $ kamel run --name=rest-with-restlet --dependency=camel-restlet examples/RestWithRestlet.java --dev git:(tags/0.3.4|) > integration "rest-with-restlet" created > integration "rest-with-restlet" in phase Building Context > integration "rest-with-restlet" in phase Deploying > integration "rest-with-restlet" in phase Running > [1] Monitoring pod rest-with-restlet-694996b794-x7jc7[1] Starting the Java application using /opt/run-java/run-java.sh ... > [1] exec java -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp ./resources:/etc/camel/conf:/etc/camel/resources:/etc > /camel/sources/i-source-000:dependencies/com.sun.xml.bind.jaxb-core-2.3.0.jar:dependencies/com.sun.xml.bind.jaxb-impl-2.3.0.jar:dependencies/commons-codec.commons-codec-1.5.jar:dependencies/commons-io.commons-io-2.6. > jar:dependencies/commons-logging.commons-logging-1.1.3.jar:dependencies/javax.servlet.javax.servlet-api-3.1.0.jar:dependencies/net.jcip.jcip-annotations-1.0.jar:dependencies/org.apache.camel.camel-core-2.24.0.jar:dep > endencies/org.apache.camel.camel-http-common-2.24.0.jar:dependencies/org.apache.camel.camel-restlet-2.24.0.jar:dependencies/org.apache.camel.k.camel-k-adapter-camel-2-0.3.3.jar:dependencies/org.apache.camel.k.camel-k > -runtime-core-0.3.3.jar:dependencies/org.apache.camel.k.camel-k-runtime-jvm-0.3.3.jar:dependencies/org.apache.commons.commons-lang3-3.8.1.jar:dependencies/org.apache.httpcomponents.httpclient-4.3.2.jar:dependencies/o > rg.apache.httpcomponents.httpcore-4.3.1.jar:dependencies/org.apache.httpcomponents.httpmime-4.3.jar:dependencies/org.apache.james.apache-mime4j-core-0.7.2.jar:dependencies/org.apache.logging.log4j.log4j-api-2.11.2.ja > r:dependencies/org.apache.logging.log4j.log4j-core-2.11.2.jar:dependencies/org.apache.logging.log4j.log4j-slf4j-impl-2.11.2.jar:dependencies/org.jooq.joor-java-8-0.9.11.jar:dependencies/org.restlet.jee.org.restlet-2. > 3.12.jar:dependencies/org.restlet.jee.org.restlet.ext.httpclient-2.3.12.jar:dependencies/org.slf4j.slf4j-api-1.7.25.jar org.apache.camel.k.jvm.Application > [1] OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N > [1] 2019-07-24 11:34:35.042 INFO [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.ContextConfigurer@654f0d9c > [1] 2019-07-24 11:34:35.047 INFO [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.ContextLifecycleConfigurer@50b472aa > [1] 2019-07-24 11:34:35.048 INFO [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.RoutesConfigurer@4facf68f > [1] 2019-07-24 11:34:35.049 INFO [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.RoutesDumper@15c43bd9 > [1] 2019-07-24 11:34:35.064 INFO [main] ApplicationRuntime - Listener org.apache.camel.k.listener.ContextConfigurer@654f0d9c executed in phase ConfigureContext > [1] 2019-07-24 11:34:35.065 INFO [main] ApplicationRuntime - Listener org.apache.camel.k.listener.ContextLifecycleConfigurer@50b472aa executed in phase ConfigureContext > [1] 2019-07-24 11:34:35.093 INFO [main] RoutesConfigurer - Loading routes from: file:/etc/camel/sources/i-source-000/RestWithRestlet.java?language=java > [1] 2019-07-24 11:34:35.575 INFO [main] DefaultTypeConverter - Type converters loaded (core: 195, classpath: 10) > [1] 2019-07-24 11:34:35.587 INFO [main] ApplicationRuntime - Listener org.apache.camel.k.listener.RoutesConfigurer@4facf68f executed in phase ConfigureRoutes > [1] 2019-07-24 11:34:35.587 INFO [main] DefaultCamelContext - Apache Camel 2.24.0 (CamelContext: camel-k) is starting > [1] 2019-07-24 11:34:35.588 INFO [main] ManagedManagementStrategy - JMX is enabled > [1] 2019-07-24 11:34:35.739 INFO [main] DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html > [1] 2019-07-24 11:34:35.823 INFO [main] DefaultCamelContext - Route: route1 started and consuming from: direct://hello > [1] Jul 24, 2019 11:34:35 AM org.restlet.engine.connector.NetServerHelper start > [1] INFO: Starting the internal [HTTP/1.1] server on port 8080 > [1] 2019-07-24 11:34:35.839 INFO [main] DefaultCamelContext - Route: route2 started and consuming from: restlet://http://0.0.0.0:8080/hello?restletMethods=GET > [1] 2019-07-24 11:34:35.839 INFO [main] DefaultCamelContext - Total 2 routes, of which 2 are started > [1] 2019-07-24 11:34:35.840 INFO [main] DefaultCamelContext - Apache Camel 2.24.0 (CamelContext: camel-k) started in 0.253 seconds > [1] 2019-07-24 11:34:35.840 INFO [main] ApplicationRuntime - Listener org.apache.camel.k.listener.RoutesDumper@15c43bd9 executed in phase Started On another tab creating a proxy to integration. > $ kubectl port-forward rest-with-restlet-694996b794-x7jc7 8080:8080 > Forwarding from [::1]:8080 -> 8080 > Forwarding from 127.0.0.1:8080 -> 8080 Finally on a third tab testing the service > $ curl localhost:8080/hello > Hello World
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
