12 Replies Latest reply: Sep 10, 2012 2:34 AM by Davin Fifield-Oracle RSS

    Module building: Error

    956042
      Hi,
      My task is to build a module. However, I receive the following error for multiple attributes after I add the link to the .rmod file.

      Type____Severity__Description____________________________________________________________________________________________________________File
      Model___Error_____Properties can not be defined in this project for imported module attribute '<attribute name>'. See '<related file>'. (OPA-E00286)___<location>

      I'm unable to proceed. Please help me.

      Thanks,
      Naveen

      Edited by: Naveen Mathew on Sep 5, 2012 1:07 AM
        • 1. Re: Module building: Error
          Sean Reardon
          The error message is telling you everything you need to know.

          You have defined some attribute in the module (I'm assuming that it is actually telling you the attribute and that you have simply anonymised the attribute in order to post to the forum - that certainly looks like the case from the error message text you have posted).

          You have then attempted to change some part of the definition of that attribute in the project using that attribute (be aware that adding extra information, eg custom properties or validation is a change to the definition of the attribute).

          You cannot do this.

          If you want to change the definition of the attribute then you will need to change that definition in the project which generates the module and redeploy the module.

          To quote from the help text on modules (article title: Include rules defined in a separate project):
          "When a module is imported into a project all the entities, attributes and relationships that are defined in the module’s public interface appear as if they were defined in a properties file in that project itself and can be used like any other item defined in a properties file. There is, however, one important restriction in that items imported from a module cannot be edited from within the parent project. To make changes to the module you need to edit the module's project and rebuild it. Similarly, you cannot make changes in the parent project that override the module's attribute, entity and relationship definitions. Consequently, if you additionally define an imported entity, attribute or relationship in a parent project you cannot define anything other than the text of that item."
          • 2. Re: Module building: Error
            956042
            Hi Sean Reardon,
            I noticed that some of the attributes have regular expressions and the other attributes are formed using attributes which have regular expressions. How do I proceed with module building?
            Let me elaborate: I clicked Build->Build module. I got many warnings. I ignored all and continued. Then right click->Add module link. Found file in output folder and opened. Errors appear.

            Thanks,
            Naveen

            Edited by: Naveen Mathew on Sep 5, 2012 2:30 AM
            • 3. Re: Module building: Error
              Sean Reardon
              Okay from that sound of that question I am going to make the assumption that you do not have access to nor control over the module being used in the project you are being asked to build.

              So:
              Get in touch with the person who controls the creation of the module you are including in your project.
              Get them to add the extra elements to the attributes that are currently defined in your project. If they don't want to do this that is for you to resolve within your project - but as you have seen, if it relates to an attribute which is defined in the module you cannot change it - this is part of the way that modules work. If they really don't want to do it then I would suggest you are going to need to remove that attribute from the module.
              Once they have made the changes in their project get them to re-issue the module to you.
              While they are updating the module you will need to update the attribute definitions in your project - ie remove any definition of attributes which are defined in the module which you use in your project.
              Because there are now no clashes (all the definition of the attributes in the module is done in the module producing project) you should not get the errors you have been seeing.

              If you have update and module creation access to the project which generates the module being used in your project then simply do the tasks I've indicated need to be done by the module producing team yourself.
              • 4. Re: Module building: Error
                956042
                Hi,
                There is 1 entity contained within global. I just realized that those warnings are for that entity level attributes. None of the attributes in that entity are in the module now. Is there a way out of this?
                Error:
                The entity '<entity name>' can not be exported because its containment relationship can not be exported
                Moreover, I'm not trying to build a module on multiple projects. I have an (one) existing project and I'm trying to build a module on it.

                Thanks,
                Naveen

                Edited by: Naveen Mathew on Sep 5, 2012 5:05 AM
                • 5. Re: Module building: Error
                  Sean Reardon
                  Ok - it sounds like you are now just randomly doing things - I don't have any more time to help you today so let's try to get this set up so your problem is clearly stated so other people can offer assistance (if it is still needed).

                  Let's start by restating your problem so that we can be clear about what actions need to be taken and where they need to be taken (and so you can clearly say where you have taken action and in which place you are seeing which behaviour).

                  1) You have a Project A. You have created a module using this project (side-note that module creation produced a number of warnings that will no doubt be a problem for you in the future, but are not relevant to this specific discussion).

                  2) You have a project B. You want to use the module from Project A in Project B. When you bring the module from Project A into project B you get an Error displaying which is telling you that
                  "Properties can not be defined in this project for imported module attribute 'X'. See 'Y.xsrc'. (OPA-E00286)

                  The "simple" answer is to remove any definition of attribute X from file Y.xsrc (although this will mean that you will not be able to use whatever extra functionality you had defined).

                  If you want the functionality that was defined in Project B then you will need to add that functionality to Project A (and remember to remove it from Project B).

                  Once you have added this functionality you will need to rebuild the module from Project A. Assuming that Project B is looking for the module from Project A in the place that Project A builds to then you will not need any further steps. Remember that any time you make changes to Project A that you want to be available to Project B that you will need to rebuild the module in Project A.

                  Going back to your most recent reply it sounds like what you have done is to go to Project A and to remove from Project A the attributes that you have error messages about in Project B. It also sounds like what you are saying is that you are still seeing the *same* error message(s) in Project B even after making the changes to Project A.

                  If you are still getting the same error message in Project B then the most obvious reason would be that you have not updated the module. Remember that for Project B to know that you have removed those attributes from project A you need to update the module (by building Project A - as a module). A module is a point in time view on the rules in the project - it doesn't automatically update Project B just because you made a change to Project A.

                  If it's a different error message now then a) that's a different problem b) you need to say that you're getting a different error message.
                  • 6. Re: Module building: Error
                    956042
                    The problem is even a lot more confusing.
                    1) I'm in project A. Let's say I click "Build module" for m ^th^ time - it builds, gives warnings and creates .rmod file (Warning shows all the of attributes which have regex and all the attributes which are under the entity (only entity) which is contained within 'global'). However, this does not happen all the time. Let's say I click "Build module" for n ^th^ time - it builds, gives warnings (does not show attribute related warnings), but does not create .rmod file.
                    2) Entity level attributes are completely absent in the .rmod file.

                    I'm just banging my head on the wall.
                    • 7. Re: Module building: Error
                      Davin Fifield-Oracle
                      Can you confirm: is this OPA 10.4.0 or OPA 10.4.1?
                      • 8. Re: Module building: Error
                        956042
                        It's 10.4.1.60
                        • 9. Re: Module building: Error
                          956042
                          I'm able to build module now. Going step by step. I will add a comment if I encounter problems.
                          • 10. Re: Module building: Error
                            Jasmine Lee-Oracle
                            Just throwing a thought out there... do you really need to use modules? If not, just do everything in the one project and many of these problems will just go away.
                            • 11. Re: Module building: Error
                              956042
                              There is absolutely no need for module building, just as there is no need for classes in C++ to address a similar kind of problem.
                              • 12. Re: Module building: Error
                                Davin Fifield-Oracle
                                Marking this thread as answered. See Repeat: Module building

                                Davin.