Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
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.