Coder Social home page Coder Social logo

quarkiverse / quarkus-google-cloud-services Goto Github PK

View Code? Open in Web Editor NEW
53.0 10.0 32.0 1.31 MB

Google Cloud Services Quarkus Extensions

Home Page: https://docs.quarkiverse.io/quarkus-google-cloud-services/main/index.html

License: Apache License 2.0

Java 100.00%
hacktoberfest quarkus gcp quarkus-extension

quarkus-google-cloud-services's Introduction

Quarkiverse - Quarkus Google Cloud Services

All Contributors

version Build License

This repository hosts Quarkus extensions for different Google Cloud Services.

You can find the documentation in the Google Cloud Services Quarkiverse documentation site.

The following services are implemented:

Example applications

Example applications can be found inside the integration-test folder:

  • main: RESTEasy endpoints using all the Google Cloud Services extensions, to be deployed as a standalone JAR.
  • google-cloud-functions: A Google Cloud HTTP function using Google Cloud Storage.
  • app-engine: A RESTEasy endpoint using Google Cloud Storage, to be deployed inside Google App Engine.
  • firebase-admin: RESTEasy endpoints using Firebase Admin SDK features, such as user management.

Contributing

Contributions are always welcome, but better create an issue to discuss them prior to any contributions.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Loïc Mathieu
Loïc Mathieu

💻 🚧
sberyozkin
sberyozkin

💻
Daniel Zou
Daniel Zou

💻
Yuki Nagai
Yuki Nagai

📖
Mads Opheim
Mads Opheim

💻 📖
PeterUlb
PeterUlb

💻
Felipe Sabadini
Felipe Sabadini

💻
Peter Palaga
Peter Palaga

💻
Yann-Thomas LE MOIGNE
Yann-Thomas LE MOIGNE

📖
Guillaume Smet
Guillaume Smet

📖 💻
Lucas Pouzac
Lucas Pouzac

💻
Bernardo Coferre
Bernardo Coferre

💻
Žan Magerl
Žan Magerl

💻
Lars J. Nilsson
Lars J. Nilsson

💻
Dave Maughan
Dave Maughan

💻
Daniel Fiala
Daniel Fiala

💻
James Netherton
James Netherton

💻
Roberto Cortez
Roberto Cortez

💻
Georgios Andrianakis
Georgios Andrianakis

💻
Robert Stupp
Robert Stupp

💻
Hemantkumar Chigadani
Hemantkumar Chigadani

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

quarkus-google-cloud-services's People

Contributors

actions-user avatar allcontributors[bot] avatar aloubyansky avatar bernardocoferre avatar dependabot[bot] avatar dzou avatar felipesabadini avatar fungrim avatar gastaldi avatar geoand avatar gsmet avatar hemantkumar-chigadani avatar jamesnetherton avatar jfbenckhuijsen avatar loicmathieu avatar lucaspouzac avatar madsop avatar maxandersen avatar nahguam avatar peterulb avatar ppalaga avatar quarkiversebot avatar radcortez avatar sberyozkin avatar snazy avatar uny avatar yatho avatar zanmagerl avatar zzhorizonzz 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quarkus-google-cloud-services's Issues

Extension for setup GCP logging

Would it be possible to configure Quarkus Logging for GCP logging ?
As quarkus ignore java.util.logging.config.file, it is not possible to configure it with the GCP LoggingHandler like explianed in https://cloud.google.com/logging/docs/setup/java#the_javautillogging_handler
The only workaround I found, is to register and configure the handler manually ...
The console handler produces logs but the level of the log message is not set in the severity of the LogEntry, etc ...

But maybe I missed something ...
Otherwise, a new extension would be nice, as it was suggested in https://stackoverflow.com/questions/67870277/is-there-is-a-way-to-set-up-google-cloud-logging-for-quarkus#comment119986717_67870277 :)

GCP project ID: Is it fixed at build time?

We're working on using separate GCP projects for test and production. But we are getting permission errors indicating that the application in the production environment tries to access the secret manager in the test environment.

It looks as if the GCP project ID is compiled into the application (ueber-jar package). Is this the case? Is this the case for all the options documented in https://quarkiverse.github.io/quarkiverse-docs/quarkus-google-cloud-services/main/#authenticating?

Since we plan to build the application (ueber-jar, native app and possibly Docker container) once and use the same artifact in both the test and production environment, the project should be separate for the built package. What options do we have to achieve this?

Provide endpoint-override properties

Contributions are always welcome, but better create an issue to discuss them prior to any contributions.

I've just found this repository and realized I'd rather use this than creating my producers in every single project again and again.
The feature I miss most currently is to provide a custom endpoint.

StorageOptions.newBuilder().setCredentials(credentials).setHost(gcpConfiguration.hostOverride.orElse(null)).build().getService();

The sqs lib has the property quarkus.sqs.endpoint-override for that.

Use case: In my tests I start testcontainers which usually expose a locahost:port location. Then I use a custom credential (extends GoogleCredentials implements ServiceAccountSigner) to communicate with the mock server.

On a related note, is there a reason why GcpCredentialProducer produces GoogleCredentials instead of the more generic Credentials? Not a big problem, just requires a non-null returning implementation of refreshAccessToken when talking with the mock server, while Credentials can be extended with returning all null values.

Cloud authentication cannot match the overidden application*.yml with -Dquarkus.config.locations property

Hello,

I am using Quarkus 2.7.5 and 'io.quarkiverse.googlecloudservices:quarkus-google-cloud-pubsub:1.0.0'. I am using an application-local.yml for my local environnement, and i try to start the application using -Dquarkus.config.locations=application-local.yml.

The issue is when starting the application, the Google Cloud authentication is made early and it seems that default application.yml is used instead of application-local.yml. in the stack error, it tried to get this property quarkus.google.cloud.project-id from application.yml ( which contain only variables ), the values are in application-local.yml

I figure out that by overriding this property : quarkus.google.cloud.project-id and using another key, the problem resolved.

is there an another solution to use quarkus.google.cloud.project-id with the overriden application-local.yml ?

Thanks

Stack trace :
`2022-03-18 11:48:26,276 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.dev.appstate.ApplicationStateNotification.waitForApplicationStart(ApplicationStateNotification.java:51)
at io.quarkus.runner.bootstrap.StartupActionImpl.runMainClass(StartupActionImpl.java:122)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:144)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:455)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:66)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:140)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:96)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:132)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:103)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: io.quarkus.runtime.configuration.ConfigurationException: One or more configuration errors have prevented the application from starting. The errors are:

  • SRCFG00011: Could not expand value GCP_PROJECT_ID in property quarkus.google.cloud.project-id`

FireStore problem with native-image

I'm getting errors generating a native image.

#Quarkus
quarkusPluginId=io.quarkus
quarkusPluginVersion=1.10.5.Final
quarkusPlatformGroupId=io.quarkus
quarkusPlatformArtifactId=quarkus-universe-bom
quarkusPlatformVersion=1.10.5.Final
quarkiverseVersion=0.3.0

Building the native-image with ./gradlew -Dquarkus.package.type=native -Dquarkus.native.container-runtime=podman clean build which uses the container quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java11

Error: Class initialization of io.grpc.alts.ComputeEngineChannelBuilder failed. Use the option --initialize-at-run-time=io.grpc.alts.ComputeEngineChannelBuilder to explicitly request delayed initialization of this class.
Original exception that caused the problem: java.lang.NoClassDefFoundError: io/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
        at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
        at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
        at com.oracle.graal.pointsto.meta.AnalysisMethod.<init>(AnalysisMethod.java:108)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
        at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
        at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1622)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
        at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
        at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
        at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
        at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
        at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
        at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 46 more
Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.security.SecureRandom.secureRandomSpi of
                constant java.security.SecureRandom@383e8d4 reached by 
        scanning method com.google.cloud.firestore.FirestoreImpl.autoId(FirestoreImpl.java:86)
Call path from entry point to com.google.cloud.firestore.FirestoreImpl.autoId(): 
        at com.google.cloud.firestore.FirestoreImpl.autoId(FirestoreImpl.java:83)
        at com.google.cloud.firestore.CollectionReference.document(CollectionReference.java:100)
        at com.google.cloud.firestore.CollectionReference.add(CollectionReference.java:187)
        at com.google.cloud.firestore.CollectionReference.add(CollectionReference.java:215)

Haven't had any time yet to look any further.

Official Google Support for GraalVM compilation

Hello!

My name is Dan and I'm one of the engineers looking into getting GraalVM compilation working for Java Google Client Libraries, across different frameworks like Quarkus, Spring, Micronaut, etc. I was excited to see that you were pursuing an effort here for Quarkus and wanted to give you a heads-up on our work. Perhaps the work we've done so far can help you or vice versa.

We started a project very recently here: https://github.com/GoogleCloudPlatform/google-cloud-graalvm-support

We recently were able to get a Quarkus app working here for the Pub/Sub libraries; you might find this interesting: https://github.com/GoogleCloudPlatform/google-cloud-graalvm-support/tree/master/google-cloud-graalvm-samples/quarkus-pubsub-sample

Our goal for Quarkus is to allow the user to enable compilation just by adding these deps:

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-grpc</artifactId>
    </dependency>

    <!-- this is the dep we are providing -->
    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>google-cloud-graalvm-support</artifactId>
    </dependency>

I saw we actually had the same approach for some things so far; one example is in the Storage APIs where we saw that you registered the subclasses of some parent classes for reflection recursively; we did the same thing! We are slowly in the process of building reflection configs for different libraries (I think you are ahead of us). However, if you are interested, we would be willing to explore if it's possible to combine our work so we do not duplicate our efforts.

One difference between our work I saw is that we're currently targeting support towards users using the grpc-netty-shaded dependency. I noticed it seemed like you are excluding grpc-netty-shaded and relying on grpc-netty. Indeed we also had some trouble getting grpc-netty-shaded to work for us. However we ended up trying to target grpc-netty-shaded because we thought it would allow users to avoid the dependency exclusion.

Just wanted to say hello and give a heads up!

  • Dan

cc/ @meltsufin

Adding GCP operations logging exception

I created a fork and played around with adding support for logging directly to GCP operations. It's in a working proof of concept stage at the moment, and I though I should ask you guys if you think it is a good idea before I add more features and start polishing: https://github.com/Fungrim/quarkus-google-cloud-services/tree/main/logging

The ideas is:

  • Log directly to GCP using the Google Java library
  • Support both structured and unstructured logging
  • The log record instant and level should be first class citizen regardless
  • Support labels for things like POD name, app name etc (GCP logging labels acts as "dimensions" when analyzing logs)
  • Support trace ID as a first class citizen (to be able to link GCP traces with logs)
  • Default to ECS format, but make it customizable

The current status is: it works, has an integration test that needs a GCP project and thus isn't in main, and a rough, untested version of the ECS format is in. Has a list of todo's, mostly round configuration. Need more unit tests and polishing.

What do you think? Would you like this to end up as a pull request?

Provides an integration-test with an access token

Provide an integration test that show how to authenticate via an access token with a Google Cloud Service.

For maintenance purpose, this integration test should only use one Google Cloud service not all to avoid too much test duplication.

Avoid duplication of Quarkiverse parent in parent and bom

The Quarkiverse parent is defined in both the extension pack parent and the BOM.
Updating it is done in two places.

We need to try to find a way to update it in one place, or at least add comment to avoid updating it in one place only.

Enhance FirestoreProducer With Option to Setup Emulator

Problem

To use the Firestore emulator, you need to set the FIRESTORE_EMULATOR_HOST environment variable. That is not always feasible. For example, it's impossible to set an environment variable dynamically for integration tests.

That would, for example, be necessary to use the Testcontainers library, which starts the emulator on a random port.

Therefore, it would be beneficial to be able also to set the emulator host via an application property.

Proposed Solution

I propose to add an application property firestore.emulator.host and evaluate it in FirestoreProducer as follows:

@ApplicationScoped
public class FirestoreProducer {

    @Inject
    GoogleCredentials googleCredentials;

    @Inject
    GcpConfigHolder gcpConfigHolder;

    @ConfigProperty(name = "firestore.emulator.host")  // added line
    Optional<String> emulatorHost;                     // added line

    @Produces
    @Singleton
    @Default
    public Firestore firestore() {
        GcpBootstrapConfiguration gcpConfiguration = gcpConfigHolder.getBootstrapConfig();
        return FirestoreOptions.newBuilder().setCredentials(googleCredentials)
                .setHost(emulatorHost.orElse(null))                                                          // added line
                .setCredentials(emulatorHost.isPresent() ? NoCredentials.getInstance() : googleCredentials)  // added line
                .setProjectId(gcpConfiguration.projectId.orElse(null))
                .build()
                .getService();
    }
}

Additional benefits:

  • As the NoCredentials credentials are used, you don't need to create the mocked GoogleCredentials producer anymore.
  • This would work even if you do not use the firestore.emulator.host application property but the FIRESTORE_EMULATOR_HOST environment variable, which would also be mapped to the config property.

(By the way: I also removed the unnecessary throws IOException from the firestore() method.)

Usage With Testcontainers

A Testcontainer can then be configured as follows:

public class FirestoreTestResource implements QuarkusTestResourceLifecycleManager {

  private FirestoreEmulatorContainer emulator;

  @Override
  public Map<String, String> start() {
    emulator =
        new FirestoreEmulatorContainer(
            DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:316.0.0-emulators"));

    emulator.start();

    return Map.of("firestore.emulator.host", emulator.getEmulatorEndpoint());
  }

  @Override
  public void stop() {
    emulator.stop();
  }
}

... and used in an integration test as follows:

@QuarkusTest
@QuarkusTestResource(FirestoreTestResource.class)
class IntegrationTest {

    @Inject
    Firestore firestore;

    ...
}

If you agree that this is a useful extension, I'll be happy to create a PR.

Publish test artifacts to be integrated into the Quarkus platform testsuite

To be able to integrate the Google Cloud Services Quarkus extensions into the Quarkus community platform https://github.com/quarkusio/quarkus-platform, besides the BOM, which already exists, we need to integrate at least some tests that would make sure that the GCS extensions are compatible with the generated platform BOM.

Usually, you would pick some (or even all, depending on the case) of the integration tests from your repository and publish them as test-jars along with your project release. To attach your test artifacts to the project, you should add the following plugin config to the test modules that should be integrated into the platform testsuite.

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

Consider making `quarkus.google.cloud.project-id` optional

Camel provides some alternative ways to configure GCP, e.g. in camel-pubsub, users can pass their projectId through the route definition - see https://camel.apache.org/components/3.11.x/google-pubsub-component.html#_uri_format
This works quite well, but users have to always provide quarkus.google.cloud.project-id even if it is actually not needed. Thus we'd appreciate if quarkus.google.cloud.project-id could please be made optional.

This is very similar to amqphub/quarkus-qpid-jms#11 and quarkusio/quarkus#18231

Resolve GCP project ID from the metadata server

Many GCP products and services are augmented with a metadata server. This endpoint provides useful information about the instance and the environment.

One of the resources it exposes is the ability to retrieve the project ID under which the service is running. Specifically, it can be retrieved using:
http://metadata.google.internal/computeMetadata/v1/project/project-id

Instead of configuring it explicitly via application.properties, the services could resolve this dynamically when the metadata server is available.

Caveat: Even though metadata servers are running directly on the compute instances, since a HTTP request is still necessary to retrieve the values, this could have a small impact to cold start times in constrained environments like Cloud Run/Functions.

Context not active when using secret manager for configuration properties

Hi,

I tried to use Secret Manager for properties in my configuration, but fail:

Nov 27, 2021 10:10:34 AM io.quarkus.runtime.ApplicationLifecycleManager run
ERROR: Failed to start application (with profile prod)
javax.enterprise.context.ContextNotActiveException
	at io.quarkus.arc.impl.ClientProxies.getDelegate(ClientProxies.java:40)
	at io.quarkus.security.runtime.SecurityIdentityProxy_ClientProxy.arc$delegate(SecurityIdentityProxy_ClientProxy.zig:42)
	at io.quarkus.security.runtime.SecurityIdentityProxy_ClientProxy.isAnonymous(SecurityIdentityProxy_ClientProxy.zig:99)
	at io.quarkiverse.googlecloudservices.common.GcpCredentialProducer.googleCredential(GcpCredentialProducer.java:55)
[...]

The application.properties looks like this:

quarkus.google.cloud.project-id=my-project
connection-string=https/user-service:${sm//user-service-pwd}@testhost:8080/

I'm using Quarkus 2.4.2.Final on Java 17 with cloud services version 0.10.0 running in Docker/GKE with Workload Identity. If I inject the SecretManagerServiceClient into code I'm able to use it without errors, so it looks like it's specifically the runtime proiperty resolution that doesn't work.

I'm not super familiar with Quarkus yet, so any assistance would be helpful.

Secret manager needs GOOGLE_APPLICATION_CREDENTIALS env var

When using secret manager and configuration items loading via sm//my.database.password for example, if the GOOGLE_APPLICATION_CREDENTIALS env variable is not set the application fail with

Failed to load config value of type class java.lang.String for: my.database.password

Enhancement: Google Sheets API

Hi,

google sheets API would be a great enhancement, we use it to sync some data between sheets and firestore.

Thanks!

Getting NoClassDefFoundError with native builds

We're using the google cloud storage extension with Gradle by adding the following to our build.gradle file.

implementation "io.quarkiverse.googlecloudservices:quarkus-google-cloud-storage:0.6.0"

However, we are getting the following error when executing a native build using ./gradlew build -Dquarkus.package.type=native.

Fatal error:java.lang.NoClassDefFoundError
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
        at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
        at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:488)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:370)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:529)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:561)
Caused by: java.lang.NoClassDefFoundError: javax/security/jacc/EJBMethodPermission
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
        at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleDeletedClass(AnnotationSubstitutionProcessor.java:512)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:305)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:265)
        at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:929)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:863)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:561)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: javax.security.jacc.EJBMethodPermission
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 16 more
Error: Image build request failed with exit status 1

The build runs fine if we use try to generate and uber-jar using ./gradlew quarkusBuild -Dquarkus.package.type=uber-jar.

Enhancement: Secret Manager

On my project, I'm using GCP's Secret Manager for handling keys, passwords and other secrets.

I can't make it work with Quarkus Native, but the code for the client library looks manageable in size.

Would be happy to contribute on this one if needed.

Getting NoClassDefFoundError: javax/security/jacc/EJBMethodPermission with native builds

Hi all,

we're facing currently the issue, that our native build crashes, with the error NoClassDefFoundError: javax/security/jacc/EJBMethodPermission.

What we use:
Maven 3.8.1
Quarkus 1.13.7 (also tried with 1.13.0)
GraalVM 21.1.0 (also tried 21.0.0.2 & 20.3.1)
quarkus-google-cloud-pubsub 0.7.0 (also tried 0.8.0 & 0.6.0) <--- if we leave this dependecy the build is green

--> Rel: Getting NoClassDefFoundError with native builds #110

Here is the stacktrace of our build:

Status: Downloaded newer image for quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11
quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 21.0.0 (Java Version 11.0.10+8-jvmci-21.0-b06)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --user 0:0 --rm -v /opt/atlassian/pipelines/agent/build/target/authorization-service-1.0.0-SNAPSHOT-native-image-source-jar:/project:z quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Duser.country= -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar authorization-service-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -J-Xmx6g -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services --no-server -H:-UseServiceLoaderFeature -H:+StackTrace authorization-service-1.0.0-SNAPSHOT-runner
[authorization-service-1.0.0-SNAPSHOT-runner:25] classlist: 8,987.37 ms, 1.20 GB
[authorization-service-1.0.0-SNAPSHOT-runner:25] setup: 782.91 ms, 1.20 GB
Fatal error:java.lang.NoClassDefFoundError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:488)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:370)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:529)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:561)
Caused by: java.lang.NoClassDefFoundError: javax/security/jacc/PolicyContextException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleDeletedClass(AnnotationSubstitutionProcessor.java:512)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:305)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:265)
at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:929)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:863)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:561)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: javax.security.jacc.PolicyContextException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 16 more
Error: Image build request failed with exit status 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2021-06-24T15:53:03Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.13.0.Final:build (default) on project authorization-service: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:209)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:350)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:181)
[ERROR] ... 10 more
[ERROR] -> [Help 1]

Would be great if you've an idea what's casing that problem.

Thank you!

Best regards
Manuel

Prevent access token forwarding for Secret Manager

In an application using OIDC or OAuth 2, the Secret Manager extension will use the access token of the current user to access the Secret Manager. Usually, the first user's token after startup will be used.

While this behavior is documented in Authenticating to the Google Cloud and makes sense for several Google services (such as Storage), it does not make sense for the Secret Manager and can even be considered a security issue.

The behavior can be disabled in application.properties:

quarkus.google.cloud.access-token-enabled=false

However, by disabling it globally it will not be available for other services. So it renders the Secret Manager extension incompatible with access token forwarding. It's not possible to use both the Secret Manager and access Google Storage with user credentials.

I therefore propose to enhance the Secret Manager extension:

  • Either automatically and globally disable user access tokens if the Secret Manager is used.
  • Or automatically disable user access tokens for the Secret Manager only (preferred option)

SecretManagerServiceClient is removed during build

In a minimal setup using the Secrets Manager extension to inject a password into a configuration value, the Quarkus app crashes when the password is accessed for the first time as the SecretManagerServiceClient class has been removed during build.

The relevant code is:

application.properties:

lookup-service.password=${sm//lookup-pw}

AppDirectory.java:

@ApplicationScoped
public class LookupService {

    @ConfigProperty(name = "lookup-service.password")
    Optional<String> servicePassword;

    public void someMethod() {
        ...
    }
}

When someMethod() is called for the first time, an exception is raised and the below message appears in the log:

================================================================================
CDI: programmatic lookup problem detected
-----------------------------------------
At least one bean matched the required type and qualifiers but was marked as unused and removed during build
Removed beans:
	- PRODUCER_METHOD bean io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer#secretManagerClient() [types=[interface com.google.api.gax.core.BackgroundResource, class com.google.cloud.secretmanager.v1.SecretManagerServiceClient, interface java.lang.AutoCloseable], qualifiers=[@javax.enterprise.inject.Default()]]
Required type: class com.google.cloud.secretmanager.v1.SecretManagerServiceClient
Required qualifiers: [@javax.enterprise.inject.Default()]
Solutions:
	- Application developers can eliminate false positives via the @Unremovable annotation
	- Extensions can eliminate false positives via build items, e.g. using the UnremovableBeanBuildItem
	- See also https://quarkus.io/guides/cdi-reference#remove_unused_beans
================================================================================

The workaround is to add the below line to *application.properties:

quarkus.arc.unremovable-types=com.google.cloud.secretmanager.v1.SecretManagerServiceClient

However, I would still consider this a bug. It should work out of the box.

Enhance storage client creation (optional and multiple)

I'm working on camel-quarkus extension for google-storage apache/camel-quarkus#2421

It would be nice to have:

  • Optional client registration. For example for the JUnit test using test container, I need to create client manually. But if I don't fill application.properties (e.g. quarkus.google.cloud.service-account-location), I get

java.io.IOException: The Application Default Credentials are not available

  • Multiple clients registration. It is possible in camel to define several endpoints, each using different client - selected via @Named. Having an option to define multiple clients via application.properties would help a lot.

Exceptoins when creating new object in storage

Issue: Unable to create object in Storage
Extension version: 0.2.0

Both code fragments below work in "JVM" mode, but fail with exceptions in runtime in native mode:

byte[] data = (read from file)
        BlobInfo blobInfo = BlobInfo
                .newBuilder("bucket-name", "id")
//               Adding line below does not change the output
//              .setContentType("image/heif")
                .build();
        storage.create(blobInfo, data); // <- Exception is thrown here

Exception:

com.google.cloud.storage.StorageException: Unsupported content with type: application/octet-stream
	at com.google.cloud.storage.spi.v1.HttpStorageRpc.translate(HttpStorageRpc.java:227)
	at com.google.cloud.storage.spi.v1.HttpStorageRpc.create(HttpStorageRpc.java:308)
	at com.google.cloud.storage.StorageImpl$3.call(StorageImpl.java:213)
	at com.google.cloud.storage.StorageImpl$3.call(StorageImpl.java:210)
	at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:105)
	at com.google.cloud.RetryHelper.run(RetryHelper.java:76)
	at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
	at com.google.cloud.storage.StorageImpl.internalCreate(StorageImpl.java:209)
	at com.google.cloud.storage.StorageImpl.create(StorageImpl.java:171)

Tried different method to create an, got different exception.

Code:

        Path filePath = .... (path to the local file to upload)
        BlobInfo blobInfo = BlobInfo
                .build();
        storage.createFrom(blobInfo, filePath); // <- Exception is thrown here

Exception:

com.google.cloud.storage.StorageException: java.lang.IllegalArgumentException: java.net.MalformedURLException
	at com.google.cloud.storage.BlobWriteChannel.flushBuffer(BlobWriteChannel.java:77)
	at com.google.cloud.BaseWriteChannel.close(BaseWriteChannel.java:151)
	at com.google.cloud.storage.StorageImpl.createFrom(StorageImpl.java:256)
	at com.google.cloud.storage.StorageImpl.createFrom(StorageImpl.java:237)
	at com.google.cloud.storage.StorageImpl.createFrom(StorageImpl.java:227)

Disable service authentication

It seems that the credentials file is mandatory. If we don't provide one, the application cannot start.

In my case, I am using Google Storage to persist files. In some dev environments I want to save the files directly to the filesystem without providing a ".json" file with credentials.

Is there any way of doing this?

Thanks!

Upgrade to latest version of quarkus of 1.13.x to avoid build error

Would it be possible to upgrade quarkus to version at least 1.13.3 to avoid following error

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.13.2.Final:build (default) on project google-cloud-run-pubsub: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.lang.IllegalAccessError: class io.quarkus.deployment.index.IndexingUtil tried to access private field io.quarkus.bootstrap.classloading.JarClassPathElement.JAVA_VERSION (io.quarkus.deployment.index.IndexingUtil is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @297ffaa7; io.quarkus.bootstrap.classloading.JarClassPathElement is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @6aa5974e)
[ERROR] 	at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:76)
[ERROR] 	at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:59)
[ERROR] 	at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:40)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep$1.apply(ApplicationArchiveBuildStep.java:268)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep$1.apply(ApplicationArchiveBuildStep.java:264)
[ERROR] 	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep.handleJarPath(ApplicationArchiveBuildStep.java:264)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep.indexPath(ApplicationArchiveBuildStep.java:180)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep.addMarkerFilePaths(ApplicationArchiveBuildStep.java:223)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep.scanForOtherIndexes(ApplicationArchiveBuildStep.java:118)
[ERROR] 	at io.quarkus.deployment.index.ApplicationArchiveBuildStep.build(ApplicationArchiveBuildStep.java:96)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

This problem happens due to the quarkus-google-cloud-services declares 1.13.0 of quarkus but there was a change (quarkusio/quarkus@dd9262e) that makes it fail with above error during build.

I ran into this issue when having quarkus app with version 1.13.4 and including the 0.7.0 of quarkus-google-cloud-pubsub

A workaround was to exclude any of the io.quarkus dependencies like this

    <dependency>
      <groupId>io.quarkiverse.googlecloudservices</groupId>
      <artifactId>quarkus-google-cloud-pubsub</artifactId>
      <version>0.7.0</version>
      <exclusions>
        <exclusion>
          <groupId>io.quarkus</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

Firestore examples: mention @RegisterForReflection annotation is required to store custom objects

This tripped me for a while, giving me this error when running my app as a native image & trying to save a custom object to Firestore:

java.lang.RuntimeException: No properties to serialize found on class com.acme.SomeClass

Spent a while looking at public getters & setters etc until I finally found this example in the IT tests.

The Person class in the main readme example seems to be annotated with @RegisterForReflection. This fixed my issue as well, so it would useful to mentioned it in the readme if it is essential.

Thanks

Load service account (json) from classpath

Hi all,

Is it also possible (or in future) to load the service account json from classpath:
quarkus.google.cloud.service-account-location=serviceaccount.json

src/main/resources/serviceaccount.json

Thanks

ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper during native build

Originally reported in Camel Quarkus apache/camel-quarkus#2692

I wonder if the issue can be reproduced on plain quarkus-google-cloud-services.

It might be related to quarkusio/quarkus@a8a239a

Netty now depends on Brotli4J. Brotli is a compression algorithm.
The implementation uses a native dependency. At the moment, we won't support Brotli in native mode. This
commit adds a substitution to disable it. All decoders using Brotli related classes have been substituted to avoid having to depend on the Brotli4J dependency.

I assume some of the Google cloud libs somehow depends on Brotli4J.

Here are the steps to reproduce from Camel Quarkus

git clone [email protected]:apache/camel-quarkus.git
cd camel-quarkus

# enable the native mode in google cloud tests
git revert ff1bf3a191db256a7a3835715a615dd8e5467d5c

# build the whole repo
mvnd clean install -Dquickly

cd integration-tests/google-storage

# make sure your GRAALVM_HOME points at a GraalVM 21.1 installation
mvn clean verify -Pnative
...
[INFO] --- quarkus-maven-plugin:2.0.0.CR2:build (quarkus-build) @ camel-quarkus-integration-test-google-storage ---
[INFO] [org.jboss.threads] JBoss Threads version 3.4.0.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/ppalaga/orgs/quarkus/camel-quarkus/integration-tests/google-storage/target/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-native-image-source-jar/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/ppalaga/orgs/quarkus/camel-quarkus/integration-tests/google-storage/target/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-native-image-source-jar/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+8-jvmci-21.1-b05)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/ppalaga/.sdkman/candidates/java/21.1.0.r11-grl/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=IE -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https -H:NativeLinkerOption=-no-pie -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner
[camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner:56824]    classlist:   2,707.59 ms,  1.68 GB
[camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner:56824]        setup:     699.80 ms,  1.68 GB
Fatal error:java.lang.NoClassDefFoundError
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
        at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
        at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:499)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:370)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:531)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:568)
