Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2 does not appear to be supported. #121

Open
kaladay opened this issue Dec 4, 2023 · 0 comments
Open

H2 does not appear to be supported. #121

kaladay opened this issue Dec 4, 2023 · 0 comments

Comments

@kaladay
Copy link

kaladay commented Dec 4, 2023

Some developers just need to spin up a Docker Container locally to perform tests.
Using H2 seems ideal in this case.

H2 appears to be unsupported because of the failure message below.

The fw build command is failing in mod-workflow when using H2.

$ fw build my-test-workflow
(node:2140) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
failed post http://localhost:9001/mod-workflow/triggers {
  id: '04a4ad57-c205-4c77-b7de-2a5015cd6b58',
  name: "Rajdeep's Workflow Start Trigger",
  description: 'Rest Post Endpoint',
  type: 'MESSAGE_CORRELATE',
  method: 'POST',
  deserializeAs: 'EventTrigger',
  pathPattern: '/events/workflow/my-test-workflow/start'
}
{
  errors: [
    {
      message: 'Could not alter JDBC connection to use schema [tamu_workflow_service]',
      type: 'HibernateException',
      code: '500 INTERNAL_SERVER_ERROR',
      parameters: []
    }
  ],
  total_records: 1
}

The Docker image (built using the build_and_run Dockerfile) is run using the following environment variables and settings:

export SPRING_JPA_DATABASEPLATFORM="org.hibernate.dialect.H2Dialect"
export SPRING_DATASOURCE_PLATFORM="h2"
export SPRING_DATASOURCE_DRIVERCLASSNAME="org.h2.Driver"
export SPRING_DATASOURCE_URL="jdbc:h2:./mod-workflow;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"
export SPRING_SQL_INIT_PLATFORM="h2"

docker run -d -p 9001:9001 -p 61616:61616 -e "SPRING_JPA_DATABASEPLATFORM=$SPRING_JPA_DATABASEPLATFORM" -e "SPRING_DATASOURCE_PLATFORM=$SPRING_DATASOURCE_PLATFORM" -e "SPRING_DATASOURCE_DRIVERCLASSNAME=$SPRING_DATASOURCE_DRIVERCLASSNAME" -e "SPRING_DATASOURCE_URL=$SPRING_DATASOURCE_URL" -e "SPRING_SQL_INIT_PLATFORM=$SPRING_SQL_INIT_PLATFORM" -e "SERVER_PORT=9001" mod-workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant