Permalink
Browse files

Make successful OSGi activation less noisy

pgjdbc-osgi debug can be activated via -Dpgjdbc.osgi.debug=true

fixes #672
  • Loading branch information...
vlsi committed Nov 2, 2016
1 parent c518697 commit 22b902518abe4d429e8bef908eb90db1be9ccd79
Showing with 4 additions and 0 deletions.
  1. +4 −0 pgjdbc/src/main/java/org/postgresql/osgi/PGBundleActivator.java
@@ -32,6 +32,10 @@ public void start(BundleContext context) throws Exception {
} catch (NoClassDefFoundError e) {
String msg = e.getMessage();
if (msg != null && msg.contains("org/osgi/service/jdbc/DataSourceFactory")) {
if (!Boolean.getBoolean("pgjdbc.osgi.debug")) {
return;
}

new IllegalArgumentException("Unable to load DataSourceFactory. "
+ "Will ignore DataSourceFactory registration. If you need one, "
+ "ensure org.osgi.enterprise is on the classpath", e).printStackTrace();

0 comments on commit 22b9025

Please sign in to comment.