Git Product home page Git Product logo

quarkus-quickstarts's Introduction

QuickStarts for Getting Started Guides

This repository contains a set of Quickstarts for the Quarkus framework. Each of them have a Getting started guide.

Requirements

To compile and run these demos you will need:

  • JDK 17+
  • Mandrel or GraalVM

See the Building a Native Executable guide for help setting up your environment.

Use alternative platforms

These quickstart by default currently uses the Quarkus core BOM.

If you want to use an alternative BOM when building the quickstart you can override the quarkus.platform.* properties. The following example shows how to set quarkus.platform.artifact-id to use the universe-bom.

mvn -Dquarkus.platform.artifact-id=quarkus-universe-bom clean install

Contributions

See CONTRIBUTING for how to build these examples.

Quick Start list

There is documentation published at https://quarkus.io (docs' sources are here).

quarkus-quickstarts's People

Contributors

cescoffier avatar davided avatar dependabot[bot] avatar fabricepipart avatar famod avatar fromage avatar gastaldi avatar ge0ffrey avatar geoand avatar gsmet avatar gunnarmorling avatar jmartisk avatar johnaohara avatar karesti avatar karm avatar kenfinnigan avatar loicmathieu avatar marcinczeczko avatar michalszynkiewicz avatar mkouba avatar ozangunalp avatar rsvoboda avatar sanne avatar sberyozkin avatar starksm64 avatar stuartwdouglas avatar tsegismont avatar vorburger avatar xstefank avatar yrodiere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quarkus-quickstarts's Issues

Automate the quickstart publication process

The quickstart publication process should be fully automated and integrated with the overall release process.
Development should be separated from what users land with.
Force push is not acceptable
Emergency fix should be doable out of band of a release and fully reconcilable
Merge conflict most not happen as its release will be automated
Should work when a user git clone and cd into it

Create a quickstart using MQTT

There is quickstart for Kafka. A similar quickstart of MQTT will help people (like myself) get started with Quarkus and MQTT.

Hibernate - Entity Manager is not being scoped

I got the next error, with a custom project and also with hibernate-orm-panache-resteasy project, so it's clear that it does not have nothing related to my own code.

At the start of the server, the log shows the next message:
20:41:06,658 INFO [org.hib.orm.beans] HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.

Then when I call a service using panache methods, i got the next exception:

javax.enterprise.context.ContextNotActiveException:
at io.quarkus.hibernate.orm.runtime.RequestScopedEntityManagerHolder_ClientProxy.delegate(Unknown Source)
at io.quarkus.hibernate.orm.runtime.RequestScopedEntityManagerHolder_ClientProxy.getOrCreateEntityManager(Unknown Source)
at io.quarkus.hibernate.orm.runtime.entitymanager.TransactionScopedEntityManager.getEntityManager(TransactionScopedEntityManager.java:91)
at io.quarkus.hibernate.orm.runtime.entitymanager.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:276)
at io.quarkus.hibernate.orm.runtime.entitymanager.ForwardingEntityManager.createQuery(ForwardingEntityManager.java:158)
at io.quarkus.hibernate.orm.panache.runtime.JpaOperations.find(JpaOperations.java:186)
at io.quarkus.hibernate.orm.panache.runtime.JpaOperations.find(JpaOperations.java:178)

Micrometer metrics for quarkus vertx

Could not able to get micrometer metrics from quarkus vertx.
Followed this documentation
https://vertx.io/docs/vertx-micrometer-metrics/java/

and below code

VertxOptions vertxOptions = new VertxOptions().setMetricsOptions(
              new MicrometerMetricsOptions()
                      .setInfluxDbOptions(new VertxInfluxDbOptions().setEnabled(true)
                              .setUri("http://localhost:8086")
                              .setDb("quarkusdb").setUserName("admin").setPassword("admin"))
                      .setEnabled(true));
      Vertx vertx = Vertx.vertx(vertxOptions);
      this.webClient = WebClient.create(vertx); 

hibernate-orm-resteasy occurred duplicate key Error

Ran the quarkus:dev mvn plugin target and it looks like the import.sql is being run twice. Server still starts up successfully however.

Output:

"C:\Program Files\Java\jdk-11.0.1\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\dev\git\quarkus-quickstarts\hibernate-orm-resteasy "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.2\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.2\lib\idea_rt.jar=53008:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.3.5 io.quarkus:quarkus-maven-plugin:0.11.0:dev -P native
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building hibernate-orm-resteasy 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-osgi:jar:2.2.10 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- quarkus-maven-plugin:0.11.0:dev (default-cli) @ hibernate-orm-resteasy ---
[INFO] Using servlet resources C:\dev\git\quarkus-quickstarts\hibernate-orm-resteasy\src\main\resources\META-INF\resources
Listening for transport dt_socket at address: 5005
2019-03-18 17:53:28,005 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-03-18 17:53:28,694 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 689ms
Hibernate: 
    
    drop table if exists known_fruits cascade
2019-03-18 17:53:29,393 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (main) SQL Warning Code: 0, SQLState: 00000
2019-03-18 17:53:29,393 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (main) table "known_fruits" does not exist, skipping
Hibernate: 
    
    drop sequence if exists known_fruits_id_seq
2019-03-18 17:53:29,395 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (main) SQL Warning Code: 0, SQLState: 00000
2019-03-18 17:53:29,395 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (main) sequence "known_fruits_id_seq" does not exist, skipping
Hibernate: create sequence known_fruits_id_seq start 10 increment 1
Hibernate: 
    
    create table known_fruits (
       id int4 not null,
        name varchar(40),
        primary key (id)
    )
Hibernate: 
    
    alter table if exists known_fruits 
       add constraint UK_57g3m8wr3qxoj706a6hsqg6ye unique (name)
Hibernate: 
    INSERT INTO known_fruits(id, name) VALUES (1, 'Cherry')
Hibernate: 
    INSERT INTO known_fruits(id, name) VALUES (2, 'Apple')
Hibernate: 
    INSERT INTO known_fruits(id, name) VALUES (3, 'Banana')
Hibernate: 
    INSERT INTO known_fruits(id, name) VALUES (1, 'Cherry')
2019-03-18 17:53:29,463 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (main) GenerationTarget encountered exception accepting command : Error executing DDL "INSERT INTO known_fruits(id, name) VALUES (1, 'Cherry')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "INSERT INTO known_fruits(id, name) VALUES (1, 'Cherry')" via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applyImportSources(SchemaCreatorImpl.java:493)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:180)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:80)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:68)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:114)
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:71)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmTemplate.startAllPersistenceUnits(HibernateOrmTemplate.java:88)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits12.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:93)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:119)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:121)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:82)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "known_fruits_pkey"
  Detail: Key (id)=(1) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:221)
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
	... 22 more

Hibernate: 
    INSERT INTO known_fruits(id, name) VALUES (2, 'Apple')
2019-03-18 17:53:29,468 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (main) GenerationTarget encountered exception accepting command : Error executing DDL "INSERT INTO known_fruits(id, name) VALUES (2, 'Apple')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "INSERT INTO known_fruits(id, name) VALUES (2, 'Apple')" via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applyImportSources(SchemaCreatorImpl.java:493)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:180)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:80)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:68)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:114)
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:71)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmTemplate.startAllPersistenceUnits(HibernateOrmTemplate.java:88)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits12.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:93)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:119)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:121)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:82)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "known_fruits_pkey"
  Detail: Key (id)=(2) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:221)
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
	... 22 more

Hibernate: 
    INSERT INTO known_fruits(id, name) VALUES (3, 'Banana')
2019-03-18 17:53:29,472 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (main) GenerationTarget encountered exception accepting command : Error executing DDL "INSERT INTO known_fruits(id, name) VALUES (3, 'Banana')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "INSERT INTO known_fruits(id, name) VALUES (3, 'Banana')" via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applyImportSources(SchemaCreatorImpl.java:493)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:180)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:80)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:68)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:114)
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:71)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmTemplate.startAllPersistenceUnits(HibernateOrmTemplate.java:88)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits12.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:93)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:119)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:121)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:82)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "known_fruits_pkey"
  Detail: Key (id)=(3) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:221)
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
	... 22 more

2019-03-18 17:53:29,567 INFO  [io.quarkus] (main) Quarkus 0.11.0 started in 1.633s. Listening on: http://127.0.0.1:8080
2019-03-18 17:53:29,568 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-postgresql, narayana-jta, resteasy, resteasy-jsonb]
Hibernate: 
    select
        fruit0_.id as id1_0_,
        fruit0_.name as name2_0_ 
    from
        known_fruits fruit0_ 
    order by
        fruit0_.name

"address already in use" doesn't fail a compile

When the chosen port is not available to bind to, maven still considers the compile a success. From the getting-started sub-directory:

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< org.acme:shamrock-quickstart >--------------------
[INFO] Building shamrock-quickstart 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ shamrock-quickstart ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/jon/protean-quickstarts/getting-started/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ shamrock-quickstart ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/jon/protean-quickstarts/getting-started/target/classes
[INFO] 
[INFO] --- shamrock-maven-plugin:0.6.0:dev (default-cli) @ shamrock-quickstart ---
[ERROR] Port 5005 in use, not starting in debug mode
2019-01-17 13:54:57,123 localhost shamrock-quickstart-dev.jar[25297] INFO  [o.xnio] (main) XNIO version 3.6.5.Final
2019-01-17 13:54:57,158 localhost shamrock-quickstart-dev.jar[25297] INFO  [o.x.nio] (main) XNIO NIO Implementation Version 3.6.5.Final
2019-01-17 13:54:57,242 localhost shamrock-quickstart-dev.jar[25297] INFO  [o.j.threads] (main) JBoss Threads version 3.0.0.Alpha4
Exception in thread "main" java.lang.RuntimeException: java.net.BindException: Address already in use
	at io.undertow.Undertow.start(Undertow.java:249)
	at org.jboss.shamrock.undertow.runtime.UndertowDeploymentTemplate.startUndertowEagerly(UndertowDeploymentTemplate.java:241)
	at org.jboss.shamrock.dev.RuntimeCompilationSetup.setup(RuntimeCompilationSetup.java:64)
	at org.jboss.shamrock.dev.DevModeMain.main(DevModeMain.java:80)
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:178)
	at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:303)
	at io.undertow.Undertow.start(Undertow.java:194)
	... 3 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.272 s
[INFO] Finished at: 2019-01-17T13:54:57Z
[INFO] ------------------------------------------------------------------------

IMHO this should fail the build.

Generic package names, GreetingResource / GreetingService overused

Following classes have too generic package name, other packages indicate related technology or quickstart (QS) .

Do we need so many QS with GreetingResource.java / GreetingService.java ?

