-
Bug
-
Resolution: Duplicate
-
Critical
-
fuse-7.4-GA
-
None
-
%
Download quickstart spring-boot-camel-config with spring-boot 2 from [1]
Follow README.md and get error.
- Error during jUnit Test:
***************************
APPLICATION FAILED TO START
***************************Description:
The bean 'servletRegistrationBean', defined in class path resource [org/apache/camel/component/servlet/springboot/ServletMappingAutoConfiguration.class], could not be registered. A bean with that name has already been defined in io.fabric8.quickstarts.camel.Application and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Caused by code [2] - renaming removes this error.
- Error on Openshift
Even with previous error fixed and successful jUnit test, quickstart fails with following error. Seems to be some kind of problem during db initialization.
PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'sampledb.orders' doesn't exist]
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'sampledb.orders' doesn't exist
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234) ~[spring-jdbc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1444) ~[spring-jdbc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632) ~[spring-jdbc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
at org.apache.camel.component.sql.SqlProducer.process(SqlProducer.java:116) ~[camel-sql-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) ~[camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) ~[camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) ~[camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) ~[camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197) [camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79) [camel-core-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_212]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_212]
Caused by: java.sql.SQLSyntaxErrorException: Table 'sampledb.orders' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.15.jar!/:8.0.15]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.15.jar!/:8.0.15]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.15.jar!/:8.0.15]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:970) ~[mysql-connector-java-8.0.15.jar!/:8.0.15]
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:387) ~[mysql-connector-java-8.0.15.jar!/:8.0.15]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-3.2.0.jar!/:na]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-3.2.0.jar!/:na]
at org.apache.camel.component.sql.SqlProducer$2.doInPreparedStatement(SqlProducer.java:161) ~[camel-sql-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.apache.camel.component.sql.SqlProducer$2.doInPreparedStatement(SqlProducer.java:116) ~[camel-sql-2.23.2.fuse-740002.jar!/:2.23.2.fuse-740002]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617) ~[spring-jdbc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
... 12 common frames omitted
[1] https://github.com/fabric8-quickstarts/spring-boot-camel-rest-sql/releases/tag/spring-boot-camel-rest-sql-1.0.fuse-sb2-740002
[2] https://github.com/fabric8-quickstarts/spring-boot-camel-rest-sql/blob/master/src/main/java/io/fabric8/quickstarts/camel/Application.java#L37