question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Java-MySQL devfile built app does not work

See original GitHub issue

Describe 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

  1. Create workspace: [che-url]/#/load-factory?url=https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/java-mysql/devfile.yaml
  2. Use the maven build task
  3. Use the run webapp task
  4. 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:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
tolushacommented, Jul 29, 2019

I’ve just checked and everything works fine. Screenshot from 2019-07-29 09-35-15

1reaction
svorcommented, Jul 26, 2019

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

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found