Page History
...
Log full of index rules warnings when upgrading from 5.4.x directly to 5.7.x
Jackrabbit 2.16 introduced existence checks for node-types when refreshing indexing configurations. Previously it would accept arbitrary node-type names as strings. If your project is not using Magnolia's SearchIndex implementation, you may find the following messages in your logs:
Code Block | ||
---|---|---|
| ||
2018-07-25 17:48:33,691 WARN rabbit.core.query.lucene.IndexingConfigurationImpl: Unable to refresh index rules
javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.magnolia.info/jcr/mgnl}page
at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getNodeTypeDef(NodeTypeRegistry.java:552) ~[jackrabbit-core-2.16.1.jar:2.16.1] |
Code Block | ||
---|---|---|
| ||
2018-03-16 11:30:57,892 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: Exception initializing indexing configuration from: /info/magnolia/jackrabbit/indexing_configuration_website.xml
javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.magnolia.info/jcr/mgnl}page
at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getNodeTypeDef(NodeTypeRegistry.java:552) ~[jackrabbit-core-2.16.1.jar:2.16.1] |
To mitigate this problem, replace in your Jackrabbit search configuration files
Code Block | ||
---|---|---|
| ||
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> |
with
Code Block | ||
---|---|---|
| ||
<SearchIndex class="info.magnolia.jackrabbit.lucene.SearchIndex"> |
The warnings should not appear in the logs if you follow our recommendation to update first to the latest minor release version before upgrading to the most recent major release, see How to update.
H2 database
Include Page | ||||
---|---|---|---|---|
|
H2 does not accept more than one connection
Our default configuration does not use uses the server mode for H2. Therefore, if you If you migrate from Magnolia below 5.5.9 in the 5.5 branch or below 5.6.2 in the 5.6 branch and try to initiate a backup call using CLI or REST, it fails because H2 does not allow more than one connection at a time. This is a new issue in Magnolia (most likely due to H2 or Jackrabbit updates).A temporary workaround is to make H2 Configure H2 to run in server mode and adding by adding AUTO_SERVER=TRUE
in the URL parameters:
<param name="url" value="jdbc:h2:${wsp.home}/db;AUTO_SERVER=TRUE" />
...
The solution is to increase the system-wide limit on the number of open files. The exact procedure, however, varies from one OS to the next, see Too many open files..
Expand | ||
---|---|---|
| ||
|
...
Port 8080 is the default port for Tomcat. You can see it at the end of the default address http://localhost:8080
. If another application on the computer is already using the same port, you may need to change it.
...
Change the defaultBaseUrl
property, which is used to generate create absolute links in emails or other external systems. To do this, you need to now access Magnolia at the new port 8090.
- Log into the author instance at
http://localhost:8090/magnoliaAuthor/.magnolia
. - Go to Configuration.
- Set the value of
/server/defaultBaseUrl
property tohttp://localhost:8090/magnolia/
. - Log into the public instance at
http://localhost:8090/magnoliaPublic/.magnolia
. - Go to Configuration.
- Set the value of
/server/defaultBaseUrl
property tohttp://localhost:8090/magnolia/
.
Now the Welcome page at http://localhost:8090
has has the correct URLs too.
The port also needs to be changed in publishing configuration, otherwise publishing (activating) changes from the author to public instance fails.
- On the author instance,
- If you are using the Publishing module, go to Configuration > modules > publishing-core > config > receivers .
- If you are using the Activation module, go to Configuration > modules > activation > subscribers .
- Under the
magnoliaPublic8080
receiver (subscriber), set theURL
property tohttp://localhost:8090/magnoliaPublic
. - Rename the receiver (subscriber) to
magnoliaPublic8090
. - Activate the modified receiver (subscriber) including its subnodes.
Info |
---|
If you want to run two different Tomcats simultaneously you need to change other ports too. This is useful if you want to run different versions of Magnolia at the same time. In |
Windows Firewall is blocking Java
Allow an exception in Windows Firewall for Java.
- Go to Control Panel > Windows Firewall.
- Go to the Exceptions tab.
- Click Add Program and browse to the java.exe file in the Java installation directory, for example
C:\Sun\SDK\jdk\bin\java.exe
. - Click OK.
If you get a security alert during startup, check the Private networks checkbox and click Allow access.
CATALINA_HOME environment variable is not defined
CATALINA_HOME environment variable identifies the Tomcat home directory, for example C:\Program Files\magnolia\apache-tomcat
. Usually Magnolia finds this directory automatically. When you type magnolia_control.bat start
in the bin
directory to start the system, a second script named startup.bat
tries to find Tomcat home. It assumes that Tomcat home is one level above the bin
directory where you issued the command, and sets the value of CATALINA_HOME to that directory.
Code Block |
---|
C:\Program Files
magnolia
apache-tomcat <-- Tomcat home directory
bin <-- magnolia_control.bat is here
|
However, if you added the bin
directory to your PATH environment variable you can execute magnolia_control.bat
from anywhere. This means startup.bat
does not find Tomcat home directory by simply moving up one level from where you are and displays the following error:
To correct this define CATALINA_HOME in environment variables. Follow the instructions in Set JAVA_HOME environment variable.
Java out of memory
If the Java Virtual Machine (JVM) does not have enough memory you may see a java.lang.OutOfMemoryError
in the startup log and Magnolia fails to start.
...
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
at org.apache.jackrabbit.core.query.lucene.IndexingQueue.getFinishedDocuments
Cannot publish content with path-based locking
After upgrading to Magnolia 5.7.9, it is not possible to publish content locally. The following errors can be found in the logs:
Log of the Author instance
Code Block |
---|
ERROR info.magnolia.publishing.command.PublicationCommand 08.06.2021 09:42:18 – Receiver: magnoliaPublic8080, error: Unable to contact receiver, HTTP response code: 500. |
Log of the Public instance
Code Block |
---|
ERROR info.magnolia.publishing.receiver.operation.jcr.AbstractJcrReceiveOperation 08.06.2021 09:41:52 – UNC path is missing sharename: /\website\/
java.nio.file.InvalidPathException: UNC path is missing sharename: /\website\/ |
As a temporary workaround, switch the locking mode to compatibility
(JCR-based) locking in the configuration of the publishing-core
module:
/modules/publishing-core/config@lockManagerMode=compatibility
Windows Firewall is blocking Java
Allow an exception in Windows Firewall for Java.
- Go to Control Panel > Windows Firewall.
- Go to the Exceptions tab.
- Click Add Program and browse to the java.exe file in the Java installation directory, for example
C:\Sun\SDK\jdk\bin\java.exe
. - Click OK.
If you get a security alert during startup, check the Private networks checkbox and click Allow access.
CATALINA_HOME environment variable is not defined
CATALINA_HOME environment variable identifies the Tomcat home directory, for example C:\Program Files\magnolia\apache-tomcat
. Usually Magnolia finds this directory automatically. When you type magnolia_control.bat start
in the bin
directory to start the system, a second script named startup.bat
tries to find Tomcat home. It assumes that Tomcat home is one level above the bin
directory where you issued the command, and sets the value of CATALINA_HOME to that directory.
Code Block |
---|
C:\Program Files
magnolia
apache-tomcat <-- Tomcat home directory
bin <-- magnolia_control.bat is here
|
However, if you added the bin
directory to your PATH environment variable you can execute magnolia_control.bat
from anywhere. This means startup.bat
does not find Tomcat home directory by simply moving up one level from where you are and displays the following error:
To correct this define CATALINA_HOME in environment variables. Follow the instructions in Set JAVA_HOME environment variable.
JVM issues on Windows
32-bit JVM does not work in Windows
( Tested on Windows 10.) When starting up Tomcat with the Magnolia CLI mgnl start
command, you get a flickering window, the server hangs and nothing is written into the logs. To see the actual error, don't use Magnolia CLI to start Magnolia, start Tomcat directly with <your-magnolia-install-folder>\apache tomcat\bin\catalina.bat run
. This should start Magnolia in the same window and allow you to see the error message:
Code Block |
---|
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap |
The most likely cause is that you are trying to allocate too much heap space in the 32-bit JVM.
Solution: Replace the JVM with a 64-bit version.
See also: Why can't I get a larger heap with the 32-bit JVM?
Neither JAVA_HOME nor JRE_HOME is defined
You get the following error message after a fresh Java installation:
Code Block |
---|
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variables is needed to run this program |
Solution: Set the variables through the "Edit the system environment variables" dialog.
JRE_HOME is undefined
If you get an error like this one:
Code Block |
---|
The JRE_HOME environment variable is not defined correctly
The environment variable is needed to run this program |
then you are most probably attempting to run Tomcat with the JAVA_HOME
variable set but without the JRE_HOME
variable defined.
Solution: Set the JRE_HOME
variable.
Java out of memory
If the Java Virtual Machine (JVM) does not have enough memory you may see a java.lang.OutOfMemoryError
in the startup log and Magnolia fails to start.
Code Block | ||||
---|---|---|---|---|
| ||||
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
at org.apache.jackrabbit.core.query.lucene.IndexingQueue.getFinishedDocuments
|
Increase Java heap size to allocate more memory to JVM:
- Stop the server.
./magnolia_control.sh stop
- Open file
/apache-tomcat/bin/setenv.sh
(/apache-tomcat/bin/setenv.bat
on Windows) in a text editor. - Edit the
Xmx
parameter to set a new maximum heap size. Default size for Magnolia is 512M, try a higher amount such as 1024M. - Save the file and start the server.
./magnolia_control.sh start && tail -f ../logs/catalina.out
JAR file does not start
When installing the Enterprise Edition on Windows, you can start the installer by double-clicking the JAR file. If this does not work there is a chance that some application on your system has registered the .jar extension.
You can try to fix it yourself by restoring the association of the .jar extension with the javaw.exe
executable. .Right-click the JAR file and select Open With. Typically the javaw.exe
file is in C:\Program Files (x86)\java\jre6\bin
). Alternatively, start the installer from a command prompt with the following command: java -jar magnolia-enterprise-installer-x.y.z.jar
. Make sure the file extension is .jar. Internet Explorer has a tendency to append or change it to .zip.
Activation errors
For issues related to activation keys and the handshaking process, see the Activation errors page.
Virtual URI mappings not working if too many are configured
To mitigate an issue caused by having more than 500 configured virtual URI mappings in light modules, a WARN-level message is now logged when a DirectoryWatcher
overflow occurs (MAGNOLIA-7762). We recommend to keep the number of files in a single folder below 100 and to use folder hierarchies whenever possible. For the upcoming fix, see MAGNOLIA-7798.
No indication about conflicting URI mappings in Firefox
In the Pages app, Magnolia informs the editor about a potential URI mapping conflict by placing a warning icon next to the name of the newly created page. Due to a CSS issue Firefox users can't see the icon:
Jira | ||||||||
---|---|---|---|---|---|---|---|---|
|
Natural order not respected in results of content searches
If you search for content using searchfn.searchPage()
, searchfn.searchContent()
or by executing search queries directly from a template, the search result order will not respect the natural order. This issue is caused by a bug in Apache Jackrabbit filed as JCR-3932: "Result of JCR-SQL2 query doesn't respect document order in JCR".
Until the JCR bug is fixed, do not use searchfn
. To get the correct order, execute JCR XPath queries directly.
Increase Java heap size to allocate more memory to JVM:
- Stop the server.
./magnolia_control.sh stop
- Open file
/apache-tomcat/bin/setenv.sh
(/apache-tomcat/bin/setenv.bat
on Windows) in a text editor. - Edit the
Xmx
parameter to set a new maximum heap size. Default size for Magnolia is 512M, try a higher amount such as 1024M. - Save the file and start the server.
./magnolia_control.sh start && tail -f ../logs/catalina.out
JAR file does not start
When installing the Enterprise Edition on Windows, you can start the installer by double-clicking the JAR file. If this does not work there is a chance that some application on your system has registered the .jar extension.
You can try to fix it yourself by restoring the association of the .jar extension with the javaw.exe
executable. .Right-click the JAR file and select Open With. Typically the javaw.exe
file is in C:\Program Files (x86)\java\jre6\bin
). Alternatively, start the installer from a command prompt with the following command: java -jar magnolia-enterprise-installer-x.y.z.jar
. Make sure the file extension is .jar. Internet Explorer has a tendency to append or change it to .zip.
Activation errors
For issues related to activation keys and the handshaking process, see the Activation errors page.
No indication about conflicting URI mappings in Firefox
In the Pages app, Magnolia informs the editor about a potential URI mapping conflict by placing a warning icon next to the name of the newly created page. Due to a CSS issue Firefox users can't see the icon:
Jira