org/acme/quarkus/sample/PriceConverter.java
org/acme/quarkus/sample/PriceGenerator.java
org/acme/quarkus/sample/PriceResource.java
org/acme/quickstart/GreetingResource.java
org/acme/quickstart/GreetingResource.java
org/acme/quickstart/GreetingResource.java
org/acme/quickstart/GreetingResource.java
org/acme/quickstart/GreetingService.java
org/acme/quickstart/GreetingService.java
org/acme/quickstart/GreetingService.java
org/acme/quickstart/GreetingService.java

404 at /hello with getting-started quickstart

Fresh RHEL 7.6 (server) installation, installed java 1.8 from RHEL, mvn 3.6.0 from apache, cloned this repo, set up ~/.m2/settings.xml according to the getting-started document, ran mvn compile shamrock:dev, got a listening webserver, but the endpoint is not working:

$ curl -D- http://localhost:8080/hello
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 0
Date: Wed, 16 Jan 2019 18:02:13 GMT

$ curl -D- http://localhost:8080/
HTTP/1.1 403 Forbidden
Connection: keep-alive
Content-Type: text/html;charset=UTF-8
Content-Length: 68
Date: Wed, 16 Jan 2019 18:02:15 GMT

<html><head><title>Error</title></head><body>Forbidden</body></html>

The latter (/) is not expected to work but included for completion's sake. I have verified that this is indeed the quickstart running on port 8080 - fresh VM, nothing else going on.

Camel quickstart does not build with -Pnative

The native profile was commented out by @gsmet in 6e4d309

When the profile made active again, the following happens:

[INFO] --- quarkus-maven-plugin:0.13.3:native-image (default) @ camel-java ---
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] Running Quarkus native-image plugin on OpenJDK 64-Bit Server VM
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] /home/ppalaga/bin/graalvm/graalvm-ce-1.0.x/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-DCamelSimpleLRUCacheFactory=true -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar camel-java-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:+PrintAnalysisCallTree -H:-AddAllCharsets -H:EnableURLProtocols=http -H:NativeLinkerOption=-no-pie -H:-SpawnIsolates -H:-JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace
[camel-java-1.0-SNAPSHOT-runner:13062]    classlist:   3,364.68 ms
[camel-java-1.0-SNAPSHOT-runner:13062]        (cap):     906.02 ms
[camel-java-1.0-SNAPSHOT-runner:13062]        setup:   2,081.11 ms
11:15:44,338 INFO  [org.acm.cam.jav.CamelLifecycle] Initializing Camel...
11:15:44,364 INFO  [org.apa.cam.imp.con.FastTypeConverterRegistry] Type converters loaded (core: 183, classpath: 14)
11:15:44,369 INFO  [io.qua.cam.cor.run.sup.RuntimeRegistry] Creating interface org.apache.camel.spi.Language for name simple
11:15:44,369 INFO  [io.qua.cam.cor.run.sup.FastCamelContext] Binding language simple with prefix camel.language.simple
11:15:44,372 INFO  [org.acm.cam.jav.CamelLifecycle] Initialized Camel...
11:15:44,372 INFO  [org.acm.cam.jav.CamelLifecycle] Context: CamelContext(camel-1)
11:15:44,377 INFO  [io.qua.cam.cor.run.sup.FastCamelRuntime] No xml routes configured
11:15:44,392 INFO  [org.acm.cam.jav.Beans] Creating timer component from CDI
11:15:44,392 INFO  [io.qua.cam.cor.run.sup.FastCamelContext] Binding component timer with prefix camel.component.timer
11:15:44,399 INFO  [io.qua.cam.cor.run.sup.RuntimeRegistry] Creating interface org.apache.camel.spi.Language for name constant
11:15:44,399 INFO  [io.qua.cam.cor.run.sup.FastCamelContext] Binding language constant with prefix camel.language.constant
11:15:44,406 INFO  [io.qua.cam.cor.run.sup.RuntimeRegistry] Creating interface org.apache.camel.Component for name log
11:15:44,406 INFO  [io.qua.cam.cor.run.sup.FastCamelContext] Binding component log with prefix camel.component.log
[camel-java-1.0-SNAPSHOT-runner:13062]     analysis:   6,685.46 ms
Printing call tree to /home/ppalaga/orgs/quarkus/quarkus-quickstarts/camel-java/target/reports/call_tree_camel-java-1.0-SNAPSHOT-runner_20190425_111552.txt
Printing list of used classes to /home/ppalaga/orgs/quarkus/quarkus-quickstarts/camel-java/target/reports/used_classes_camel-java-1.0-SNAPSHOT-runner_20190425_111552.txt
Printing list of used packages to /home/ppalaga/orgs/quarkus/quarkus-quickstarts/camel-java/target/reports/used_packages_camel-java-1.0-SNAPSHOT-runner_20190425_111552.txt
Error: should not reach here: Could not find field com.sun.beans.WeakCache.map on class io.quarkus.camel.core.runtime.graal.Target_com_sun_beans_WeakCache
        object com.sun.beans.WeakCache
        field java.beans.Introspector.declaredMethodCache
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1

Injecting using 'javax.inject.Provider' into JAX-RS Resource fails build

Quarkus Version: 0.11.0
Maven Version: 3.6.0
Java Version: 1.8.0_191

While using io.quarkus:quarkus-smallrye-jwt and performing the following:

