Skip to content

pgjdbc karaf feature file is broken starting with 42.2.13 #1891

@steinarb

Description

@steinarb

I'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:

  1. download the latest karaf and unpack and start it
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions