Topic
7 replies Latest Post - ‏2013-11-18T14:27:20Z by Prasad_tem
rdean400
rdean400
10 Posts
ACCEPTED ANSWER

Pinned topic Custom User Registry for WAS Liberty

‏2013-10-06T22:00:56Z |

I have a Custom User Registry that my company currently uses with full profile WAS.  I want to package it as a Liberty feature so that developers could test our applications on Liberty.

I found the article "Creating a custom user registry as a Liberty user feature," the sample, and various articles in the Infocenter to help with the process.

Following the blog post, I run into a problem at step 2.3.  When I add the ManagedService interface to my activator, I get an error.  The "org.osgi.services.cm" package isn't available to my project.  Adding it to the Import-Package statement in the bundle manifest gives me the error "No available bundle exports package 'org.osgi.services.cm'".

How do I resolve this issue?  Is there something I need to add to my build path (or to a maven pom)?

  • AlexMulholland
    AlexMulholland
    32 Posts
    ACCEPTED ANSWER

    Re: Custom User Registry for WAS Liberty

    ‏2013-10-07T04:08:13Z  in response to rdean400

    Hello,

    It looks like you need to add the Liberty SPI classes to the project class path.

     

    By default, WDT will put the product API classes on each project class path for application development; if you want to access SPI classes you need to change the target runtime in eclipse to include the SPI:

    Eclipse Preferences -> Plugin Development -> Target Platform -> select WebSphere Application Server 8.5 Liberty Profile with SPI

    I hope this fixes the problem,

    Regards, Alex.

     

    • rdean400
      rdean400
      10 Posts
      ACCEPTED ANSWER

      Re: Custom User Registry for WAS Liberty

      ‏2013-10-07T11:09:40Z  in response to AlexMulholland

      That worked.  Thank you very much for the prompt response. :-)

      • Prasad_tem
        Prasad_tem
        4 Posts
        ACCEPTED ANSWER

        Re: Custom User Registry for WAS Liberty

        ‏2013-11-18T13:41:50Z  in response to rdean400

        Hello,

        Which other changes did you have to do to get it working? I am also having the similar situation wherein we are moving to a liberty profile and we need to implement custom registry.

        When I tried to add  this tag "<customUserRegistry.." in server.xml it says it is an invalid content.

         

        can you please provide more information?

         

        Thanks,

        Prasad

        • rdean400
          rdean400
          10 Posts
          ACCEPTED ANSWER

          Re: Custom User Registry for WAS Liberty

          ‏2013-11-18T13:59:18Z  in response to Prasad_tem

          I don't have a custom user registry working yet.  The answer gave me the information I needed to construct a registry.  My particular registry depends upon some open source libraries, and I haven't decided how I want to deal with those yet.

          • Prasad_tem
            Prasad_tem
            4 Posts
            ACCEPTED ANSWER

            Re: Custom User Registry for WAS Liberty

            ‏2013-11-18T14:27:20Z  in response to rdean400

            Hello,

            Thanks for update. Are you clear on step 2.4

            "Register the services. Add processing so that user and groups files defined in the server.xml file are passed to the FileRegistrySample.java file. The Liberty profile configuration is managed by the OSGi Configuration Admin service and can be accessed according to the OSGi Configuration Admin service specification."

            How do we register the services? and how to pass the args to custome registry? server.xml isnot accepting the tag with custom content.

            any idea ?

            Thanks,

            Prasad

    • Prasad_tem
      Prasad_tem
      4 Posts
      ACCEPTED ANSWER

      Re: Custom User Registry for WAS Liberty

      ‏2013-11-18T10:22:29Z  in response to AlexMulholland

      Hello,

      How to include the SPI classes? It will be helpful if you can elaborate.

      Which jars do we need to add and do we need to download it separetely?

      OR do we have a different runtime with SPI ?

      Please provide update.

      Thanks,

      Prasad

      • Prasad_tem
        Prasad_tem
        4 Posts
        ACCEPTED ANSWER

        Re: Custom User Registry for WAS Liberty

        ‏2013-11-18T11:41:08Z  in response to Prasad_tem

        Hello,

        I was using 8.5 and probably that was the reason why I was not able to get the SPI classes. I have now downloaded 8.5.5 and I found the SPI classes at the below location.

        "wlp-developers-runtime-8.5.5.1\wlp\dev\spi\spec"

        Thanks,

        Prasad