pgjdbc karaf feature file is broken starting with 42.2.13
See original GitHub issueI’m submitting a …
- [X ] bug report
- feature request
Describe the issue Installing the feature creates a stack trace and terminates ongoing ssh connections.
Sometimes ssh is completely broken and a karaf restart is necessary to get it working again
Driver Version?
42.2.13 through 42.2.16
42.2.12 is the last one that works.
Java Version?
openjdk 11.0.8
OS Version?
debian 10.5 “buster”
PostgreSQL Version?
12.4
To Reproduce Steps to reproduce the behaviour:
- download the latest karaf and unpack and start it
- From the command line add the postgresql feature repository and install the feature
feature:repo-add mvn:org.postgresql/postgresql/42.2.13/xml/features
feature:install postgresql
After a little while the following stack trace appears:
org.apache.karaf.deployer.features [org.apache.karaf.deployer.features.osgi.Activator] ERROR : Invalid BundleContext.
java.lang.IllegalStateException: Invalid BundleContext.
at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)
at org.apache.felix.framework.BundleContextImpl.addBundleListener(BundleContextImpl.java:211)
at org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:89)
at org.apache.karaf.deployer.features.osgi.Activator$DeploymentFinishedListener.deploymentEvent(Activator.java:86)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.callListeners(FeaturesServiceImpl.java:321)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1068)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Expected behaviour A clear and concise description of what you expected to happen.
The feature should install without any error message or ssh breakage.
And what actually happens
If installing directly from the console started with karaf the above stack trace appears.
If installing from an ssh session the ssh session is torn down and may occasionally require a karaf restart before ssh starts working again.
Logs If possible PostgreSQL logs surrounding the occurrence of the issue Additionally logs from the driver can be obtained adding
loggerLevel=TRACE&loggerFile=pgjdbc-trace.log
to the connection string
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Fixed in 42.2.17
By default karaf uses the local maven repo of the user karaf is started as.
So if the integration test was part of a reactor build, you could e.g. replace the explicit pgjdbc.version in the pom with project.version and start the feature of the current snapshot.
Or you could remove the @Configuration stuff in the test and instead do this: addFeaturesRepository(“mvn:org.postgresql/postgresql/LATEST/xml/features”); installAndAssertFeature(“postgresql”);
NB! Not tested! But this should try installing the most recent snapshot from the local repo.