8 Replies Latest reply: Jan 29, 2013 7:57 AM by soverbosch RSS

    Problem when activating custom plugin in OAM

    soverbosch
      Hi,

      I've developed a custom authentication plugin for OAM which makes use of the javax.net.ssl lilbrary. The compilation, packaging, import and distribution are fine but when I try to activate the plugin it fails with the following message:

      +<Jan 28, 2013 11:31:21 AM CET> <Warning> <oracle.oam.extensibility.lifecycle> <BEA-000000> <Activation failed due to felix bundle exception while installing and starting the bundle.Unresolved constraint in bundle MyAuthPlugin [1]: Una+
      ble to resolve 1.0: missing requirement [1.0] package; (package=javax.net.ssl)
      org.osgi.framework.BundleException: Unresolved constraint in bundle MyAuthPlugin [1]: Unable to resolve 1.0: missing requirement [1.0] package; (package=javax.net.ssl)

      The MANIFEST file contains the following import statement:

      Manifest-Version: 1
      Bnd-LastModified: 1359369013922
      Build-Jdk: 1.6.0_37
      Built-By: QSO
      Bundle-Activator: package.MyAuthPlugin
      Bundle-ManifestVersion: 2
      Bundle-Name: MyAuthPlugin
      Bundle-RequiredExecutionEnvironment: JavaSE-1.6
      Bundle-SymbolicName: MyAuthPlugin
      Bundle-Version: 2
      Created-By: Apache Maven Bundle Plugin
      Export-Package: nl.com.iam.oam.plugins.provider;uses:="oracle.security.am.co
      mmon.utilities.principal,oracle.security.am.plugin,javax.security.auth,
      javax.net.ssl,oracle.security.am.plugin.authn,oracle.security.am.plugin
      +.impl";version=2+
      +Import-Package: javax.net.ssl,javax.security.auth,oracle.security.am.com+
      +mon.utilities.principal,oracle.security.am.plugin,oracle.security.am.pl+
      +ugin.api,oracle.security.am.plugin.authn,oracle.security.am.plugin.impl+
      +,oracle.security.idm,org.osgi.framework;version="1.3.0"+
      +Tool: Bnd-1.43.0+

      The jvm OAM is running on (AIX):

      +java version "1.7.0"+
      +Java(TM) SE Runtime Environment (build pap6470sr3-20121025_01(SR3))+
      +IBM J9 VM (build 2.6, JRE 1.7.0 AIX ppc64-64 20121024_126071 (JIT enabled, AOT enabled)+
      +J9VM - R26_Java726_SR3_20121024_1635_B126071+
      +JIT - r11.b02_20120924_26343a+
      +GC - R26_Java726_SR3_20121024_1635_B126071+
      +J9CL - 20121024_126071)+
      +JCL - 20121019_01 based on Oracle 7u6-b17+

      So any pointers to how to solve the problem a greatly appreciated!

      Br,

      Sarris

      Edited by: soverbosch on 29-jan-2013 22:42
        • 1. Re: Problem when activating custom plugin in OAM
          Kishore Rout
          Hi,
          What is the size of custom authentication plugin jar file?

          Thanks
          • 2. Re: Problem when activating custom plugin in OAM
            soverbosch
            The size of the plugin jar is 11KB.
            • 3. Re: Problem when activating custom plugin in OAM
              Kishore Rout
              Hi,
              Please try with below steps and let me know if you are getting any error while activating the plugin.

              1. Regenerate the custom authentication plugin, this time including all the referenced external classes within the custom plugin jar file itself.
              (When the bundle is generated, ensure that the jar file MANIFEST.MF file does not include the external package(s) in the Import-Package entry.)
              2. In OAM Console System Configuration -> Common Configuration -> Plugins page, select the previously uploaded custom plugin and click Deactivate Selected.
              Refresh the page until the plugin has status 'Deactivated'.
              Then select the same plugin and click 'Remove Selected'.

              4. Upload the modified custom authentication plugin which includes the external classes.
              5. Distribute and Activate the plugin.

              If this helps please mark.

              Regards,
              Kishore
              • 4. Re: Problem when activating custom plugin in OAM
                soverbosch
                Tried to include all referenced classes (there are a lot) and then the packaging (by felix maven-bundle-plugin) fails because it is not able to find some of the referenced classes (and I just copied to classes into the classes directory and tried configuring them using maven-bunlde-plugin features). What I don't understand is why the javax.net.ssl is not located, although it is in default.properties under jre-1.6 and thus should be available.

                Edited by: soverbosch on 28-jan-2013 15:18
                • 5. Re: Problem when activating custom plugin in OAM
                  soverbosch
                  Can it be that this problem is caused by the fact that OAM is running on java version 1.7 and the default configuration of the Felix version used by OAM (3.0.6) only is configured till version 1.6. So I think it will cause the default available packages to be limited (or zero). I haven't tried yet to use my own configuration by either opening up the jar and repackaging with new default.properties or by supplying a new configuration location through an environment setting. Will it work????
                  • 6. Re: Problem when activating custom plugin in OAM
                    soverbosch
                    Ok, this solves it indeed. So what did I do:

                    1) On the "Server Start" tab of the server instance which contains OAM I added -Dfelix.config.properties=file:/home/app/oracle/felix.properties
                    2) Copied the default.properties out of the felix.jar to /home/app/oracle/felix.properties
                    3) Edited the felix.properties file and copied the part wich starts with jre-1.6 till the last line (version="0.0.0.1_006_JavaSE") at the end of the file and replaced the new jre-1.6 with jre-1.7.
                    4) Restarted the server
                    5) Tried to activate the plugin, and it did activate.

                    HTHS
                    • 7. Re: Problem when activating custom plugin in OAM
                      soverbosch
                      Never ending story... I am able to activate but now I am unable do de-activate and thus cannot put a newer version on the system, any clues to how to solve this problem? (I ran out of options)
                      • 8. Re: Problem when activating custom plugin in OAM
                        soverbosch
                        Never ending story... I am able to activate but now I am unable do de-activate and thus cannot put a newer version on the system, any clues to how to solve this problem? (I ran out of options)

                        Edited by: soverbosch on 29-jan-2013 14:57