We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Rule designer 1.1 can not validate, test or save

2

Comments

  • toskriptoskrip Posts: 279 ✭✭✭
    Hallo Bin,

    logging behaviour depends in a great degree to your installation setup. In general the Designer is using log4j library which is an unwritten standard in Java development world. You can try to modify log4j.properties file located within /WEB-INF/classes/ folder of your Designer installation.

    You can also force the container (Tomcat) to put logging data to specific place using JAVA_OPTS (e.g. JAVA_OPTS="-Dcustom.logging.root=/var/log/webapps")

    best

    Tomas
  • liu09liu09 Posts: 51
    via Email
    Hi Thanks for your reply.

    I couldn
  • liu09liu09 Posts: 51
    Hi Tomas,

    I like the idea to fix this in Tomcat rather than in the Designer as it needs to be updated if a new designer version comes out. Hence try to do in a file named setenv.sh in the tomcat/bin folder, it contains one line:

    export JAVA_OPTS="-Dcustom.logging.root=/usr/local/apache-tomcat-7.0.52/logs"

    But it didn´t work. (at the moment all the OC logs are in the apache-tomat/logs folder)

    I also checked the log4j.properties, but have to say I have no clue how to change that one.

    Thanks

    Bin

  • toskriptoskrip Posts: 279 ✭✭✭
    edited December 2014
    In general you can deal with logging from container level (Tomcat) or application level. When doing application level logging the application should respect container logging ROOT which is setup in JAVA_OPTS. Take this ROOT as absolute path in that way that the application only defines relative paths to its own logging output files. It does not seem to be happening right now. I have checked the source code of Designer and now I see that they actually are using logback for logging right now. So the easiest way for you will be to adapt logback config which is in Designer/WEB-INF/classes/logback.groovy.

    There two appenders are defined (two logging approaches applied simultaneously). The first one is standard output (console output) and the second one is for logging into file.

    Change the "file" variable to point to the log file you want to use (wit absolute path)
    e.g. 
    file = "/usr/local/tomcat/logs/designer.log"

    you can also adapt the fileNamePattern variable:
    fileNamePattern = "/usr/local/tomcat/logs/designer.%d{yyyy-MM-dd}.log"

    than restart tomcat and everything should be in place
    best

    Tomas

  • liu09liu09 Posts: 51
    Great, it works!! Thanks Tomas, your help are always highly appreciated.

    Bin
  • ebsebs Posts: 137 ✭✭
    I hit the same issue with a locally installed Rule Designer i.e. no screen feedback from Validate or Save buttons.  The localhost log file contained the following after pressing the rule designer validate button:

    Jan 07, 2015 8:37:56 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [Designer] in context with path [/designer-1.2] threw exception [Request processing failed; nested exception is org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/defaultx.jspx'.] with root cause
    javax.el.ELException: The identifier [class] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.

    To fix the issue 
    1. Stop Tomcat
    2. add the following to the Tomcat Properties (Java tab) 
    -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
    3. Start Tomcat

    Screen feedback should now work
    image
  • liu09liu09 Posts: 51
    Hi Thanks for the post, it fixed the problem.

    I have the issue about the log again, as Tomas suggested I have the configuration like:

    Change the "file" variable to point to the log file you want to use (wit absolute path)
    e.g. 
    file = "/usr/local/tomcat/logs/designer.log"

    but OC still wrote the log to the /usr/local/tomcat/bin folder, any suggestions?

    Thanks

    Bin
  • toskriptoskrip Posts: 279 ✭✭✭
    are we talking about log for OC or Designer again?

    T
  • liu09liu09 Posts: 51
    The log for OC, it created logs both in the /usr/local/tomcat/bin and the local log folder /usr/local/tomcat/logs/ which I defined in.

    Thanks

    Bin
  • toskriptoskrip Posts: 279 ✭✭✭
    I think this behaviour is related to the initialisation and startup of tomcat itself. How do you start your tomcat? Do you directly start it as by calling /usr/local/tomcat/bin/startup.sh or do you use tomcat startup script /etc/init.d/tomcat start?

    Tomas
This discussion has been closed.