Menu

#15 OpenCms 8.0.2 Compatibilty

release_0.0.8
open
5
2012-10-24
2012-09-18
No

It's connected with bag 3396755. org.opencms.main.OpenCmsCore has two upgradeRunlevel methods and only one of them take org.opencms.configuration.CmsParameterConfiguration as parameter.

Discussion

  • Dave Schoorl

    Dave Schoorl - 2012-10-14

    Hi Oleg,

    Thanks for reporting this issue.

    I am not sure what you mean, because you are not submitting a stacktrace, error message etc.

    However, when I look at the code of the opencmsmoddev plugin and OpenCms, I understand what you say: there are two upgradeRunlevel methods on OpenCmsCore, one to run OpenCms inside a servlet context, the other to run it outside. The former method takes a ServletContext as parameter, the latter an OpenCms object that contains configuration data. The plugin starts OpenCms outside a servlet context. Since OpenCms 8.0.2, the object type that holds the configuration data changed from org.apache.commons.collections.ExtendedProperties to org.opencms.configuration.CmsParameterConfiguration. Therefore, in release 0.0.8 of the plugin a compatibility method was introduced to call the upgradeRunlevel-method. In this compatibility method, the upgradeRunlevel-method was obtained using reflection. There is an error in this code, because it only works properly, when there is only one implementation of upgradeRunlevel (and there are two!). Either the correct method is obtained and everything works fine or the wrong method is obtained (the one for running inside a servlet context) and the communication with OpenCms fails with an error.

    I cannot reproduce this problem on my system (Linux, OpenJdk 7), i.a.w. on my system always the correct upgradeRunlevel-method is selected.

    I will fix the programming error in the next release, but is it possible for you to add information on your operating system / jdk details and maybe a stacktrace? Just to be sure / satisfy my curiousity and maybe as additional information for other users who ran into this problem.

    Thanks in advance,
    Dave

     
  • Dave Schoorl

    Dave Schoorl - 2012-10-15

    Fixed in release 0.0.9

     
  • Oleg Zinevich

    Oleg Zinevich - 2012-10-17

    I think the stacktrace is no longer needed :) Good job.

     

Log in to post a comment.