Upgrade: Server Windows 2003 to Windows 2012 R2, OpenClinica 3.0.4 to 3.11

With Windows Server 2003 past end of life, we upgraded to 2012R2. Our stack was then:

OS Windows Server 2012 R2
Tomcat Apache Tomcat/7.0.69
JVM 1.7.0_79-b15
Postgres 8.4.22
OpenClinica 3.0.4

All seemed in order, but we found that the Discrepancy Note popup was always empty - it was no longer possible to create a new DN.

We tried upgrading OpenClinica to 3.11. There was a script to run to remove some duplicate rows, but seemingly no other database changes to make. The new war file deployed fine in Tomcat, and I edited the new datainfo.properties file as required (the structure had changed a bit since 3.0.4 so it was not a simple copy).

No luck though. I can get to the login page, and an invalid username/password is rejected. If I put in a valid username and password though I get a 500 server error page. There is no stack trace in the log.

Any ideas what the problem might be? Where else should I look for some clues? Is that upgrade path (3.0.4 to 3.11) even supported?

Many thanks in advance.


  • ebsebs Posts: 102
    The later releases rely on two separate datainfo.properties files. One which is used on initial deployment and one used after the initial deployment.

    If you didn't change them both them there is more info here - https://forums.openclinica.com/discussion/comment/17214/#Comment_17214
  • luke.stevensluke.stevens Posts: 27
    Thank you very much for your reply @ebs . I do not yet see any file or directory called c:\oc\tomcat\webapps\openclinica.config. I'll restart Tomcat later when it's not in use and see if it gets created then...
  • luke.stevensluke.stevens Posts: 27
    No luck. Still getting "500 - Internal Server Error" after logging in.

    That second config file was not created after stopping and re-starting OpenClinica, nor after restarting the web server, nor after a reboot.

    I tried making c:\oc\tomcat\webapps\openclinica.config by manually copying mydatainfo.properties file, but that did not help either.

    What am I missing?
  • ebsebs Posts: 102
    The second file doesn't seem to be created. Could it be a Windows permissions issue with the account not having access to create the folder? It may be worth trawling the Windows Event Viewer tool for any recent issues. It's not the friendliest tool but if you dig deep enough you may just find a clue.

    Another option is to check your Postgres log files.

    Other than that I would suggest re-starting the install and follow the installation guide to the letter.
  • luke.stevensluke.stevens Posts: 27
    I got a fresh vm and have tried a clean install (rather than an upgrade) thinking if I can get it to work there I will migrate the data from the existing server into the new install.

    I followed the instructions here https://github.com/OpenClinica/OpenClinica/wiki/Install-OpenClinica-v3.6-and-higher-on-Windows with the versions of tomcat/jdk/postgres from the link provided in Step B (https://dev.openclinica.com/oc/software/OpenClinica-3.2/windows/).

    Steps A to I went exactly as in the intructions.

    Step J (Verify the Installation) went exactly as the instructions for sub-steps 1 and 2 - the database tables are created in the background.

    Step 3: I try to log in with the default root/12345678 username/password and the same problem occurs as on my old server!
    Redirect to http://localhost:8080/OpenClinica/j_spring_security_check
    "Oops! An error has occurred"
    Nothing in the logs even with tomcat logging level at Debug

    Also, there is no openclinica.config created at c:\oc\tomcat\webapps. Is it supposed to be a file or directory?
  • ebsebs Posts: 102
    edited August 2016
    I've just spotted that there is a mistake in the instructions in step I:

    The first time you install OpenClinica you will configure datainfo.properties here: c:\oc\tomcat\webapps\OpenClinica\WEB-INF\classes\datainfo.properties. Consequent configuration changes SHOULD be made here c:\oc\tomcat\webapps\openclinica.config.

    The second openclinica.config directory should be created in c:\oc\tomcat rather than the webapps directory. Note that this is only created when Tomcat is restarted after the initial start. It's a while since I did a fresh install but I think it is very important to not try and log in after the first start of Tomcat which does the deployment. Just check the log that it started successfully then restart it without attempting to access via the front end. You could of course try and restart and see if that helps.

    Second openclinica.config directory at the same level as webapps:

    You then need to configure the newly created datainfo.properties file within c:\oc\tomcat\openclinica.config and restart Tomcat.

  • luke.stevensluke.stevens Posts: 27
    edited August 2016
    Thank you so much for your help @ebs. I very much appreciate it.

    The question is now what to do if the openclinica-config directory is _not_ created? I tried creating it manually, copying datainfo.properties and restarting tomcat, but it didn't help.

    I tried removing the tomcat\webapps\OpenClinica and tomcat\openclinica.data directories, dropping the openclinica database and retrying the installation from Step F (copy the war file to webapps\). I made certain I started tomcat started without trying to log in at localhost:8080/OpenClinica . Same result: no openclinica.config directory; "Oops error occurred" following login.

    So frustrating! I don't know what to do next...
  • lindsay.stevenslindsay.stevens Posts: 392 ✭✭
    via Email
    Assuming you've got tomcat, Java and postgres in place, this should be it:

    - create a database and superuser for OC in postgres.
    - copy the OC war to webapps
    - use 7zip to unpack the war
    - create tomcat/openclinica.config
    - copy the properties files from web-inf/classes to the openclinica.config
    - insert your db settings to datainfo.properties in openclinica.config
    - start tomcat
    - wait a minute
    - log in
  • luke.stevensluke.stevens Posts: 27
    Thanks @lindsay.stevens but again no luck - same result.

    I do have an exception appearing in the localhost log now:
    Aug 29, 2016 8:48:16 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [default] in context with path [/OpenClinica] threw exception
    	at org.akaza.openclinica.dao.login.UserAccountDAO.findByUserName(UserAccountDAO.java:584)
    	at org.akaza.openclinica.web.filter.OpenClinicaUsernamePasswordAuthenticationFilter.attemptAuthentication(OpenClinicaUsernamePasswordAuthenticationFilter.java:123)
    	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    Line 584 or UserAccountDAO.java is this:
        public EntityBean findByUserName(String name) {
            HashMap variables = new HashMap();
            variables.put(new Integer(1), name);
            ArrayList alist = this.select(digester.getQuery("findByUserName"), variables); // This is line 584
            UserAccountBean eb = new UserAccountBean();
            Iterator it = alist.iterator();
            if (it.hasNext()) {
                eb = (UserAccountBean) this.getEntityFromHashMap((HashMap) it.next(), true);
            return eb;
    So it looks like the NPE is caused by digester being null. digester seems to be something to do with setting up the sql queries to run against the database, but I don't know why it would be null here.

  • ebsebs Posts: 102
    Have you configured LDAP?....


    Also worth checking for end of line characters in the properties file as mentioned in the link.

Sign In or Register to comment.