@Path("v1")
@Produces(APPLICATION_JSON)
@DenyAll
public class HelloWorldResource {
	@Inject
	private Provider<JsonWebToken> jwtProvider;

The build fails with:

ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.11.0:build (default) on project quarkus-service-example: Failed to build a runnable JAR: Failed to build a runner jar: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.arc.deployment.ArcAnnotationProcessor#build threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.inject.Provider<org.eclipse.microprofile.jwt.JsonWebToken> and qualifiers [@Default]
[ERROR] 	- java member: acme.jaxrs.v1.HelloWorldResource#jwtProvider
[ERROR] 	- declared on CLASS bean [types=[acme.jaxrs.v1.HelloWorldResource, java.lang.Object], qualifiers=[@Default, @Any], target=acme.jaxrs.v1.HelloWorldResource]
[ERROR] -> [Help 1]

Workaround
Use javax.enterprise.inject.Instance

Adding a Knative quickstart

Extending an existing greeter quickstart to provide a knative serving quick start that shows end to end build to deploy

Resources defaulting to ApplicationScoped

Quarkus Version: 0.11.0
Maven Version: 3.6.0
Java Version: 1.8.0_191

It appears on build that JAX-RS resources are defaulting to @ApplicationScope. e.g.:

@Path("v1")
@Produces(APPLICATION_JSON)
public class HelloWorldResource {

Is resulting in a message:

[INFO] [io.quarkus.arc.processor.BeanProcessor] Found unrecommended usage of private members (use package-private instead) in application beans:
	- @Inject field acme.jaxrs.v1.HelloWorldResource#jwtProvider

However, ReSTEasy states:

If a JAX-RS root resource does not define a scope explicitly, it is bound to the Request scope.

See here.

Also, there is also a question regarding "unrecommended usage of private members...in application beans": what is the rationale around this?

Address already in use

Hi, working through https://quarkus.io/guides/building-native-image-guide running the following command;

 ./mvnw package -Pnative

Results in

Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:178)
	at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:310)
	at io.undertow.Undertow.start(Undertow.java:193)
	... 43 more
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.966 s <<< FAILURE! - in org.acme.config.GreetingResourceTest
[ERROR] org.acme.config.GreetingResourceTest  Time elapsed: 0.965 s  <<< ERROR!
java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use
Caused by: java.net.BindException: Address already in use

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   GreetingResourceTest » Runtime Failed to start quarkus
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for quickstart-projects 1.0-SNAPSHOT:
[INFO]
[INFO] application-configuration .......................... FAILURE [  3.096 s]
[INFO] application-lifecycle-events ....................... SKIPPED

My listening port list is

$ netstat -ap tcp | grep -i "listen"
tcp46      0      0  *.sunproxyadmin        *.*                    LISTEN
tcp46      0      0  *.64822                *.*                    LISTEN
tcp4       0      0  localhost.boks_clntd   *.*                    LISTEN
tcp4       0      0  *.17500                *.*                    LISTEN
tcp6       0      0  *.17500                *.*                    LISTEN
tcp4       0      0  localhost.17603        *.*                    LISTEN
tcp4       0      0  localhost.17600        *.*                    LISTEN
tcp6       0      0  localhost.6263         *.*                    LISTEN
tcp4       0      0  localhost.6263         *.*                    LISTEN
tcp6       0      0  localhost.6258         *.*                    LISTEN
tcp4       0      0  localhost.6258         *.*                    LISTEN
tcp4       0      0  localhost.9005         *.*                    LISTEN
tcp4       0      0  localhost.4244         *.*                    LISTEN
tcp6       0      0  *.996                  *.*                    LISTEN
tcp4       0      0  *.999                  *.*                    LISTEN
tcp6       0      0  *.1012                 *.*                    LISTEN
tcp4       0      0  *.1017                 *.*                    LISTEN
tcp6       0      0  *.1019                 *.*                    LISTEN
tcp4       0      0  *.1021                 *.*                    LISTEN
tcp6       0      0  *.sunrpc               *.*                    LISTEN
tcp4       0      0  *.sunrpc               *.*                    LISTEN
tcp6       0      0  *.nfsd                 *.*                    LISTEN
tcp4       0      0  *.nfsd                 *.*                    LISTEN
tcp6       0      0  *.1022                 *.*                    LISTEN
tcp4       0      0  *.1023                 *.*                    LISTEN
tcp46      0      0  *.upnotifyp            *.*                    LISTEN
tcp4       0      0  *.upnotifyp            *.*                    LISTEN
tcp4       0      0  *.kerberos             *.*                    LISTEN
tcp6       0      0  *.kerberos             *.*                    LISTEN
tcp4       0      0  *.ssh                  *.*                    LISTEN
tcp6       0      0  *.ssh                  *.*                    LISTEN
tcp4       0      0  *.rfb                  *.*                    LISTEN
tcp6       0      0  *.rfb                  *.*                    LISTEN

Can you tell me what port is causing the problem and how I modify the configuration to change the conflicting port?

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1815

$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

$ git rev-parse HEAD
fa85915

Thanks.

Pom files should be indented consistently

Some of the pom files are indented with 2 spaces and some with 4 spaces. It makes it a bit tedious to copy/paste things from one to another.

I would vote for making it consistently 4 spaces and reformat everything.

It should be done when we don't have pull requests pending to avoid conflicts.

Declare the private Protean repositories

Otherwise the released artifacts can't be found unless you modify your settings.xml.

