You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "ravishankar-hassain (via GitHub)" <gi...@apache.org> on 2024/01/09 01:24:24 UTC

[I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

ravishankar-hassain opened a new issue, #1054:
URL: https://github.com/apache/camel-karavan/issues/1054

   I am trying to deploy a sample camel Karavan application from vscode to minikube in my local setup. I am using the context menu Karavan:Deploy to do the deployment. The terminal output seems to be successful but the minikube pod is crashing with the below error
   
   ravis@soleil_laptop MINGW64 ~
   $ kubectl get pods
   NAME READY STATUS RESTARTS AGE
   karavan-poc-7875d74796-48xwf 0/1 CrashLoopBackOff 9 (2m45s ago) 24m
   
   ravis@soleil_laptop MINGW64 ~
   $ kubectl logs karavan-poc-7875d74796-48xwf
   Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
   INFO exec java -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -javaagent:/usr/share/java/prometheus-jmx-exporter/jmx_prometheus_javaagent.jar=9779:/opt/jboss/container/prometheus/etc/jmx-exporter-config.yaml -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp ".:/deployments/*" org.springframework.boot.loader.JarLauncher
   Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
   Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher
   
   I am using the latest version of Camel Karavan v4.3.0 extension in VSCode
   
   I found the SO post https://stackoverflow.com/questions/77279480/org-springframework-boot-loader-jarlauncher-cannot-be-found-but-org-springframe
   
   It seems like the JarLauncher class is actually under org.springframework.boot.loader.launch.JarLauncher for Springboot v3.2.0
   
   but the Karavan / Camel JBang generated DockerFile has an ENV named JAVA_MAIN_CLASS with Value org.springframework.boot.loader.JarLauncher but for SB version 3.2 the value should be org.springframework.boot.loader.**launch**.JarLauncher
   
   How can I change this? Is there an option to mention this via properties?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "ravishankar-hassain (via GitHub)" <gi...@apache.org>.
ravishankar-hassain commented on issue #1054:
URL: https://github.com/apache/camel-karavan/issues/1054#issuecomment-1883627357

   > To avoid manual changes in deployment in k8s, you could just add `deployment.jkube.yaml` file to your project with the following fragment
   > 
   > ```
   > spec:
   >   template:
   >     spec:
   >       containers:
   >         - env:
   >           - name: JAVA_MAIN_CLASS
   >             value: org.springframework.boot.loader.launch.JarLauncher
   > ```
   
   Should I add this in the Karavan Application like below ?
   
   ![image](https://github.com/apache/camel-karavan/assets/120050834/d11aeccc-a3dd-470c-a133-21523caf4749)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "ravishankarhassain (via GitHub)" <gi...@apache.org>.
ravishankarhassain commented on issue #1054:
URL: https://github.com/apache/camel-karavan/issues/1054#issuecomment-1883552226

   > Thanks for the info. In the meantime, I have found a workaround for this issue.
   > 
   > After the karavan:deploy is done and executed successfully, the K8S cluster will have all the required resources created by the karavan. So, I edited the deployment resource to override the value for the ENV JAVA_MAIN_CLASS as mentioned below
   
   ![image](https://github.com/apache/camel-karavan/assets/4846462/9cf71648-31c9-4df0-bf4f-18586d1087a6)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "ravishankar-hassain (via GitHub)" <gi...@apache.org>.
ravishankar-hassain commented on issue #1054:
URL: https://github.com/apache/camel-karavan/issues/1054#issuecomment-1883546414

   Thanks for the info. In the meantime, I have found a workaround for this issue. 
   
   After the karavan:deploy is done and executed successfully, the K8S cluster will have all the required resources created by the karavan. So, I edited the deployment resource to override the value for the ENV JAVA_MAIN_CLASS as mentioned below


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #1054:
URL: https://github.com/apache/camel-karavan/issues/1054#issuecomment-1883277499

   Karavan uses JKube to build and deploy containers to k8s.
   This issue is already fixed in https://github.com/eclipse/jkube/pull/2482 and will be in the next JKube.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #1054:
URL: https://github.com/apache/camel-karavan/issues/1054#issuecomment-1883623526

   To avoid manual changes in deployment in k8s, you could just add `deployment.jkube.yaml` file to your project with the following fragment
   ```
   spec:
     template:
       spec:
         containers:
           - env:
             - name: JAVA_MAIN_CLASS
               value: org.springframework.boot.loader.launch.JarLauncher
   ```


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin closed issue #1054: Issue while Deploying Karavan App using SB runtime
URL: https://github.com/apache/camel-karavan/issues/1054


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #1054:
URL: https://github.com/apache/camel-karavan/issues/1054#issuecomment-1883630625

   Yes


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org