Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12198

Make camel-pgevent work in modular class loading environments

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.21.0
    • None
    • None
    • Unknown

    Description

      There's a small issue with how camel-pgevent attempts to check for the presence of the PostgreSQL JDBC driver. It does:

      getClassResolver().resolveMandatoryClass("com.impossibl.postgres.jdbc.PGDriver");
      

       
      On Karaf this results in:

      java.lang.ClassNotFoundException: com.impossibl.postgres.jdbc.PGDriver
      at org.apache.camel.impl.DefaultClassResolver.resolveMandatoryClass(DefaultClassResolver.java:80) ~[59:org.apache.camel.camel-core:2.20.2]
      at org.apache.camel.component.pgevent.PgEventEndpoint.initJdbc(PgEventEndpoint.java:93) ~[?:?]
      at org.apache.camel.component.pgevent.PgEventProducer.doStart(PgEventProducer.java:67) ~[?:?]
      

      I have a similar issue on WildFly. I think it'd be better to do the lookup using the ClassLoader of the PgEventComponent. This should work fine in most scenarios.

      Attachments

        Activity

          People

            jamesnetherton James Netherton
            jamesnetherton James Netherton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: