-
Bug
-
Resolution: Done
-
Blocker
-
fuse-7.8-GA
-
None
-
False
-
False
-
%
-
build9
-
Undefined
-
Fuse On Openshift
-
Workaround Exists
-
-
-
Used images:
- fuse7-fuse-java-openshift:1.8-9
- fuse7-fuse-apicurito:1.8-10
- fuse7-fuse-apicurito-generator:1.8-20
I deployed the Apicurito on OCP 4.6 and opened API Designer UI with a sample todo-swagger.json
I tried to generate the Fuse Camel Project, I successfully downloaded and unzipped.
However, when I tried to run
mvn clean package
or
mvn spring-boot:run
I get the following errors:
[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /home/jsolovjo/Desktop/camel-project/src/main/java/io/example/openapi/Application.java:[20,44] package org.springframework.boot.context.web does not exist [ERROR] /home/jsolovjo/Desktop/camel-project/src/main/java/io/example/openapi/Application.java:[25,34] cannot find symbol symbol: class SpringBootServletInitializer [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.089 s [INFO] Finished at: 2020-12-02T17:05:51+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project todo-app-api: Compilation failure: Compilation failure: [ERROR] /home/jsolovjo/Desktop/camel-project/src/main/java/io/example/openapi/Application.java:[20,44] package org.springframework.boot.context.web does not exist [ERROR] /home/jsolovjo/Desktop/camel-project/src/main/java/io/example/openapi/Application.java:[25,34] cannot find symbol [ERROR] symbol: class SpringBootServletInitializer [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
After an investigation I found that:
- Spring Boot 1.x: import org.springframework.boot.web.support
- Spring Boot 2.x: import org.springframework.boot.web.servlet.support
When I changed the import in .../camel-project/src/main/java/io/example/openapi/Application.java it started working