Hi, I think that I was "overthinking" and was also a victim of some of the things I tried earlier.
I got things working using this MANIFEST.MF: Manifest-Version: 1.0 Bundle-Version: 10 Bundle-Name: SampleAuthPlugin Bundle-Activator: sample.SampleAuthPlugin Bundle-ManifestVersion: 2 Bundle-SymbolicName: SampleAuthPlugin Bundle-ClassPath: .,IdentityContext.jar,jps-api.jar Import-Package: org.osgi.framework;version="1.3.0",oracle.security.am.plugin,oracle.security.am.plugin.authn,oracle.security.am.plugin.impl,oracle.security.am.plugin.api,oracle.security.am.plugin.identity.impl,oracle.security.am.common.utilities.principal,oracle.security.am.engines.common.identity.api,oracle.security.am.engines.common.identity.provider,oracle.security.am.engines.common.identity.provider.exceptions,oracle.security.idm,javax.security.auth and also putting just the two JARs, IdentityContext.jar and jps-api.jar in the root of the exported JAR file. I think that some of the problems I was having before were caused because I had left copies of various JAR files in the WebLogic DOMAIN/lib directory and also in the DOMAIN/config/fmwconfig/oam/plugins directory, due to earlier attempts to get the external JARs on the plugin classpath. Now, instead, I just include the BUNDLE-CLASSPATH per above in the MANIFEST.MF and include the two JARs at the root of the exported JAR and things seem to be working (well I have other problems with my code, but the build seems tob e working). Thanks for all the help and comments! Jim -------------------------------------------- On Wed, 9/6/17, o haya <oh...@yahoo.com.INVALID> wrote: Subject: Re: New to Felix - can someone help explain what this error means (and how to fix it)? To: users@felix.apache.org, "o haya" <oh...@yahoo.com> Cc: oh...@yahoo.com Date: Wednesday, September 6, 2017, 6:23 PM The jps-common.jar has the oracle.security.jps package: [root@oamserver2 Explode]# unzip -v jps-common.jar | grep jps Archive: jps-common.jar 0 Stored 0 0% 02-18-2015 10:36 00000000 oracle/security/jps/ 0 Stored 0 0% 02-18-2015 10:37 00000000 oracle/security/jps/internal/ 0 Stored 0 0% 02-18-2015 10:37 00000000 oracle/security/jps/internal/audit/ 0 Stored 0 0% 02-18-2015 10:37 00000000 oracle/security/jps/internal/common/ 0 Stored 0 0% 02-18-2015 10:36 00000000 oracle/security/jps/internal/common/anonymous/ 0 Stored 0 0% 02-18-2015 10:37 00000000 oracle/security/jps/internal/common/audit/ 0 Stored 0 0% 02-18-2015 10:37 00000000 oracle/security/jps/internal/common/audit/event/ And here is the MANIFEST.MF from that jps-common.jar: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: 20.10-b01 (Sun Microsystems Inc.) Implementation-Title: OPSS Implementation-Vendor: Oracle Corp Oracle-Label: ENTSEC_11.1.1.9.0_GENERIC_150218.0845 Class-Path: jps-api.jar jps-unsupported-api.jar I only see one reference to the oracle.security.jps package here: private static Object getIDContext() { Object idc = AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { return AppSecurityContext.getSecurityContext().getAttribute(oracle.security.idm.IdentityContext.Constants.IDC_API_ID); } } ); return idc; } That AppSecurityContext class is in the jps-api.jar: 1429 Defl:N 642 55% 02-18-2015 10:36 def25cc3 oracle/security/jps/runtime/AppSecurityContext$1.class 855 Defl:N 442 48% 02-18-2015 10:36 b1fc90b9 oracle/security/jps/runtime/AppSecurityContext$2.class 5390 Defl:N 2276 58% 02-18-2015 10:36 3105c447 oracle/security/jps/runtime/AppSecurityContext.class 504 Defl:N 220 56% 02-18-2015 10:36 8c9303ca oracle/security/jps/runtime/AppSecurityContextFactory.class Jim -------------------------------------------- On Wed, 9/6/17, o haya <oh...@yahoo.com.INVALID> wrote: Subject: Re: New to Felix - can someone help explain what this error means (and how to fix it)? To: users@felix.apache.org, "o haya" <oh...@yahoo.com> Cc: oh...@yahoo.com Date: Wednesday, September 6, 2017, 5:28 PM This is one example of the information that I was referring to about possible approaches to getting this plugin working: https://stackoverflow.com/questions/1340483/osgi-handling-3rd-party-jars-required-by-a-bundle -------------------------------------------- On Wed, 9/6/17, o haya <oh...@yahoo.com.INVALID> wrote: Subject: Re: New to Felix - can someone help explain what this error means (and how to fix it)? To: users@felix.apache.org, "o haya" <oh...@yahoo.com> Cc: oh...@yahoo.com Date: Wednesday, September 6, 2017, 5:04 PM Hi, I should have provided this earlier, but here is the original MANIFEST.MF for the SampleAuthPlugin, and this works fine: Manifest-Version: 1.0 Bundle-Version: 10 Bundle-Name: SampleAuthPlugin Bundle-Activator: sample.SampleAuthPlugin Bundle-ManifestVersion: 2 Bundle-SymbolicName: SampleAuthPlugin Import-Package: org.osgi.framework;version="1.3.0",oracle.security.am.plugin,oracle.security.am.plugin.authn,oracle.security.am.plugin.impl,oracle.security.am.plugin.api,oracle.security.am.plugin.identity.impl,oracle.security.am.common.utilities.principal,oracle.security.am.engines.common.identity.api,oracle.security.am.engines.common.identity.provider,oracle.security.am.engines.common.identity.provider.exceptions,oracle.security.idm,javax.security.auth So I started with that MANIFEST.MF and the sample code for SampleAuthPlugin.java and I added in the code to try to list the contents of the Identity Context but that wouldn't compile. So then I figured out which other Oracle JARs (e.g., the jps-api.jar and IdentityContext.jar) were needed to compile the updated SampleAuthPlugin.java. And then, ever since then, I have been trying to build a new SampleAuthPlugin.jar that the Oracle OAM system would "activate". I've tried all kinds of things. Again, I don't have any other felix-style bundles and Oracle isn't supplying any either, so I have been just trying to configure the MANIFEST.MF to try to get it working. From reading various things, I have the impression that there are two approaches: - Modify some of the Oracle JARs to make them felix-compatible (probably not a good approach for us) - Use the unmodified, Oracle provided JARs as external/3rd party JARs Is that not correct? Is the 2nd option not possible? Jim -------------------------------------------- On Wed, 9/6/17, o haya <oh...@yahoo.com.INVALID> wrote: Subject: Re: New to Felix - can someone help explain what this error means (and how to fix it)? To: users@felix.apache.org, "o haya" <oh...@yahoo.com> Cc: oh...@yahoo.com Date: Wednesday, September 6, 2017, 4:48 PM What is the "[2]" and "2.0" refer to? Is that supposed to be indicating something? -------------------------------------------- On Wed, 9/6/17, Neil Bartlett <njbartl...@gmail.com> wrote: Subject: Re: New to Felix - can someone help explain what this error means (and how to fix it)? To: users@felix.apache.org, "o haya" <oh...@yahoo.com> Date: Wednesday, September 6, 2017, 3:06 PM This error message simply says that your bundle imports (that is, it depends on) the package named “oracle.security.jps”, but that no other bundle exports or provides that package. The normal fix for this is to find a bundle that exports the package “oracle.security.jps” and install it into your framework. The documentation for OAM should have a list somewhere of all the bundles you need to make it work. Regards, Neil > On 6 Sep 2017, at 19:19, o haya <oh...@yahoo.com.INVALID> wrote: > > Hi, > > I am working on what Oracle calls an "authentication plugin" to work with their Oracle Access Manager (OAM) product. > > I have implemented one of their sample plugins (SampleAuthPlugin) but now want to have that plugin access another API that they have called the Identity Context API: > > https://docs.oracle.com/cd/E27559_01/admin.1112/e27239/id_context.htm#AIAAG7296 > > So I added some snippets from one of their examples on that page (Example 41-3) to make a method that would list/dump out the contents of the Identity Context. This new code has dependencies on several other Oracle JARs, from what I can tell: > > IdentityContext.jar > jps-api.jar > > Possibly some others, but my code compiled ok, and I could build a new SampleAuthPlugin.jar successfully. > > However, when I try to (what oracle calls) "Activate" the plugin, I am getting errors. I've tried all kinds of things, but at this point, I am still getting this: > > <Sep 6, 2017 1:35:44 PM EDT> <Notice> <Stdout> <BEA-000000> <<Sep 6, 2017 1:35:44 PM EDT> <Warning> <oracle.oam.extensibility.lifecycle> <BEA-000000> <Activation failed due to felix bundle exception while installing and starting the bundle.null > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at oracle.security.am.plugin.internal.OSGIPluginService.installAndStartBundle(OSGIPluginService.java:179) > at oracle.security.am.extensibility.lifecycle.messaging.NodeMessageListener.installAndStartBundle(NodeMessageListener.java:66) > at oracle.security.am.extensibility.lifecycle.messaging.NodeMessageListener.receiveMessage(NodeMessageListener.java:112) > at oracle.security.am.extensibility.lifecycle.messaging.NodeMessageListener.receiveMessageList(NodeMessageListener.java:49) > at oracle.security.am.extensibility.lifecycle.messaging.MessageListenerWrapper.objectCreated(MessageListenerWrapper.java:30) > at oracle.security.am.foundation.mapimpl.coherence.events.MapListenerWrapper.notifyListener(MapListenerWrapper.java:174) > at oracle.security.am.foundation.mapimpl.coherence.events.EventDispatcher.dispatch(EventDispatcher.java:132) > at oracle.security.am.foundation.mapimpl.coherence.events.EventDispatcher.run(EventDispatcher.java:114) > Caused By: org.osgi.framework.BundleException: Unresolved constraint in bundle SampleAuthPlugin [2]: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (osgi.wiring.package=oracle.security.jps) > at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3980) > at org.apache.felix.framework.Felix.startBundle(Felix.java:2043) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at oracle.security.am.plugin.internal.OSGIPluginService.installAndStartBundle(OSGIPluginService.java:179) > at oracle.security.am.extensibility.lifecycle.messaging.NodeMessageListener.installAndStartBundle(NodeMessageListener.java:66) > at oracle.security.am.extensibility.lifecycle.messaging.NodeMessageListener.receiveMessage(NodeMessageListener.java:112) > at oracle.security.am.extensibility.lifecycle.messaging.NodeMessageListener.receiveMessageList(NodeMessageListener.java:49) > at oracle.security.am.extensibility.lifecycle.messaging.MessageListenerWrapper.objectCreated(MessageListenerWrapper.java:30) > at oracle.security.am.foundation.mapimpl.coherence.events.MapListenerWrapper.notifyListener(MapListenerWrapper.java:174) > at oracle.security.am.foundation.mapimpl.coherence.events.EventDispatcher.dispatch(EventDispatcher.java:132) > at oracle.security.am.foundation.mapimpl.coherence.events.EventDispatcher.run(EventDispatcher.java:114) > > I guess the root cause must be this: > > Unresolved constraint in bundle SampleAuthPlugin [2]: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (osgi.wiring.package=oracle.security.jps) > > but, I don't understand enough (== almost nothing) about Felix to understand what that error message is telling me? > > Here is my current MANIFEST.MF: > > Manifest-Version: 1.0 > Bundle-Version: 10 > Bundle-Name: SampleAuthPlugin > Bundle-Activator: sample.SampleAuthPlugin > Bundle-ManifestVersion: 3 > Bundle-SymbolicName: SampleAuthPlugin > Bundle-ClassPath: .,lib/IdentityContext.jar,lib/jps-api.jar,lib/jps-ee > .jar,lib/jps-common.jar,lib/jps-unsupported-api.jar > Import-Package: oracle.security.am.plugin,oracle.security.am.plugin.au > thn,oracle.security.am.plugin.impl,oracle.security.am.plugin.api,orac > le.security.am.plugin.identity.impl,oracle.security.am.common.utiliti > es.principal,oracle.security.am.engines.common.identity.api,oracle.se > curity.am.engines.common.identity.provider,oracle.security.am.engines > .common.identity.provider.exceptions,oracle.security.idm,javax.securi > ty.auth,org.osgi.framework;version="1.3.0" > > > In the built JAR, I have: > > META-INF > ==> MANIFEST.MF > sample > ==> SampleAuthPlugin.class, SampleAuthPlugin$1.class, Sample$2.class and TokenClass.class > lib > ==> felix-service.jar > felix.jar > identity-provider.jar > oam-plugin.jar > utilities.jar > > I added the following to resolve for compiling: > IdentityContext.jar > jps-api.jar > jps-common.jar > jps-ee.jar <== I added because this was in the Class-path in the (non-felix-type) Manifest.mf of one of the other jars > jps-unsupported-api.jar <== I added because this was in the Class-path in the (non-felix-type) Manifest.mf of one of the other jars > > Sorry for the "data dump" but I am hoping that someone can explain what that error is telling me, and maybe suggest what might be wrong? > > Thanks, > Jim > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org