Caused by: java.lang.NoClassDefFoundError: Lcom/aayushatharva/brotli4j/decoder/DecoderJNI$Wrapper;
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3061)
        at java.base/java.lang.Class.getDeclaredFields(Class.java:2248)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleDeletedClass(AnnotationSubstitutionProcessor.java:531)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:306)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:266)
        at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:954)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:888)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:580)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:495)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 16 more

When I use CollectionReference.add in Firestore, native build fails

pom.xml

...
    <dependency>
      <groupId>io.quarkiverse.googlecloudservices</groupId>
      <artifactId>quarkus-google-cloud-firestore</artifactId>
      <version>0.5.0</version>
    </dependency>
...

Java code

...
    var ref = firestore.collection(collectionName);

    var pojo = new HashMap<>();
    pojo.put("name", name);
    pojo.put("description", description);

    ref.add(pojo);
...

./mvnw package -Pnative

...
...
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=sun.security.provider.NativePRNG.
Detailed message:
Trace: Object was reached by 
        reading field java.security.SecureRandom.secureRandomSpi of
                constant java.security.SecureRandom@266ec2cd reached by 
        scanning method com.google.cloud.firestore.FirestoreImpl.autoId(FirestoreImpl.java:84)
Call path from entry point to com.google.cloud.firestore.FirestoreImpl.autoId(): 
        at com.google.cloud.firestore.FirestoreImpl.autoId(FirestoreImpl.java:81)
        at com.google.cloud.firestore.CollectionReference.document(CollectionReference.java:103)
        at com.google.cloud.firestore.CollectionReference.add(CollectionReference.java:194)
        at com.google.cloud.firestore.CollectionReference.add(CollectionReference.java:222)

I solved this in the following way ...

     var data = new HashMap<>();
     data.put("name", name);
     data.put("description", description);
 
-    var result = collectionRef.add(data);
+    var id = UUID.randomUUID().toString();
+    collectionRef.document(id).set(data);

Is there a better solution to this problem?


Reference link

Spanner problem with native-image

Similar to #67

Building native-image fails with the following:

Full trace
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v <path-to-project>/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --env LANG=C --rm quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java11 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -jar code-with-quarkus-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services --no-server -H:-UseServiceLoaderFeature -H:+StackTrace code-with-quarkus-1.0.0-SNAPSHOT-runner
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]    classlist:  25,249.59 ms,  0.92 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]        (cap):     740.55 ms,  0.92 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]        setup:   2,769.69 ms,  0.92 GB
09:09:00,588 INFO  [org.jbo.threads] JBoss Threads version 3.1.1.Final
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]     (clinit):     486.97 ms,  1.10 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]   (typeflow):  13,389.92 ms,  1.10 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]    (objects):  18,384.42 ms,  1.10 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]   (features):     970.90 ms,  1.10 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:26]     analysis:  34,860.92 ms,  1.10 GB
Error: Unsupported features in 2 methods
Detailed message:
Error: Class initialization of io.grpc.alts.ComputeEngineChannelBuilder failed. Use the option --initialize-at-run-time=io.grpc.alts.ComputeEngineChannelBuilder to explicitly request delayed initialization of this class.
Original exception that caused the problem: java.lang.NoClassDefFoundError: io/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
	at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
	at com.oracle.graal.pointsto.meta.AnalysisMethod.<init>(AnalysisMethod.java:108)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
	at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1622)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
	at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
	at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
	at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 46 more
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: io.grpc.alts.ComputeEngineChannelBuilder.forAddress(java.lang.String, int). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace: 
	at parsing com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:254)
Call path from entry point to com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(): 
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:238)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.access$1600(InstantiatingGrpcChannelProvider.java:71)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider$1.createSingleChannel(InstantiatingGrpcChannelProvider.java:210)
	at com.google.api.gax.grpc.RefreshingManagedChannel.refreshChannel(RefreshingManagedChannel.java:91)
	at com.google.api.gax.grpc.RefreshingManagedChannel.access$000(RefreshingManagedChannel.java:57)
	at com.google.api.gax.grpc.RefreshingManagedChannel$1.run(RefreshingManagedChannel.java:131)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:125)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:75)
	at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:141)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
Detailed message:
Error: Class initialization of io.grpc.alts.ComputeEngineChannelBuilder failed. Use the option --initialize-at-run-time=io.grpc.alts.ComputeEngineChannelBuilder to explicitly request delayed initialization of this class.
Original exception that caused the problem: java.lang.NoClassDefFoundError: io/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
	at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
	at com.oracle.graal.pointsto.meta.AnalysisMethod.<init>(AnalysisMethod.java:108)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
	at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1622)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
	at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
	at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
	at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 46 more
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: io.grpc.alts.ComputeEngineChannelBuilder.forAddress(java.lang.String, int). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace: 
	at parsing com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:254)
Call path from entry point to com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(): 
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:238)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.access$1600(InstantiatingGrpcChannelProvider.java:71)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider$1.createSingleChannel(InstantiatingGrpcChannelProvider.java:210)
	at com.google.api.gax.grpc.RefreshingManagedChannel.refreshChannel(RefreshingManagedChannel.java:91)
	at com.google.api.gax.grpc.RefreshingManagedChannel.access$000(RefreshingManagedChannel.java:57)
	at com.google.api.gax.grpc.RefreshingManagedChannel$1.run(RefreshingManagedChannel.java:131)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:125)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:75)
	at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:141)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

	at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
	at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
Detailed message:
Error: Class initialization of io.grpc.alts.ComputeEngineChannelBuilder failed. Use the option --initialize-at-run-time=io.grpc.alts.ComputeEngineChannelBuilder to explicitly request delayed initialization of this class.
Original exception that caused the problem: java.lang.NoClassDefFoundError: io/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
	at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
	at com.oracle.graal.pointsto.meta.AnalysisMethod.<init>(AnalysisMethod.java:108)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
	at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1622)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
	at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
	at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
	at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 46 more
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: io.grpc.alts.ComputeEngineChannelBuilder.forAddress(java.lang.String, int). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace: 
	at parsing com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:254)
Call path from entry point to com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(): 
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:238)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.access$1600(InstantiatingGrpcChannelProvider.java:71)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider$1.createSingleChannel(InstantiatingGrpcChannelProvider.java:210)
	at com.google.api.gax.grpc.RefreshingManagedChannel.refreshChannel(RefreshingManagedChannel.java:91)
	at com.google.api.gax.grpc.RefreshingManagedChannel.access$000(RefreshingManagedChannel.java:57)
	at com.google.api.gax.grpc.RefreshingManagedChannel$1.run(RefreshingManagedChannel.java:131)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:125)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:75)
	at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:141)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

	at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
	... 8 more
Error: Image build request failed with exit status 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:26 min
[INFO] Finished at: 2021-01-05T18:09:23+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.10.5.Final:build (default) on project code-with-quarkus: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:310)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:972)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] 	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1
[ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:527)
[ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:276)
[ERROR] 	... 12 more
[ERROR] -> [Help 1]
[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/MojoExecutionException

Steps to reproduce

  1. Download a zip file from https://code.quarkus.io/ with no extensions.
  2. Add the dependency into pom.xml.
    <dependency>
      <groupId>io.quarkiverse.googlecloudservices</groupId>
      <artifactId>quarkus-google-cloud-spanner</artifactId>
      <version>0.3.0</version>
    </dependency>
    
  3. Add the project id into application.protperties.
    quarkus.google.cloud.project-id=<project-id>
    
  4. Add the injection into GreetingResource.java.
    @Inject
    Spanner spanner;
    
  5. Execute ./mvnw package -Pnative -Dquarkus.native.container-build=true.

FirestoreImpl initialization needs to be delayed

Hi, and thanks for this extension.

With:

  • quarkus 1.12.2.Final
  • google services firestore 0.5.0

I've tested the FirestoreResource on the README.md build a sample project exactly as stated on the same file. It compile to native without problem.

Nevertheless adding these lines (note that the documentId is now generated):

futures.add(persons.document().set(new Person(1L, "John", "Doe")));
futures.add(persons.document().set(new Person(2L, "Jane", "Doe")));
futures.add(persons.document().set(new Person(3L, "Charles", "Baudelaire")));

the native compilation fails with:

Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=sun.security.provider.NativePRNG.
Detailed message:
Trace: Object was reached by 
	reading field java.security.SecureRandom.secureRandomSpi of
		constant java.security.SecureRandom@701e41f6 reached by 
	scanning method com.google.cloud.firestore.FirestoreImpl.autoId(FirestoreImpl.java:84)
Call path from entry point to com.google.cloud.firestore.FirestoreImpl.autoId(): 
	at com.google.cloud.firestore.FirestoreImpl.autoId(FirestoreImpl.java:81)
	at com.google.cloud.firestore.CollectionReference.document(CollectionReference.java:103)
	at org.acme.resteasyjackson.FirestoreResource.firestore(FirestoreResource.java)

This property solve the problem(see also #67):

quarkus.native.additional-build-args=--initialize-at-run-time=com.google.cloud.firestore.FirestoreImpl

Issue #67 is closed so I decided to reopen a new one.

Upgrade google-cloud-storage to version 1.113.8

I'm working on camel-quarkus extension for google-storage apache/camel-quarkus#2421

This extension uses google-cloud-storage library of version 1.113.4

<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>

Camel component uses slightly higher version - 1.113.8

It would be nice to upgrade version of this extension to 1.113.8 and make this extension aligned with camel.

Provides endpoint override for Firestore, Spanner, Pub/Sub and Bigtable

Provides endpoint override capabilities for the following service:

  • Firestore
  • Spanner
  • Pub/Sub
  • BigTable

Storage has already been covered via #92

The overriding can be done using the following methods:

Client Library Configure Endpoint
Firestore setHost(hostport)
Spanner setEmulatorHost(hostport)
Pub/Sub setChannelProvider with forTarget(hostport) / setEndpoint(endpoint)
Bigtable setChannelProvider with forTarget(hostport) / setEndpoint(endpoint)

Align dependencies with the Quarkus Platform BOM

Most of our dependencies are comming from the Quarkus BOM or the Google Library BOM: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM

@aloubyansky made a dependency convergence analysis and it appears that some dependencies are not aligned

114056965-7aee0b00-9892-11eb-9f64-c9b0d22fe7a3

We could migrate those dependencies, at least using the latests Google Library BOM, but maybe the issue is upsteamd (on Quarkus side) that should use the Google Library BOM.

Failed to retrieve Quarkus mailer password from secret manager

Im trying to hook up my application to quarkiverse-secret-manager to retrieve secrets from Google Cloud (previously I had my own integration logic, so looking to replace that with a more standardized solution). Most parts seem to work fine, however when I try to configure quarkus mailer using a secret-manager password, I cannot start the application.

Quarkus-bom: 1.13.7-Final
QUarkisverse: 0.8.0

application.properties:

quarkus.mailer.password=${sm//MAILER_PASSWORD}

Stacktrace:

ERROR: Failed to start application (with profile dev) javax.enterprise.inject.CreationException: Config root [io.quarkiverse.googlecloudservices.common.GcpConfiguration] with config phase [RUN_TIME] not initialized yet. at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.create(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:112) at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.get(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:146) at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.get(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:169) at io.quarkus.arc.impl.CurrentInjectionPointProvider.get(CurrentInjectionPointProvider.java:52) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_Bean.create(SecretManagerProducer_Bean.zig:244) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_Bean.create(SecretManagerProducer_Bean.zig:327) at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96) at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14) at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29) at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26) at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26) at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69) at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26) at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ClientProxy.arc$delegate(SecretManagerProducer_ClientProxy.zig:67) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ClientProxy.arc_contextualInstance(SecretManagerProducer_ClientProxy.zig:82) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.create(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:186) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.create(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:204) at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96) at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14) at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29) at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26) at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26) at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69) at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.get(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:236) at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.get(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:252) at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:430) at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:443) at io.quarkus.arc.impl.ArcContainerImpl.instanceHandle(ArcContainerImpl.java:413) at io.quarkus.arc.impl.ArcContainerImpl.instance(ArcContainerImpl.java:222) at io.quarkiverse.googlecloudservices.secretmanager.runtime.config.SecretManagerClientProvider.get(SecretManagerClientProvider.java:18) at io.quarkiverse.googlecloudservices.secretmanager.runtime.config.SecretManagerConfigSource.getValue(SecretManagerConfigSource.java:46) at io.smallrye.config.ConfigValueConfigSourceWrapper.getConfigValue(ConfigValueConfigSourceWrapper.java:20) at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:26) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SecretKeysConfigSourceInterceptor.getValue(SecretKeysConfigSourceInterceptor.java:22) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:26) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.ProfileConfigSourceInterceptor.getValue(ProfileConfigSourceInterceptor.java:70) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:26) at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:38) at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22) at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56) at io.smallrye.common.expression.Expression.evaluate(Expression.java:70) at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:37) at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:18) at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20) at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:285) at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:227) at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$mailer$runtime$MailConfig(Config.zig:64867) at io.quarkus.runtime.generated.Config.readConfig(Config.zig:2073) at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(RuntimeConfigSetup.zig:60) at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:598) at io.quarkus.runtime.Application.start(Application.java:90) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100) at io.quarkus.runtime.Quarkus.run(Quarkus.java:66) Quarkus application exited with code 1 Press Enter to restart or Ctrl + C to quit at io.quarkus.runtime.Quarkus.run(Quarkus.java:42) at io.quarkus.runtime.Quarkus.run(Quarkus.java:119) at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134) at java.base/java.lang.Thread.run(Thread.java:834)

Unable to build native image

Hi guys! I am having this error while building native image:
Error: substitution target for io.quarkiverse.googlecloudservices.common.runtime.graal.DefaultHttpTransportFactorySubstitution is not loaded. Use field onlyWith in the TargetClass annotation to make substitution only active when needed.
com.oracle.svm.core.util.UserError$UserException: substitution target for io.quarkiverse.googlecloudservices.common.runtime.graal.DefaultHttpTransportFactorySubstitution is not loaded. Use field onlyWith in the TargetClass annotation to make substitution only active when needed.
at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findTargetClass(AnnotationSubstitutionProcessor.java:834)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:252)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:230)
at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:908)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:838)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:536)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:451)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Error: Image build request failed with exit status 1
[INFO] ------------------------------------------------------------------------

I am using graalvm Running Quarkus native-image plugin on GraalVM Version 20.1.0 (Java Version 11.0.7), trying to compile the example Pubsub at https://github.com/quarkiverse/quarkiverse-google-cloud-services/tree/master/pubsub
quarkus 1.9.1.Final

thanks in advance

Secret manager is not working with jdbc

Hi,

I am trying to use secret manager for JDBC username and password, but I get errors.
I suppose JDBC is initialized before GCP config, and that is the reason for the errors.
If I just use secrets that are injected in beans it is working fine.

If you have ideas on how to fix or work around this issue, please share your thoughts.

Note: Maybe it is something similar to #109

I am using the latest released version 0.7.0.

%prod.quarkus.datasource.username=${sm//prod-db-user}
%prod.quarkus.datasource.password=${sm//prod-db-pass}
%prod.quarkus.datasource.jdbc.url=jdbc:mysql://${DB_SERVER:localhost}:${DB_PORT:3306}/${DB_NAME}
INFO: HV000001: Hibernate Validator %s
Jun 04, 2021 10:56:49 PM org.hibernate.jpa.internal.util.LogHelper
INFO: HHH000204: Processing PersistenceUnitInfo [name: %s]
Jun 04, 2021 10:56:49 PM org.hibernate.Version
INFO: HHH000412: Hibernate ORM core version %s
Jun 04, 2021 10:56:49 PM org.hibernate.annotations.common.Version
INFO: HCANN000001: Hibernate Commons Annotations {%1$s}
Jun 04, 2021 10:56:49 PM org.hibernate.dialect.Dialect
INFO: HHH000400: Using dialect: %s
Jun 04, 2021 10:56:49 PM Hibernate Types
INFO: This framework is proudly powered by:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 _    _                           _     _
| |  | |                         (_)   | |
| |__| |_   _ _ __   ___ _ __ ___ _ ___| |_ ___ _ __   ___ ___
|  __  | | | | '_ \ / _ \ '__/ __| / __| __/ _ \ '_ \ / __/ _ \
| |  | | |_| | |_) |  __/ |  \__ \ \__ \ ||  __/ | | | (_|  __/
|_|  |_|\__, | .__/ \___|_|  |___/_|___/\__\___|_| |_|\___\___|
         __/ | |
        |___/|_|

At Hypersistence, we only build amazing tools, like Hibernate Types, Flexy Pool, or Hypersistence Optimizer.
What if there was a tool that could automatically detect JPA and Hibernate performance issues?
Hypersistence Optimizer is that tool!
For more details, go to:

https://vladmihalcea.com/hypersistence-optimizer/
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Jun 04, 2021 10:56:50 PM io.quarkus.runtime.ApplicationLifecycleManager run
ERROR: Failed to start application (with profile dev)
javax.enterprise.inject.CreationException: Config root [io.quarkiverse.googlecloudservices.common.GcpConfiguration] with config phase [RUN_TIME] not initialized yet.
	at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.create(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:112)
	at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.get(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:146)
	at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.get(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:169)
	at io.quarkus.arc.impl.CurrentInjectionPointProvider.get(CurrentInjectionPointProvider.java:52)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_Bean.create(SecretManagerProducer_Bean.zig:244)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_Bean.create(SecretManagerProducer_Bean.zig:327)
	at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
	at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
	at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
	at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ClientProxy.arc$delegate(SecretManagerProducer_ClientProxy.zig:67)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ClientProxy.arc_contextualInstance(SecretManagerProducer_ClientProxy.zig:82)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.create(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:186)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.create(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:204)
	at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
	at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
	at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
	at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.get(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:236)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.get(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:252)
	at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:430)
	at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:443)
	at io.quarkus.arc.impl.ArcContainerImpl.instanceHandle(ArcContainerImpl.java:413)
	at io.quarkus.arc.impl.ArcContainerImpl.instance(ArcContainerImpl.java:222)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.config.SecretManagerClientProvider.get(SecretManagerClientProvider.java:18)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.config.SecretManagerConfigSource.getValue(SecretManagerConfigSource.java:40)
	at io.smallrye.config.ConfigValueConfigSourceWrapper.getConfigValue(ConfigValueConfigSourceWrapper.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SecretKeysConfigSourceInterceptor.getValue(SecretKeysConfigSourceInterceptor.java:22)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.ProfileConfigSourceInterceptor.getValue(ProfileConfigSourceInterceptor.java:70)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:26)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:38)
	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
	at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
	at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:37)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:18)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:285)
	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:227)
	at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$datasource$runtime$DataSourceRuntimeConfig(Config.zig:27391)
	at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$datasource$runtime$DataSourcesRuntimeConfig(Config.zig:17604)
	at io.quarkus.runtime.generated.Config.readConfig(Config.zig:2334)
	at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(RuntimeConfigSetup.zig:60)
	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:662)
	at io.quarkus.runtime.Application.start(Application.java:90)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134)
	at java.base/java.lang.Thread.run(Thread.java:830)

Jun 04, 2021 10:56:50 PM io.quarkus.deployment.dev.IsolatedDevModeMain firstStart
INFO: Attempting to start hot replacement endpoint to recover from previous Quarkus startup failure
Quarkus application exited with code 1
Press Enter to restart or Ctrl + C to quit
Jun 04, 2021 10:56:50 PM io.quarkus.deployment.dev.IsolatedDevModeMain firstStart
ERROR: Failed to recover after failed start
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for interface java.nio.file.Path
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServerAfterFailedStart(VertxHttpRecorder.java:228)
	at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup.handleFailedInitialStart(VertxHttpHotReplacementSetup.java:39)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.startupFailed(RuntimeUpdatesProcessor.java:653)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:137)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:378)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:56)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:127)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:84)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:144)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for interface java.nio.file.Path
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:106)
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:57)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServerAfterFailedStart(VertxHttpRecorder.java:200)
	... 9 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for interface java.nio.file.Path
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:106)
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:79)
	... 11 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for interface java.nio.file.Path
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:106)
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:79)
	... 12 more
Caused by: java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for interface java.nio.file.Path
	at io.smallrye.config.SmallRyeConfig.lambda$getConverter$2(SmallRyeConfig.java:415)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
	at io.smallrye.config.SmallRyeConfig.getConverter(SmallRyeConfig.java:412)
	at io.quarkus.runtime.configuration.ConfigInstantiator.getConverterFor(ConfigInstantiator.java:121)
	at io.quarkus.runtime.configuration.ConfigInstantiator.getConverterFor(ConfigInstantiator.java:117)
	at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:91)
	... 13 more

Secret manager is incompatible with OIDC web app

Using the Secret Manager extension to specify the client credential for an OIDC web application is a natural fit. Unfortunately, it does not work. It throws an exception at startup (see below).

It looks like a problem with the initialization order. But I was unable to resolve it.

A complete example has been attached. It has been generated with https://code.quarkus.io/?e=oidc&e=resteasy-qute. The only additions are in pom.xml (addition of quarkus-google-cloud-secret-manager) and in application.properties (see below).

To reproduce the bug:

  • Build the attached project and start it

It's not even necessary specify a valid IAM URL or create a secret in the Secret Manager. The app does not get that far. With a hard-coded credentials (and proper URLs), the app works.

oidc-gcp.zip

application.properties:

quarkus.oidc.application-type=web_app
quarkus.oidc.auth-server-url=https://some.keycloak/auth/realms/myrealm
quarkus.oidc.client-id=my-client-id
quarkus.oidc.credentials.client-secret.value=${sm//keycloak-credential}
quarkus.http.auth.permission.authenticated.paths=/qute/quarks/*
quarkus.http.auth.permission.authenticated.policy=authenticated
quarkus.arc.unremovable-types=com.google.cloud.secretmanager.v1.SecretManagerServiceClient
quarkus.google.cloud.access-token-enabled=false

Exception:

ERROR: Failed to start application (with profile dev)
javax.enterprise.inject.CreationException: Config root [io.quarkiverse.googlecloudservices.common.GcpConfiguration] with config phase [RUN_TIME] not initialized yet.
	at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.create(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:112)
	at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.get(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:146)
	at io.quarkiverse.googlecloudservices.common.GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.get(GcpConfiguration_f5f0cfc0930d359f64931c3293f018103e1bfca6_Synthetic_Bean.zig:169)
	at io.quarkus.arc.impl.CurrentInjectionPointProvider.get(CurrentInjectionPointProvider.java:52)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_Bean.create(SecretManagerProducer_Bean.zig:244)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_Bean.create(SecretManagerProducer_Bean.zig:327)
	at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
	at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
	at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
	at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ClientProxy.arc$delegate(SecretManagerProducer_ClientProxy.zig:67)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ClientProxy.arc_contextualInstance(SecretManagerProducer_ClientProxy.zig:82)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.create(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:186)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.create(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:204)
	at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
	at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
	at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
	at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.get(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:236)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.get(SecretManagerProducer_ProducerMethod_secretManagerClient_da0d037e46ea741b638dc55997e8c2b5dd43f779_Bean.zig:252)
	at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:430)
	at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:443)
	at io.quarkus.arc.impl.ArcContainerImpl.instanceHandle(ArcContainerImpl.java:413)
	at io.quarkus.arc.impl.ArcContainerImpl.instance(ArcContainerImpl.java:222)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.config.SecretManagerClientProvider.get(SecretManagerClientProvider.java:18)
	at io.quarkiverse.googlecloudservices.secretmanager.runtime.config.SecretManagerConfigSource.getValue(SecretManagerConfigSource.java:40)
	at io.smallrye.config.ConfigValueConfigSourceWrapper.getConfigValue(ConfigValueConfigSourceWrapper.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfigSourceInterceptor.getValue(SmallRyeConfigSourceInterceptor.java:27)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SecretKeysConfigSourceInterceptor.getValue(SecretKeysConfigSourceInterceptor.java:22)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.ProfileConfigSourceInterceptor.getValue(ProfileConfigSourceInterceptor.java:70)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:26)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:38)
	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
	at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
	at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:37)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:18)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:253)
	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:210)
	at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$oidc$common$runtime$OidcCommonConfig$Credentials$Secret(Config.zig:40353)
	at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$oidc$common$runtime$OidcCommonConfig$Credentials(Config.zig:40275)
	at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$oidc$OidcTenantConfig(Config.zig:38217)
	at io.quarkus.runtime.generated.Config.initGroup$io$quarkus$oidc$runtime$OidcConfig(Config.zig:64922)
	at io.quarkus.runtime.generated.Config.readConfig(Config.zig:1900)
	at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(RuntimeConfigSetup.zig:42)
	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:521)
	at io.quarkus.runtime.Application.start(Application.java:90)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134)
	at java.base/java.lang.Thread.run(Thread.java:832)

Firestore cannot be injected if using the emulator

If FIRESTORE_EMULATOR_HOST environment variable is set a stracktrace is thrown because Quarkus still attempts to resolve Cloud Credentials.

Caused by: java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
        at com.google.auth.oauth2.DefaultCredentialsProvider.getDefaultCredentials(DefaultCredentialsProvider.java:134)
        at com.google.auth.oauth2.GoogleCredentials.getApplicationDefault(GoogleCredentials.java:119)
        at com.google.auth.oauth2.GoogleCredentials.getApplicationDefault(GoogleCredentials.java:91)
        at io.quarkiverse.googlecloudservices.common.GcpCredentialProducer.googleCredential(GcpCredentialProducer.java:30)
        at io.quarkiverse.googlecloudservices.common.GcpCredentialProducer_ProducerMethod_googleCredential_f50c1039bd62c63834aaa61a686a2c22210490cc_Bean.create(GcpCredentialProducer_ProducerMethod_googleCredential_f50c1039bd62c63834aaa61a686a2c22210490cc_Bean.zig:201)

Emulator can be used if creating the Firestore object with

FirestoreOptions.getDefaultInstance().getService();

UserError: Classes that should be initialized at run time got initialized during image building - `Slf4jLoggerFactory`

Hi all,

Description of the issue
We recently introduced a change in libraries-bom 25.4.0 to explicitly initialize Slf4JLoggerFactory and Log4JLogger at run-time which seems to be resulting in the following error with Quarkus:

Step #1: Error: Classes that should be initialized at run time got initialized during image building:
Step #1:  io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory the class was requested to be initialized at run time (from jar:file:///workspace/native-image-samples/native-image-samples-quarkus/quarkus-integration-test/target/quarkus-integration-test-0.14.2-SNAPSHOT-native-image-source-jar/lib/com.google.api.gax-grpc-2.18.1.jar!/META-INF/native-image/com.google.api/gax-grpc/native-image.properties with 'io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory'). To see why io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory got initialized use --trace-class-initialization=io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory
Step #1: 
Step #1: com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
Step #1:  io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory the class was requested to be initialized at run time (from jar:file:///workspace/native-image-samples/native-image-samples-quarkus/quarkus-integration-test/target/quarkus-integration-test-0.14.2-SNAPSHOT-native-image-source-jar/lib/com.google.api.gax-grpc-2.18.1.jar!/META-INF/native-image/com.google.api/gax-grpc/native-image.properties with 'io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory'). To see why io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory got initialized use --trace-class-initialization=io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory
Step #1: 
Step #1: 	at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
Step #1: 	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:555)
Step #1: 	at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:168)
Step #1: 	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$12(NativeImageGenerator.java:727)
Step #1: 	at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:73)
Step #1: 	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:727)
Step #1: 	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:529)
Step #1: 	at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:488)
Step #1: 	at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:410)
Step #1: 	at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:594)
Step #1: 	at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:124)
Step #1: 	at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:624)
Step #1: [quarkus-integration-test-0.14.2-SNAPSHOT-runner:1884]      [total]:  32,073.30 ms,  3.37 GB
Step #1: # Printing build artifacts to: /workspace/native-image-samples/native-image-samples-quarkus/quarkus-integration-test/target/quarkus-integration-test-0.14.2-SNAPSHOT-native-image-source-jar/quarkus-integration-test-0.14.2-SNAPSHOT-runner.build_artifacts.txt
Step #1: Error: Image build request failed with exit status 1
Step #1: To see how the classes got initialized, use --trace-class-initialization=io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory

The reason for the change was to avoid running into this warning: Warning: class initialization of class io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory failed with exception java.lang.NoClassDefFoundError: Could not initialize class io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory to explicitly request delayed initialization of this class. when running native image compilation with services like Pub/Sub.

Environment
JDK:

openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing)

libraries-bom version: 25.4.0

Reproducer: https://github.com/mpeddada1/simple-quarkus-test

We were wondering if you had experienced this before? We would love to get your insights on how you handle logging your end and any potential solution that could help achieve compatibility? Thank you so much.

cc @meltsufin , @suztomo

Artifact quarkus-google-cloud-secret-manager is missing in MVN Repo

Hi all! I tried to use Secret Manager package in my Quarkus (1.11.2) project and have a problem with downloading it.

I added these lines to my pom.xml file

<dependency>
    <groupId>io.quarkiverse.googlecloudservices</groupId>
    <artifactId>quarkus-google-cloud-secret-manager</artifactId>
    <version>0.4.0</version>
</dependency>

And mvn fails to download it. I checked the results at https://mvnrepository.com/artifact/io.quarkiverse.googlecloudservices. There is no artifact quarkus-google-cloud-secret-manager as well. Can you please check if the artifact is published?

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.