9 Replies Latest reply: May 22, 2008 3:25 AM by 807567 RSS

    Too much inheritance for targetable components!!!

    807567
      Hi all,

      we have a problem with targetable components in relation to inheritance. Let's consider the following two cases:

      1) You have an abstract component "A" that is targetable (targetRef). You inherit from A with component "B". B is not abstract, but inherits the defined targetability. Once you install B on a host, you'll get the defined virtual host associated with it. All fine.

      2) B now is abstract, for whatever reason. Let's introduce component "C" which now inherits from B, so we have another level of inheritance. We would expect the same behavior from C, when installing it, but unfortunately, SPS swallows the virtual host, so it is never created with C.

      Any ideas???

      Regards,

      Frank

      PS: SPS 5.2.1
        • 1. Re: Too much inheritance for targetable components!!!
          807567
          I'll reproduce it here and see if I can come up with an answer for you.
          • 2. Re: Too much inheritance for targetable components!!!
            807567
            Two questions:

            1) Can you provide me with de.phoenics.common.jar?

            2) What exactly do you mean by, "B now is abstract, for whatever reason"? Do you mean that you changed B to be abstract after installing it in your step #1?
            • 3. Re: Too much inheritance for targetable components!!!
              807567
              I did not change B at all. Situation 1), as described, was supposed to be an introduction to the problem, showing that everything works, if you only have an inheritance depth of 2.
              • 4. Re: Too much inheritance for targetable components!!!
                807567
                Sorry, I guess I'm just not getting you. You said in your first post, "You inherit from A with component "B". B is not abstract," then you said, "B now is abstract". When you create a component, you explicitly declare it to be abstract (by adding the abstract keyword) or you don't. If you didn't change B, then it is not abstract. But I think you mean to say that a new component C inherits from B, not that B is abstract. Oh! Wait, now I understand. You're saying that you think the system mistakenly assumes B is abstract when you create C?
                • 5. Re: Too much inheritance for targetable components!!!
                  807567
                  I created a test plug-in with three components: A, B, and C. A is abstract and targetable:

                  <?xml version="1.0" encoding="UTF-8"?>

                  <!--
                       Document: A
                       Created on: August 29, 2007, 11:50 AM
                       Author: colin
                       Description: Generated by SPS Modeler
                  -->

                  <component name='A' version='6.0' label=''
                  description=''
                  installPath='/tmp'
                  path="/components/TestPlugin"
                  author='colin'
                  modifier='ABSTRACT'
                  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
                  xsi:schemaLocation='http://www.sun.com/schema/SPS component.xsd'
                  xmlns='http://www.sun.com/schema/SPS'>
                  <targetRef hostName="ra-A"/>
                  <installList>
                  <installSteps name="default"/>
                  </installList>
                  <uninstallList>
                  <uninstallSteps name="default"/>
                  </uninstallList>
                  </component>

                  Component B is defined as:

                  <?xml version="1.0" encoding="UTF-8"?>

                  <!--
                       Document: B
                       Created on: August 29, 2007, 11:53 AM
                       Author: colin
                       Description: Generated by SPS Modeler
                  -->

                  <component name='B' version='6.0' label=''
                  description=''
                  path="/components/TestPlugin"
                  author='colin'
                  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
                  xsi:schemaLocation='http://www.sun.com/schema/SPS component.xsd'
                  xmlns='http://www.sun.com/schema/SPS'>
                  <extends>
                  <type name="TestPlugin#A"/>
                  </extends>
                  </component>

                  Component C:

                  <?xml version="1.0" encoding="UTF-8"?>

                  <!--
                       Document: C
                       Created on: August 31, 2007, 10:19 AM
                       Author: colin
                       Description: Generated by SPS Modeler
                  -->

                  <component name='C' version='6.0' label=''
                  description=''
                  path="/components/TestPlugin"
                  author='colin'
                  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
                  xsi:schemaLocation='http://www.sun.com/schema/SPS component.xsd'
                  xmlns='http://www.sun.com/schema/SPS'>
                  <extends>
                  <type name="TestPlugin#A"/>
                  </extends>
                  </component>

                  Here's the plugin-descriptor:

                  <?xml version="1.0" encoding="UTF-8"?>

                  <!--
                       Document: TestPlugin
                       Created on: August 29, 2007, 12:18 PM
                       Author: colin
                       Description: Generated by SPS Modeler
                  -->

                  <plugin name="TestPlugin" version="1.0" schemaVersion="6.0"
                  description="" vendor="colin"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://www.sun.com/schema/SPS plugin.xsd"
                  xmlns="http://www.sun.com/schema/SPS">
                  <readme jarPath="readme.txt"></readme>
                  <dependencyList>
                  <pluginRef name="system" version="4.0"/>
                  </dependencyList>
                  <memberList>
                  <folder name="/components"></folder>
                  <folder name="/components/TestPlugin"></folder>
                  <component jarPath="components/TestPlugin/A.xml">
                  <componentType name="A"
                  group="hidden"
                  indentLevel="0"
                  order="0"/>
                  </component>
                  <component jarPath="components/TestPlugin/B.xml"/>
                  <component jarPath="components/TestPlugin/C.xml"/>
                  </memberList>
                  </plugin>

                  When I install B, I get the host "ra-A", which is good. I then uninstall B (host goes away) and install C. I get the host "ra-A" back.

                  I think I'm still missing something about the nature of the problem. Can you suggest changes to my setup above to reproduce your problem?
                  • 6. Re: Too much inheritance for targetable components!!!
                    807567
                    Did you get an error when installing C or did it just not create the targetable host?
                    • 7. Re: Too much inheritance for targetable components!!!
                      807567
                      Ha! I reproduced the problem. Thanks for the information. Let me see if I can figure out what's going on.
                      • 8. Re: Too much inheritance for targetable components!!!
                        807567
                        We're working on this. I'll update you as soon as we figure out the problem.
                        • 9. Re: Too much inheritance for targetable components!!!
                          807567
                          I believe, the 6.0.2 patch addresses this issue. You can download it from http://sunsolve.sun.com/

                          Sparc:
                          137179-01
                          137182-01
                          137185-01

                          X86:
                          137180-01
                          137183-01
                          137186-01