Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6274

Rename OFBiz artifacts from 'org.ofbiz.*' to org.apache.ofbiz.*'

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: ALL COMPONENTS
    • Labels:
      None

      Description

      Currently (a lot of) our java and other artifacts sport the name/reference 'org.ofbiz'. This should be renamed to 'org.apache.ofbiz' to bring more consistency across the projects under the Apache umbrella.

      1. FIX_LOGGING_OUPUT.patch
        0.5 kB
        Taher Alkhateeb
      2. RENAME_OFBIZ_TO_APACHE.patch
        2.70 MB
        Taher Alkhateeb

        Issue Links

          Activity

          Hide
          sharan Sharan Foga added a comment -

          Closed as duplicate as requested

          Show
          sharan Sharan Foga added a comment - Closed as duplicate as requested
          Hide
          taher Taher Alkhateeb added a comment -

          Attaching first attempt

          Getting some classpath problems, appreciate help

          Show
          taher Taher Alkhateeb added a comment - Attaching first attempt Getting some classpath problems, appreciate help
          Hide
          taher Taher Alkhateeb added a comment -

          Thanks to Deepak for committing his work in r1752920 we have now fully converted all artifacts from org.ofbiz to org.apache.ofbiz

          However, we have a regression that we did not catch the first time (fooled us). The tests are unstable. Sometimes they all pass, and sometimes they crash randomly (I observed 6, 14, and 58 tests crashing at different points).

          This is probably a minor issue somewhere, but is difficult to track down because the tests fail randomly and so it is hard to tell exactly where the source of the trouble is. Under investigation at the moment.

          Show
          taher Taher Alkhateeb added a comment - Thanks to Deepak for committing his work in r1752920 we have now fully converted all artifacts from org.ofbiz to org.apache.ofbiz However, we have a regression that we did not catch the first time (fooled us). The tests are unstable. Sometimes they all pass, and sometimes they crash randomly (I observed 6, 14, and 58 tests crashing at different points). This is probably a minor issue somewhere, but is difficult to track down because the tests fail randomly and so it is hard to tell exactly where the source of the trouble is. Under investigation at the moment.
          Hide
          taher Taher Alkhateeb added a comment -

          OK, so the first thing I did (which made things much clearer) is to restore logging to correct output which is as per attached patch

          Show
          taher Taher Alkhateeb added a comment - OK, so the first thing I did (which made things much clearer) is to restore logging to correct output which is as per attached patch
          Hide
          taher Taher Alkhateeb added a comment -

          The first thing I notice in the logs that is different:

          OFBiz log output
          2016-07-17 08:46:23,677 |OFBiz-batch-1        |DatabaseUtil                  |W| Entity [CurrencyDimension] has no table in the database
          2016-07-17 08:46:23,678 |OFBiz-batch-1        |DatabaseUtil                  |W| Entity [DateDimension] has no table in the database
          2016-07-17 08:46:23,678 |OFBiz-batch-1        |DatabaseUtil                  |W| Entity [InventoryItemFact] has no table in the database
          2016-07-17 08:46:23,679 |OFBiz-batch-3        |DatabaseUtil                  |W| Entity [Component] has no table in the database
          
          Show
          taher Taher Alkhateeb added a comment - The first thing I notice in the logs that is different: OFBiz log output 2016-07-17 08:46:23,677 |OFBiz-batch-1 |DatabaseUtil |W| Entity [CurrencyDimension] has no table in the database 2016-07-17 08:46:23,678 |OFBiz-batch-1 |DatabaseUtil |W| Entity [DateDimension] has no table in the database 2016-07-17 08:46:23,678 |OFBiz-batch-1 |DatabaseUtil |W| Entity [InventoryItemFact] has no table in the database 2016-07-17 08:46:23,679 |OFBiz-batch-3 |DatabaseUtil |W| Entity [Component] has no table in the database
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Taher,
          I tried your patch, but I prefer:

          Index: framework/base/config/log4j2.xml
          ===================================================================
          --- framework/base/config/log4j2.xml	(revision 1753016)
          +++ framework/base/config/log4j2.xml	(working copy)
          @@ -40,8 +40,9 @@
                   </Async>
               </Appenders>
               <Loggers>
          +        <logger name="org.apache" level="warn"/>
          +        <logger name="org.apache.ofbiz" level="info"/>
                   <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/>
          -        <logger name="org.apache" level="warn"/>
                   <logger name="freemarker" level="warn"/>
          
                   <Root level="all">
          

          Because with your I saw a lot of debug info I don't want in standard mode (the mode we had before). Not sure why we seem to not get the same result, weird.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Taher, I tried your patch, but I prefer: Index: framework/base/config/log4j2.xml =================================================================== --- framework/base/config/log4j2.xml (revision 1753016) +++ framework/base/config/log4j2.xml (working copy) @@ -40,8 +40,9 @@ </Async> </Appenders> <Loggers> + <logger name= "org.apache" level= "warn" /> + <logger name= "org.apache.ofbiz" level= "info" /> <logger name= "org.apache.ofbiz.base.converter.Converters" level= "warn" /> - <logger name= "org.apache" level= "warn" /> <logger name= "freemarker" level= "warn" /> <Root level= "all" > Because with your I saw a lot of debug info I don't want in standard mode (the mode we had before). Not sure why we seem to not get the same result, weird.
          Hide
          taher Taher Alkhateeb added a comment -

          Hmmm, something does not feel right about this. We should not have two loggers, we should have only one logger. Having two loggers means the java code (or XML I don't know) is defining it twice.

          This business of switching to org.apache.ofbiz is proving more complex than on first attempt.

          Show
          taher Taher Alkhateeb added a comment - Hmmm, something does not feel right about this. We should not have two loggers, we should have only one logger. Having two loggers means the java code (or XML I don't know) is defining it twice. This business of switching to org.apache.ofbiz is proving more complex than on first attempt.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          But we had already 2 loggers
          <logger name="org.apache" level="warn"/>
          <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/>
          So why adding a 3rd is a problem?

          BTW I prefer this order. It shows we can override things. Though I'm still unsure about that, but this idea worked to show the log info with my patch.

          Show
          jacques.le.roux Jacques Le Roux added a comment - But we had already 2 loggers <logger name="org.apache" level="warn"/> <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/> So why adding a 3rd is a problem? BTW I prefer this order. It shows we can override things. Though I'm still unsure about that, but this idea worked to show the log info with my patch.
          Hide
          taher Taher Alkhateeb added a comment -

          It's not a problem at all, it's only strange that we need to add it now. I would imagine an org.apache logger should not exist, there should only be org.apache.ofbiz or org.ofbiz (on the older revision). Having both means somewhere in the code something is requesting the org.apache when it should instead request org.apache.ofbiz.

          I could be wrong of course. I see no problem in applying your fix but it means we still did not hit root-cause.

          Show
          taher Taher Alkhateeb added a comment - It's not a problem at all, it's only strange that we need to add it now. I would imagine an org.apache logger should not exist, there should only be org.apache.ofbiz or org.ofbiz (on the older revision). Having both means somewhere in the code something is requesting the org.apache when it should instead request org.apache.ofbiz. I could be wrong of course. I see no problem in applying your fix but it means we still did not hit root-cause.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I agree, I'm also unsure of the reason. I did that by analogy since
          <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/>
          existed. I Googled for an explanation but I'm still short of it.

          For now it works, so I apply the patch because it's already a relief.

          Show
          jacques.le.roux Jacques Le Roux added a comment - I agree, I'm also unsure of the reason. I did that by analogy since <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/> existed. I Googled for an explanation but I'm still short of it. For now it works, so I apply the patch because it's already a relief.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Ah, I think I forgot to explain why we had the org.apache logger in 1st place. IIRW, it's because we use Apache libs (eg Tomcat) and we want to be warned when issues appear at this level

          Show
          jacques.le.roux Jacques Le Roux added a comment - Ah, I think I forgot to explain why we had the org.apache logger in 1st place. IIRW, it's because we use Apache libs (eg Tomcat) and we want to be warned when issues appear at this level
          Hide
          taher Taher Alkhateeb added a comment - - edited

          Ahhhh now it makes sense. So the rename is adding more because org.apache.ofbiz is a subset of org.apache. Ok it clicks in place now.

          But now I am not sure about your patch, by comparing your work with the older code isn't order important? Meaning should it not be:

                  <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/>
                  <logger name="org.apache.ofbiz" level="info"/>
                  <logger name="org.apache" level="warn"/>
          

          Instead of

              <Loggers>
                  <logger name="org.apache" level="warn"/>
                  <logger name="org.apache.ofbiz" level="info"/>
                  <logger name="org.apache.ofbiz.base.converter.Converters" level="warn"/>
                  ...
          
          Show
          taher Taher Alkhateeb added a comment - - edited Ahhhh now it makes sense. So the rename is adding more because org.apache.ofbiz is a subset of org.apache. Ok it clicks in place now. But now I am not sure about your patch, by comparing your work with the older code isn't order important? Meaning should it not be: <logger name= "org.apache.ofbiz.base.converter.Converters" level= "warn" /> <logger name= "org.apache.ofbiz" level= "info" /> <logger name= "org.apache" level= "warn" /> Instead of <Loggers> <logger name= "org.apache" level= "warn" /> <logger name= "org.apache.ofbiz" level= "info" /> <logger name= "org.apache.ofbiz.base.converter.Converters" level= "warn" /> ...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Committed: At revision: 1753029

          Show
          jacques.le.roux Jacques Le Roux added a comment - Committed: At revision: 1753029
          Hide
          taher Taher Alkhateeb added a comment -

          I'm very happy to report that we believe the issue is resolved. The problems we discovered were due to heavy resource usage from logging. The logging system got polluted with too many messages because upon renaming the old logger (org.apache) became the parent of all OFBiz classes (org.apache.ofbiz) so the messages were numerous and causing system strain.

          3 tests passed on my computer, 1 on Jacques, and 2 tests passed on the buildbot. I think this marks the issue as resolved

          Show
          taher Taher Alkhateeb added a comment - I'm very happy to report that we believe the issue is resolved. The problems we discovered were due to heavy resource usage from logging. The logging system got polluted with too many messages because upon renaming the old logger (org.apache) became the parent of all OFBiz classes (org.apache.ofbiz) so the messages were numerous and causing system strain. 3 tests passed on my computer, 1 on Jacques, and 2 tests passed on the buildbot. I think this marks the issue as resolved
          Hide
          taher Taher Alkhateeb added a comment -

          This issue is resolved, we should keep it open for a few days just to ensure no further regressions arise.

          Show
          taher Taher Alkhateeb added a comment - This issue is resolved, we should keep it open for a few days just to ensure no further regressions arise.
          Hide
          deepak.dixit Deepak Dixit added a comment -

          We did following thing while moving org.ofbiz to org.apache.org

          • Moved all the artefacts from org.ofbiz.* to org.apache.ofbiz.*
          • Changee all occurrence from org.ofbiz to org.apache.ofbiz in all the xml, ftl and groovy files.
          • Changee the service providers files from org.ofbiz.* to org.apache.ofbiz (META-INF/services)
          • Changed then entity package name from org.ofbiz.* to org.apache.ofbiz.*
          Show
          deepak.dixit Deepak Dixit added a comment - We did following thing while moving org.ofbiz to org.apache.org Moved all the artefacts from org.ofbiz.* to org.apache.ofbiz.* Changee all occurrence from org.ofbiz to org.apache.ofbiz in all the xml, ftl and groovy files. Changee the service providers files from org.ofbiz.* to org.apache.ofbiz (META-INF/services) Changed then entity package name from org.ofbiz.* to org.apache.ofbiz.*
          Hide
          deepak.dixit Deepak Dixit added a comment - - edited

          Hi Jacques Le Roux,

          I think for org.apache.ofbiz we need to set level to "all" instead of "info".
          In current setting verbose/timing level does not work.

          Show
          deepak.dixit Deepak Dixit added a comment - - edited Hi Jacques Le Roux , I think for org.apache.ofbiz we need to set level to "all" instead of "info". In current setting verbose/timing level does not work.
          Hide
          taher Taher Alkhateeb added a comment -

          Hi Deepak,

          I'm not very sure but I think if we do that then the system would crash again. Did you test this?

          Show
          taher Taher Alkhateeb added a comment - Hi Deepak, I'm not very sure but I think if we do that then the system would crash again. Did you test this?
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Hi Taher,

          Its working fine, I tested it, we have debug.properties to set the configuration level. Also we can turn on/off these from https://localhost:8443/webtools/control/LogConfiguration as well.
          As currently log level is set to "info" so timing and verbose log not working.

          And here is the default settings (debug.properties):

          print.verbose=false
          print.timing=true
          print.info=true
          print.important=true
          print.warning=true
          print.error=true
          print.fatal=true
          
          Show
          deepak.dixit Deepak Dixit added a comment - Hi Taher, Its working fine, I tested it, we have debug.properties to set the configuration level. Also we can turn on/off these from https://localhost:8443/webtools/control/LogConfiguration as well. As currently log level is set to "info" so timing and verbose log not working. And here is the default settings (debug.properties): print.verbose= false print.timing= true print.info= true print.important= true print.warning= true print.error= true print.fatal= true
          Hide
          taher Taher Alkhateeb added a comment -

          Sounds okay to me, I don't know about Jacques yet?

          Show
          taher Taher Alkhateeb added a comment - Sounds okay to me, I don't know about Jacques yet?
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Yes indeed, that sounds good to me, please Deepak commit, thanks!

          Show
          jacques.le.roux Jacques Le Roux added a comment - Yes indeed, that sounds good to me, please Deepak commit, thanks!
          Hide
          deepak.dixit Deepak Dixit added a comment -

          This has been committed at r#1753168

          Show
          deepak.dixit Deepak Dixit added a comment - This has been committed at r#1753168
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          As a summary: we also changed the log4j2.xml at r1753029+1753168

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited As a summary: we also changed the log4j2.xml at r1753029+1753168
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I think we can close this issue

          Show
          jacques.le.roux Jacques Le Roux added a comment - I think we can close this issue

            People

            • Assignee:
              deepak.dixit Deepak Dixit
              Reporter:
              pfm.smits Pierre Smits
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development