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

How to use MySQL instead H2 #119

Open
chanhlt opened this issue Dec 17, 2019 · 0 comments
Open

How to use MySQL instead H2 #119

chanhlt opened this issue Dec 17, 2019 · 0 comments

Comments

@chanhlt
Copy link

chanhlt commented Dec 17, 2019

Hi everyone, I am trying switch to use MySQL but it seems not work.
It works fine with default H2 configuration.

{
	":configurator:resource-version": 1,
	":configurator:symbolic-name": "my.app.config",
	":configurator:version": "1.0-SNAPSHOT",
	"org.apache.aries.tx.control.jdbc.xa~microservice": {
		"name": "app.database",
		"osgi.jdbc.driver.class": "org.h2.Driver",
		"url": "jdbc:h2:./data/database"
	},
	"my.app.impl.AlarmDAOImpl": {
		"provider.target": "(name=app.database)"
	}
}

But when change to use MySQL like this:

{
	":configurator:resource-version": 1,
	":configurator:symbolic-name": "my.app.config",
	":configurator:version": "1.0-SNAPSHOT",
	"org.apache.aries.tx.control.jdbc.xa~microservice": {
		"name": "app.database",
		"osgi.jdbc.driver.class": "com.mysql.cj.Driver",
		"url": "jdbc:mysql://root:123@localhost:3306/test?useSSL=false"
	},
	"my.app.impl.AlarmDAOImpl": {
		"provider.target": "(name=app.database)"
	}
}

My app seems to get crash and I cannot access the REST endpoint anymore.
Can anyone help me take a look at my configuration?

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