We also have to declare the <pluginRepositories>.

We don't have a parent currently, so either we declare one and have the repositories there or we will need to declare them on every quickstart.

I would lean towards having a parent with just the repositories information so that the quickstarts pom files stay clear and comprehensive but let's wait for @cescoffier on this.

fabric8 docker-maven-plugin does not handle proper shutdown of Postgres

Hello,

Apparently if one runs more than one test that uses Postgres in succession, it does not land well, see Logs.

We have been successfully using Github's Docker integration for allocating and deallocating Postgres not only as a Docker container.
It sports

  • active waiting for TCP
  • and using SELECT 1 to test that the DB system is really up
  • it tears down and terminates the container correctly

The dynamic loading of DB driver would be likely a huge overkill, especially for native image 😃 perhaps, but the idea of driving the allocation from the integration test code is IMHO worth pondering. It might prove more stable than relying on fabric8 maven plugin and

<wait>
    <tcp>
        <mode>mapped</mode>
        <ports>
            <port>5432</port>
        </ports>
    </tcp>
    <time>10000</time>
</wait>

Logs

[ERROR] DOCKER> Error occurred during container startup, shutting down...
[ERROR] DOCKER> I/O Error [Unable to start container id [bb1a9c658c61] : {"message":"driver failed programming external connectivity on endpoint postgres-2 (91f5f0141ebfad562ef9aaca29e8a47fd05872a6fb9822a437ac13ca43e26363): Bind for 0.0.0.0:5432 failed: port is already allocated"} (Internal Server Error: 500)]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] application-configuration .......................... SUCCESS [ 54.645 s]
[INFO] application-lifecycle-events ....................... SUCCESS [ 56.919 s]
[INFO] quarkus-quickstart ................................. SUCCESS [ 56.146 s]
[INFO] quarkus-quickstart-async ........................... SUCCESS [ 56.648 s]
[INFO] hibernate-orm-resteasy ............................. SUCCESS [02:35 min]
[INFO] hibernate-orm-panache-resteasy ..................... FAILURE [ 17.110 s]
[INFO] infinispan-client .................................. SKIPPED
[INFO] validation ......................................... SKIPPED
[INFO] scheduling-periodic-tasks .......................... SKIPPED
[INFO] using-websockets ................................... SKIPPED
[INFO] using-opentracing .................................. SKIPPED
[INFO] using-spring-di .................................... SKIPPED
[INFO] using-jwt-rbac ..................................... SKIPPED
[INFO] rest-client ........................................ SKIPPED
[INFO] kafka-quickstart ................................... SKIPPED
[INFO] rest-json .......................................... SKIPPED
[INFO] quarkus-quickstart-knative ......................... SKIPPED
[INFO] quarkus-quickstart-testing ......................... SKIPPED
[INFO] microprofile-fault-tolerance ....................... SKIPPED
[INFO] microprofile-health ................................ SKIPPED
[INFO] microprofile-metrics ............................... SKIPPED
[INFO] quickstart-projects ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:37 min

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.28.0:start (docker-start) on project hibernate-orm-panache-resteasy: I/O Error: Unable to start container id [bb1a9c658c61] : {"message":"driver failed programming external connectivity on endpoint postgres-2 (91f5f0141ebfad562ef9aaca29e8a47fd05872a6fb9822a437ac13ca43e26363): Bind for 0.0.0.0:5432 failed: port is already allocated"} (Internal Server Error: 500) -> [Help 1]
karm@local:~/workspaceRH/quarkus-quickstarts (master=)$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
96d8e3f6dc28        postgres:10.5       "docker-entrypoint.s…"   19 minutes ago      Up 19 minutes       0.0.0.0:5432->5432/tcp   postgres-1

Version Bump ignores getting-started/build.gradle

I just noticed that the 8af8b36 [RELEASE] - Bump version to 0.13.0 which @gsmet and @cescoffier did earlier today missed to bump the version from 0.12.0 to 0.13.0 in quarkus-quickstarts/getting-started/build.gradle

I've raise PR #137 to manually fix it, but perhaps on the next bump whatever script is (presumably) used to do the release could be adjusted to do it automatically?

@stalep FYI

Build with java 12 fails

Just followed the guide:

 git clone https://github.com/quarkusio/quarkus-quickstarts.git
 cd quarkus-quickstarts
 mvn package

During the build I had this error:

[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ application-configuration ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.config.GreetingResourceTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.296 s <<< FAILURE! - in org.acme.config.GreetingResourceTest
[ERROR] org.acme.config.GreetingResourceTest  Time elapsed: 0.295 s  <<< ERROR!
java.lang.RuntimeException: 
org.jboss.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingStaticInit threw an exception: java.lang.Error: java.lang.NoSuchFieldException: override
Caused by: org.jboss.builder.BuildException: 
Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingStaticInit threw an exception: java.lang.Error: java.lang.NoSuchFieldException: override
Caused by: java.lang.Error: java.lang.NoSuchFieldException: override
Caused by: java.lang.NoSuchFieldException: override

$ java -version
java version "12" 2019-03-19
Java(TM) SE Runtime Environment (build 12+33)
Java HotSpot(TM) 64-Bit Server VM (build 12+33, mixed mode, sharing)

Improve Knative Quickstart

Improve Knative Quickstart to:

  1. Upgrade to v0.12.0
  2. Improve on docker build
  3. Use official docker builder images

@cescoffier - can you please assign this task to me ?

Gradle configs should enforce quarkus-bom versions

An example

dependencies {
    implementation enforcedPlatform("io.quarkus:quarkus-bom:${quarkusVersion}")
    implementation 'io.quarkus:quarkus-resteasy'

In this case the extension version will be coming from the BOM. And it will also use the correct versions for the transitive dependencies.
Currently, org.wildfly.common:wildfly-common:1.5.0.Final ends up being used instead of version 1.5.0.Final-format-001 which breaks some quickstarts.

hibernate-orm-panache-resteasy occurred duplicate key Error

I executed mvn compile quarkus:dev
hibernate-orm-panache-resteasy occurred duplicate key Error.
I think import.sql has been run multiple times.

java and maven version

hibernate-orm-panache-resteasy$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

hibernate-orm-panache-resteasy$ mvn -version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T03:41:47+09:00)
Maven home: /opt/apache-maven-3.6.0
Java version: 1.8.0_202, vendor: Amazon.com Inc., runtime: /opt/amazon-corretto-8.202.08.2-linux-x64/jre
Default locale: ja_JP, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-20-generic", arch: "amd64", family: "unix"

And the stack trace:

hibernate-orm-panache-resteasy$ mvn compile quarkus:dev
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------< org.acme:hibernate-orm-panache-resteasy >---------------
[INFO] Building hibernate-orm-panache-resteasy 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hibernate-orm-panache-resteasy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ hibernate-orm-panache-resteasy ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- quarkus-maven-plugin:0.11.0:dev (default-cli) @ hibernate-orm-panache-resteasy ---
[INFO] Using servlet resources /home/tmatsuzaki/Documents/git/quarkus-quickstarts/hibernate-orm-panache-resteasy/src/main/resources/META-INF/resources
Listening for transport dt_socket at address: 5005
2019-03-16 11:31:22,391 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-03-16 11:31:23,527 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 1136ms
Hibernate: 
    
    drop table if exists Fruit cascade
Hibernate: 
    
    drop sequence if exists hibernate_sequence
Hibernate: create sequence hibernate_sequence start 1 increment 1
Hibernate: 
    
    create table Fruit (
       id int8 not null,
        name varchar(40),
        primary key (id)
    )
Hibernate: 
    
    alter table if exists Fruit 
       add constraint UK_qn1mp5t3oovyl0h02glapi2iv unique (name)
Hibernate: 
    INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Cherry')
Hibernate: 
    INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Apple')
Hibernate: 
    INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Banana')
Hibernate: 
    INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Cherry')
2019-03-16 11:31:24,425 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (main) GenerationTarget encountered exception accepting command : Error executing DDL "INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Cherry')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Cherry')" via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applyImportSources(SchemaCreatorImpl.java:493)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:180)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:80)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:68)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:114)
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:71)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmTemplate.startAllPersistenceUnits(HibernateOrmTemplate.java:88)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:93)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:119)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:121)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:82)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_qn1mp5t3oovyl0h02glapi2iv"
  詳細: Key (name)=(Cherry) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:221)
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
	... 22 more

Hibernate: 
    INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Apple')
2019-03-16 11:31:24,431 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (main) GenerationTarget encountered exception accepting command : Error executing DDL "INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Apple')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Apple')" via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applyImportSources(SchemaCreatorImpl.java:493)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:180)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:80)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:68)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:114)
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:71)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmTemplate.startAllPersistenceUnits(HibernateOrmTemplate.java:88)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:93)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:119)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:121)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:82)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_qn1mp5t3oovyl0h02glapi2iv"
  詳細: Key (name)=(Apple) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:221)
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
	... 22 more

Hibernate: 
    INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Banana')
2019-03-16 11:31:24,434 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (main) GenerationTarget encountered exception accepting command : Error executing DDL "INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Banana')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "INSERT INTO fruit(id, name) VALUES (nextval('hibernate_sequence'), 'Banana')" via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applyImportSources(SchemaCreatorImpl.java:493)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:180)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
	at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:80)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:68)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:114)
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:71)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmTemplate.startAllPersistenceUnits(HibernateOrmTemplate.java:88)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:93)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:119)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:121)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:82)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_qn1mp5t3oovyl0h02glapi2iv"
  詳細: Key (name)=(Banana) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:221)
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
	... 22 more

2019-03-16 11:31:24,574 INFO  [io.quarkus] (main) Quarkus 0.11.0 started in 2.289s. Listening on: http://127.0.0.1:8080
2019-03-16 11:31:24,574 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-postgresql, narayana-jta, resteasy, resteasy-jsonb]

quarkus-quickstarts/hibernate-orm-resteasy not working due a Jandex index issue

When you run this quickstart mvn packge it fails during tests phase with the following error:

TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [FruitsEndpointTest]: org.jboss.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: Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:
        - org.hibernate.engine.spi.ManagedEntity
        - org.hibernate.engine.spi.PersistentAttributeInterceptable
        - org.hibernate.engine.spi.SelfDirtinessTracker
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.
Caused by: java.lang.RuntimeException:
org.jboss.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: Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:
        - org.hibernate.engine.spi.ManagedEntity
        - org.hibernate.engine.spi.PersistentAttributeInterceptable
        - org.hibernate.engine.spi.SelfDirtinessTracker
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.
Caused by: org.jboss.builder.BuildException:

As described in this thread: https://stackoverflow.com/a/55513723/1010947 the solution is to use the Jandex plugin in pom.xml

infinispan-client quickstart - client application in docker

Currently infinispan-client quickstart support docker instance for infinispan server side.

When client app runs in docker container, it ends up with Connection refused: localhost/127.0.0.1:11222 as it can't see infinispan server inside docker container instance.

I think the solution could be to have docker-compose script which would handle network aspect or add instructions for docker network for ispn client and ispn server instances.

Follow-up for #148

quarkus-quickstarts/hibernate-orm-resteasy Postgres for tests is not stopped during mvn package

From quarkusio/quarkus#2235 and @lkrzyzanek

When following quick start https://github.com/quarkusio/quarkus-quickstarts/tree/master/hibernate-orm-resteasy#building-the-demo then mvn package correctly start the postgres for tests but doesn't stop it.
It leads to error when trying to run the demo by docker run .... postgres:10.5

docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 --name quarkus_test -e POSTGRES_USER=quarkus_test -e POSTGRES_PASSWORD=quarkus_test -e POSTGRES_DB=quarkus_test -p 5432:5432 postgres:10.5
docker: Error response from daemon: driver failed programming external connectivity on endpoint quarkus_test (10e54180c8113abed012a33b26789dd2b9e37a086079cbaee54977f8ab5f2f2e): Bind for 0.0.0.0:5432 failed: port is already allocated.

The fix is easy - just attach docker-stop execution to prepare-package phase instead of post-integration-test
https://github.com/quarkusio/quarkus-quickstarts/blob/master/hibernate-orm-resteasy/pom.xml#L145

Various base images for example Docker files

Example Docker files are using various base images, including legacy swd847.

What should be the default ?

getting-started-knative/Dockerfile:FROM gcr.io/cloud-builders/mvn as builder
getting-started-knative/Dockerfile:FROM swd847/centos-graal-native-image-rc12 as nativebuilder
getting-started-knative/Dockerfile:FROM  registry.fedoraproject.org/fedora-minimal
getting-started/src/main/docker/Dockerfile:FROM registry.fedoraproject.org/fedora-minimal
infinispan-client/Dockerfile:FROM centos:7
microprofile-health/src/main/docker/Dockerfile:FROM registry.fedoraproject.org/fedora-minimal
using-openapi-swaggerui/src/main/docker/Dockerfile.jvm:FROM fabric8/java-jboss-openjdk8-jdk
using-openapi-swaggerui/src/main/docker/Dockerfile.native:FROM registry.fedoraproject.org/fedora-minimal
using-opentracing/src/main/docker/Dockerfile:FROM registry.fedoraproject.org/fedora-minimal

Permit Launching Directly in IDE

As it stands, the maven plugin generates a io.quarkus.runner.GeneratedMain which io.quarkus.runtime.Quarkus calls. Unfortunately, this means the main(...) class cannot be called directly within the IDE so does not get any of the benefit of debugging and profiling.

The only way to debug is to run via Maven and remote attach which is onerous.

TokenSecuredResource#helloShouldDeny(SecurityContext) has wrong annotation

One of the solution method has an incorrect @PermitAll annotation that should have been @DenyAll:

    @GET()
    @Path("deny-all")
    @PermitAll
    @Produces(MediaType.TEXT_PLAIN)
    public String helloShouldDeny(@Context SecurityContext ctx) {
        Principal caller =  ctx.getUserPrincipal();
        String name = caller == null ? "anonymous" : caller.getName();
        return "hello + "+name;
    }

Should be:

    @GET()
    @Path("deny-all")
    @DenyAll
    @Produces(MediaType.TEXT_PLAIN)
    public String helloShouldDeny(@Context SecurityContext ctx) {
        Principal caller =  ctx.getUserPrincipal();
        String name = caller == null ? "anonymous" : caller.getName();
        return "hello + "+name;
    }

The associated TokenSecuredResourceTest#testHelloDenyAll needs to be updated to expect a HttpURLConnection.HTTP_FORBIDDEN rather than HttpURLConnection.HTTP_OK.

A problem when i try to run oc

Following steps from official link, an error happened. I am trying to push to openshift.

`~/quarkus-apps> oc new-build --binary --name=quarkus-quickstart -l app=quarkus-quickstart
* A Docker build using binary input will be created
* The resulting image will be pushed to image stream "quarkus-quickstart:latest"
* A binary build was created, use 'start-build --from-dir' to trigger a new build

--> Creating resources with label app=quarkus-quickstart ...
error: the server could not find the requested resource (post imagestreams)
error: the server could not find the requested resource (post buildconfigs)
--> Failed
`

`~/quarkus-apps> oc status -v
In project default on server https://192.168.99.101:8443

svc/kubernetes - 10.96.0.1:443 -> 8443

svc/quarkus-quickstart (all nodes):31220 -> 8080
pod/quarkus-quickstart-7cc745ddd7-j6hvz runs quarkus-quickstart/quickstart:latest

Warnings:

  • Unable to list imagestreams resources. Not all status relationships can be established.
  • Unable to list deploymentconfigs resources. Not all status relationships can be established.
  • Unable to list routes resources. Not all status relationships can be established.

Info:

  • pod/quarkus-quickstart-7cc745ddd7-j6hvz has no liveness probe to verify pods are still running.
    try: oc set probe pod/quarkus-quickstart-7cc745ddd7-j6hvz --liveness ...

View details with 'oc describe /' or list everything with 'oc get all'.
`

