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

Update Step 14 and 16 instructions in Break Monolith Apart - I #29

Closed
leaswaran1976 opened this issue Feb 13, 2020 · 3 comments
Closed

Comments

@leaswaran1976
Copy link

Hi,

When executing step 14 "mvn compile quarkus:dev" of Chapter 5 (Break Monolith Apart - I) in module 1 following error is encountered

ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#build threw an exception: io.quarkus.deployment.configuration.ConfigurationError: Hibernate extension cannot guess the dialect as no JDBC driver is specified by 'quarkus.datasource.driver' at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.guessDialect(HibernateOrmProcessor.java:509)

I guess the issue is because of application.properties pointing to prod settings as below at step 14

%prod.quarkus.datasource.url=jdbc:postgresql://inventory-database:5432/inventory
%prod.quarkus.datasource.driver=org.postgresql.Driver
%prod.quarkus.datasource.username=inventory
%prod.quarkus.datasource.password=mysecretpassword
%prod.quarkus.datasource.max-size=8
%prod.quarkus.datasource.min-size=2
%prod.quarkus.hibernate-orm.database.generation=drop-and-create
%prod.quarkus.hibernate-orm.sql-load-script=import.sql
%prod.quarkus.hibernate-orm.log.sql=true

Step 14 instructions must include to modify application.properties with following and then run "Build and Run Locally"

quarkus.datasource.url=jdbc:h2:file://projects/database.db
quarkus.datasource.driver=org.h2.Driver
quarkus.datasource.username=inventory
quarkus.datasource.password=mysecretpassword
quarkus.datasource.max-size=8
quarkus.datasource.min-size=2
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.log.sql=false

Step 16 instructions must note to update application.properties to
%prod.quarkus.datasource.url=jdbc:postgresql://inventory-database:5432/inventory
%prod.quarkus.datasource.driver=org.postgresql.Driver
%prod.quarkus.datasource.username=inventory
%prod.quarkus.datasource.password=mysecretpassword
%prod.quarkus.datasource.max-size=8
%prod.quarkus.datasource.min-size=2
%prod.quarkus.hibernate-orm.database.generation=drop-and-create
%prod.quarkus.hibernate-orm.sql-load-script=import.sql
%prod.quarkus.hibernate-orm.log.sql=true

and then redeploy

@danieloh30
Copy link
Member

Did you replace these properties with existing ones or add it? You need to add %prod.xxxx properties rather than replacement as instruction.

mvn compile quarkus:dev equals "Build and Run Locally".

@leaswaran1976
Copy link
Author

I realize my mistake now. You are saying I should not have removed dev properties. You are right. I replaced dev properties with %prod properties and hence the issue.

Please close the ticket. Instructions also clearly say that add %prod properties to application.properties and NOT "replace".

There is no issue here.

@danieloh30
Copy link
Member

Cool.

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

2 participants