3
respostas

API FORUM - KOTLIN E SPRING BOOT

Gente, sempre quando dou o comando '' mvn clean package'' ele me retorna esse erro aqui: Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "CURSO" not found (this database is empty); SQL statement: insert into curso(id, nome, categoria) values(1, 'kotlin', 'PROGRAMACAO') [42104-224] at org.h2.message.DbException.getJdbcSQLException(DbException.java:514) at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) at org.h2.message.DbException.get(DbException.java:223) at org.h2.message.DbException.get(DbException.java:199) at org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8051) at org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8035) at org.h2.command.Parser.readTableOrView(Parser.java:8024) at org.h2.command.Parser.readTableOrView(Parser.java:7990) at org.h2.command.Parser.parseInsert(Parser.java:1540) at org.h2.command.Parser.parsePrepared(Parser.java:719) at org.h2.command.Parser.parse(Parser.java:592) at org.h2.command.Parser.parse(Parser.java:564) at org.h2.command.Parser.prepareCommand(Parser.java:483) at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:639) at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:559) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1166) at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:245) at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:231) at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) at org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:261) ... 50 more [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] ForumApplicationTests.contextLoads » IllegalState Failed to load ApplicationContext for [WebMergedContextConfiguration@3e705e testClass = br.com.apiKotlin.forum.ForumApplicationTests, locations = [], classes = [br.com.apiKotlin.forum.ForumApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@f22f9d, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4f4dea, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@11f4093, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@11ef78d, org.springframework.boot.test.context.SpringBootTestAnnotation@3a20f738], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] [INFO] [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO]

for the individual test results. Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

Ja coloquei as dependency e mudei o import, mas continua dando esse erro.

3 respostas

de qual curso é isso?

Api com kotlin e spring

manda o link pfvr