Hi All

I have created a small secrets provider and unit tested it on it's own
first.  But I am having an issue with Brooklyn loading up my class and its
dependencies.

Following the instructions, I put the class file into a new dropins folder
inside lib.  And added a call to the provider in brooklyn.cfg

>> brooklyn.external.ucsfsecrets=org.ucsf.ctakes_auth.UcsfSecretsProvider

I then put the class's dependent jars in the lib/boot folder.  Not sure
whether they should be there or in lib itself... because I'm not sure which
classloader the dropins will be using

Because I wasn't sure what dropins was expecting, I put the class in twice,
as you see

lib/dropins
├── UcsfSecretsProvider.class
└── org
    └── ucsf
        └── ctakes_auth
            └── UcsfSecretsProvider.class

My provider needs a couple of JVM defines, so I added these to the setenv
script.

On startup,  the exception blew up the launch of the Brooklyn container

My error message is this Exception   ( I put the entire trace at the bottom
of this message)

....
2019-08-24T20:47:24,463 ERROR 123
o.a.b.c.m.i.BasicExternalConfigSupplierRegistry [FelixStartLevel] Failed to
instantiate external config supplier named 'ucsfsecrets':
java.lang.ClassNotFoundException: Class
org.ucsf.ctakes_auth.UcsfSecretsProvider not found on the application class
path, nor in the bundle white list.
java.lang.ClassNotFoundException: Class
org.ucsf.ctakes_auth.UcsfSecretsProvider not found on the application class
path, nor in the bundle white list.

The exception mentions a "bundle whitelist" which I don't see among any of
the config files in $BROOKLYN_HOME/etc.    I also looked at the unit test
for drop-ins in the Brooklyn source, but was unable to relate that to my
situation.

Clearly there is more to a custom provider than I see in the
documentation.   Do you have any more information to help me out?

Many thanks in advance, Peter

-----------------------------------------------------

:`Caused by: java.lang.ClassNotFoundException: Class
org.ucsf.ctakes_auth.UcsfSecretsProvider not found on the application class
path, nor in the bundle white list.
        at
org.apache.brooklyn.util.core.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:162)
~[?:?]
        at
org.apache.brooklyn.core.mgmt.internal.BasicExternalConfigSupplierRegistry.updateFromBrooklynProperties(BasicExternalConfigSupplierRegistry.java:116)
~[?:?]
        at
org.apache.brooklyn.core.mgmt.internal.BasicExternalConfigSupplierRegistry.<init>(BasicExternalConfigSupplierRegistry.java:61)
~[?:?]
        at
org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.<init>(AbstractManagementContext.java:183)
~[?:?]
        at
org.apache.brooklyn.core.mgmt.internal.LocalManagementContext.<init>(LocalManagementContext.java:170)
~[?:?]
        at
org.apache.brooklyn.launcher.common.BasicLauncher.initManagementContext(BasicLauncher.java:524)
~[?:?]
        at
org.apache.brooklyn.launcher.common.BasicLauncher.startPartOne(BasicLauncher.java:392)
~[?:?]
        at
org.apache.brooklyn.launcher.osgi.OsgiLauncherImpl.startPartOne(OsgiLauncherImpl.java:79)
~[?:?]
        at
org.apache.brooklyn.launcher.osgi.OsgiLauncherImpl.initOsgi(OsgiLauncherImpl.java:105)
~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:?]
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:?]
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
        at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)
~[?:?]
        at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)
~[?:?]
        at
org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:736)
~[?:?]
        ... 37 more
2019-08-24T20:47:24,486 INFO   15 o.a.a.b.c.BlueprintContainerImpl
[FelixStartLevel] Bundle org.apache.brooklyn.karaf-start/0.12.0 is waiting
for dependencies
[(objectClass=org.apache.brooklyn.launcher.osgi.OsgiLauncher)]

Reply via email to