~/quarkus-apps> oc get all the server doesn't have a resource type "buildconfigs"

quarkus:dev maven target does not support spaces

If the path where your project lives has a space in it quarkus:dev will fail to start up the application.

For example:
~/te st/quarkus-quickstarts/getting-started . <-- Will not work
~/test/quarkus-quickstarts/getting-started <-- Will work

Using-opentracing quickstart does not build with graalvm 1.0.0-rc14

When I run mvn package -P native from using-opentracing folder I get:

[INFO] --- quarkus-maven-plugin:0.14.0:native-image (default) @ using-opentracing ---
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] Running Quarkus native-image plugin on OpenJDK 64-Bit Server VM
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] /home/gbrown/tools/graal/graalvm/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar using-opentracing-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+PrintAnalysisCallTree -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:NativeLinkerOption=-no-pie -H:-SpawnIsolates -H:+JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace
Error: Could not find option 'FallbackThreshold'. Use -H:PrintFlags= to list all available options.
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image building with exit status 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Example showing paging of large result sets

In speaking with @emmanuelbernard at Summit, I asked if a paging end point example existed. He said the building blocks exist, but it does not yet exist. He asked me to create this ticket and tag him in it.

Example, I have 10,000 rows in my database, via some where clause injections/limits I am only shown a configurable number of elements per page in JSON.

Test Entities with Panache

I tried to test Entities as separate from service and resrouce layers, but I got ContextNotActiveException.

Here's the simple test case:

import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;

@QuarkusTest
public class FruitTest {

    @Test
    public void testFindByName() {
        new Fruit("Apple").persist();
    }
}

And the stack trace:

INFO: XNIO version 3.6.5.Final
Mar 12, 2019 8:16:15 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.6.5.Final
Mar 12, 2019 8:16:15 AM io.quarkus.runtime.Timing printStartupTime
INFO: Quarkus 0.11.0 started in 1.597s. Listening on: http://127.0.0.1:8081
Mar 12, 2019 8:16:15 AM io.quarkus.runtime.Timing printStartupTime
INFO: Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-postgresql, narayana-jta, resteasy, resteasy-jsonb]

javax.enterprise.context.ContextNotActiveException
	at io.quarkus.arc.RequestContext.get(RequestContext.java:50)
	at io.quarkus.arc.RequestContext.get(RequestContext.java:64)
	at io.quarkus.hibernate.orm.runtime.RequestScopedEntityManagerHolder_ClientProxy.delegate(Unknown Source)
	at io.quarkus.hibernate.orm.runtime.RequestScopedEntityManagerHolder_ClientProxy.getOrCreateEntityManager(Unknown Source)
	at io.quarkus.hibernate.orm.runtime.entitymanager.TransactionScopedEntityManager.getEntityManager(TransactionScopedEntityManager.java:91)
	at io.quarkus.hibernate.orm.runtime.entitymanager.TransactionScopedEntityManager.contains(TransactionScopedEntityManager.java:247)
	at io.quarkus.hibernate.orm.runtime.entitymanager.ForwardingEntityManager.contains(ForwardingEntityManager.java:138)
	at io.quarkus.hibernate.orm.panache.runtime.JpaOperations.persist(JpaOperations.java:29)
	at io.quarkus.hibernate.orm.panache.runtime.JpaOperations.persist(JpaOperations.java:25)
	at io.quarkus.hibernate.orm.panache.PanacheEntityBase.persist(PanacheEntityBase.java:37)
	at com.acme.hibernate.orm.panache.FruitTest.testFindByName(FruitTest.java:14)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:532)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:74)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Mar 12, 2019 8:16:16 AM io.quarkus.runtime.Timing printStopTime
INFO: Quarkus stopped in 0.014s

Here's the patch file
#93_Test_Entities_with_Panache.patch.zip

Native build fails for Camel quickstart

mvn clean verify -Pnative

Results in:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-failsafe-plugin must be a valid version but is '${surefire-plugin.version}'. @ line 95, column 22
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.acme:camel-java:1.0-SNAPSHOT (/home/misl/Dev/github/quarkus-quickstarts/camel-java/pom.xml) has 1 error
[ERROR] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-failsafe-plugin must be a valid version but is '${surefire-plugin.version}'. @ line 95, column 22
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

infinispan-client quickstart can't run using docker - server case

infinispan-client quickstart can't run using docker (both client and server cases)

Instructions in README suggest to run ISPN server in docker or on the main system.
Running server in docker causes stuck client application, I had to kill -9 it.
I think it's because of the docker nature where the server is on different network than client.

Errors from client when running against ISPN server in docker:

2019-04-12 09:08:19,549 INFO  [org.inf.cli.hot.imp.tra.net.ChannelFactory] (HotRod-client-async-pool-0)
   ISPN004014: New server added(172.17.0.3:11222), adding to the pool.
2019-04-12 09:08:19,549 INFO  [org.inf.cli.hot.imp.tra.net.ChannelFactory] (HotRod-client-async-pool-0)
   ISPN004016: Server not in cluster anymore(localhost:11222), removing from the pool.
2019-04-12 09:09:19,548

  WARN  [org.inf.cli.hot.imp.tra.net.ChannelFactory] (HotRod-client-async-pool-1)
  ISPN004015: Failed adding new server 172.17.0.3:11222: io.netty.channel.ConnectTimeoutException:
  connection timed out: /172.17.0.3:11222

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.