-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use Postgres Socket Factory on dev mode #15782
Comments
/cc @stuartwdouglas there seems to be a classloader issue on dev mode with how Postgres load socket factories |
From the looks of the source code of |
@geoand this is really annoying, we cannot mandate all libraries to use the TCCL to be compatible with out dev mode :( I saw you add the upstream label, do you openned an issue upstream ? |
I did not, no |
Using |
Can you try adding a
Just as a temp workaround to see if it works? In theory we should be able to do this with the new parent-first CL config, however in practice it won't work at the moment without some changes. |
@stuartwdouglas tried, same result :( |
Actually it would probably need to go into its own sperate project and be added as a dep: https://github.com/stuartwdouglas/quarkus/blob/23ae9fd2a058b71bd65ff323d72fe84bfdb82a98/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L759 The current code only deals with zip files for dependencies. |
@stuartwdouglas I don't understand, this is a JAR file and the code path you mentionned is for JAR file so it should ne taken into account.
I don't understand, this is already a separate dep, what should be done with it ? An extension ? |
@stuartwdouglas @geoand if nothing can be done at our side (according to me, updating a dependency code via bytecode injection is not a solution), can one of you open an issue upstream on the PostgreSQL client ? |
any further development happen here. |
Hello all, any updates on this issue? Recently tried to deploy my app to GCP Cloud Run and was blocked by the same issue. |
Any progress here? I have the same issue when I even deploy the app to gcloud function. |
+1 |
Describe the bug
On dev mode, the Postgres driver is unable to load the Socket Factory class, but on prod mode, using a standard JAR file, it works.
Expected behavior
Both dev mode and prod mode works the same.
Actual behavior
Using a Postgres socket factory on dev mode lead to a ClassNotFoundException
To Reproduce
This is hard to provide an easy to use reproducer as I had this issue while trying to connect to Google Cloud SQL.
Configuration
Environment (please complete the following information):
Output of
uname -a
orver
Linux 5.8.0-44-generic #50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.7" 2020-04-14
Quarkus version or git rev
1.12.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
The text was updated successfully, but these errors were encountered: