2017-07-16

RegEx - Repair broken lines of text (paragraphs with cut lines often due to pagination)

Search for: \n(^[a-z])+
Replace with (remove double quotes): " $1"


PS. Use a double "\n" if the paragraph is split apart by two lines... use three if by 3 and so on.

2017-07-14

TOMCAT - Users setup (tomcat-users.xml), in order to gain access to server status and manager

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">


  <role rolename="tomcat"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
<role rolename="manager-gui"/>
  <role rolename="admin-gui"/>

<user username="admin" password="PASSWORD_HERE" roles="admin,manager,tomcat,manager-gui,admin-gui"/>
 
  <user username="tomcat" password="PASSWORD_HERE" roles="tomcat,admin,manager"/>


</tomcat-users>

TOMCAT - It won't start and the logs say %1 is not a valid Win32 app

Open C:\xampp\tomcat\bin\tomcat7w.exe
Select "Use default" under Java Virtual Machine.
Otherwise point to the one you want it to use.




Collibra - Successful log sample (after changing JRE memory limits)

This is what a successful setup of a Collibra windows sandbox looks like... DGC 4.6.1 on Tomcat 9, using Java JDK's JRE 1.8.0_131-b11 64-bit.

  • Log file name: catalina.2017-07-14.log
  • Log file rows prefix: [TIMESTAMP] INFO [main] org.apache.catalina.startup.VersionLoggerListener.log ...
  • Details:
    1. Server version:        Apache Tomcat/9.0.0.M22
    2. Server built:          Jun 21 2017 09:44:18 UTC
    3. Server number:         9.0.0.0
    4. OS Name:               Windows 7
    5. OS Version:            6.1
    6. Architecture:          amd64
    7. Java Home:             C:\Program Files\Java\jdk1.8.0_131\jre
    8. JVM Version:           1.8.0_131-b11
    9. JVM Vendor:            Oracle Corporation
    10. CATALINA_BASE:         C:\tomcat
    11. CATALINA_HOME:         C:\tomcat
    12. Command line argument: -Dcatalina.home=C:\tomcat
    13. Command line argument: -Dcatalina.base=C:\tomcat
    14. Command line argument: -Djava.io.tmpdir=C:\tomcat\temp
    15. Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    16. Command line argument: -Djava.util.logging.config.file=C:\tomcat\conf\logging.properties
    17. Command line argument: exit
    18. Command line argument: -Xms128m
    19. Command line argument: -Xmx256m
    20. Command line argument: -Xmx4096m
    21. Command line argument: -Xms512m
    22. Command line argument: -XX:MaxPermSize=300m

 The last three confirm the limits on the JRE were expanded.

TOMCAT - How to increase the Java memory/heap limit

Add an environmental variable, like this (Linux/MacOS):
export _JAVA_OPTIONS="-Xmx2048m -Xms512m -XX:MaxPermSize=300m"

On windows
Environment variable name: _JAVA_OPTIONS
Value: -Xmx2048m -Xms512m -XX:MaxPermSize=300m