Java-MySQL devfile built app does not work
See original GitHub issueDescribe the bug
The current java-mysql
devfile and sample project build and run successfully, but on attempting to do any database operations in the app, an exception is thrown:
2019-07-20 01:40:58.181 ERROR 274 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
java.sql.SQLSyntaxErrorException: Table 'petclinic.owners' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.16.jar!/:8.0.16]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.16.jar!/:8.0.16]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.16.jar!/:8.0.16]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:955) ~[mysql-connector-java-8.0.16.jar!/:8.0.16]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1005) ~[mysql-connector-java-8.0.16.jar!/:8.0.16]
at
[...]
Che version
- latest
- nightly
- other: please specify
Steps to reproduce
- Create workspace:
[che-url]/#/load-factory?url=https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/java-mysql/devfile.yaml
- Use the
maven build
task - Use the
run webapp
task - Navigate to e.g. “Find owners” and attempt to “find” an owner
Expected behavior
Webapp should connect to database as expected
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Chapter 3. Developer workspaces - Red Hat Customer Portal
A CodeReady Workspaces workspace can be created by pointing to devfile that is stored in a Git source repository on a feature branch...
Read more >Building a custom devfile registry
Provide your developers a devfile registry so they can access devfile stacks and samples, enabling them to use devfiles to simplify and improve...
Read more >Devfile v2 and IDE plug-ins in Eclipse Che - Medium
You can still work with your previous workspaces and devfile v1. If the devfile.yaml has apiVersion 1.0.0, it will use che server workspace ......
Read more >Working in Dev Environments and VS Code
You can launch a VS Code virtual computing environment, known as a Dev Environment, ... Configuring your Dev Environment with devfiles; Connecting AWS...
Read more >Is there a way to connect a Java desktop app with MySQL ...
The client gets nothing more than the data to be displayed in forms ... If PWA can be made to work well, some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just checked and everything works fine.
@sparkoo I can’t reproduce this problem. As I see @amisevsk also tested this devfile with my changes and he didn’t find any problems https://github.com/eclipse/che-devfile-registry/pull/51#pullrequestreview-266609816.