Document Overview
This page will give you the steps needed to get Magnolia running with JBoss. If you would like more details into what each step does or how it works, please see : Understanding JBoss With Magnolia.
1 - Determine Which JBoss Version To Use
JBoss EAP Version | WildFly Version |
JBoss EAP 6.0 | JBoss AS 7.1 |
JBoss EAP 6.1 | JBoss AS 7.2 |
JBoss EAP 6.2 | JBoss AS 7.3 |
JBoss EAP 6.3 | JBoss AS 7.4 |
JBoss EAP 6.4 | JBoss AS 7.5 |
JBoss EAP 7.0 | WildFly 10 |
JBoss EAP 7.1 | WildFly 11 |
JBoss EAP 7.2 | WildFly 14 |
JBoss EAP 7.3 | WildFly 18 |
2 - Determine Which Java Version To Use
WildFly 10 and above requires Java SE 8. It will not run with Java SE 6, Java SE 7 or 9.(1)(2)
3 - Verify With Magnolia’s Certified Stack
Verify with Magnolia’s certified stack to ensure that the Java version is also compatible with the Magnolia version you wish to use: Magnolia Certified Stack.
4 - Download JBoss
Versions Below JBoss EAP 7.0 / JBoss AS
Click here: https://jbossas.jboss.org/downloads
Download the ZIP file with the description saying “Java EE Full & Web Distribution”.
Versions With JBoss EAP 7.0 and Above
Click here: https://wildfly.org/downloads/
Download the ZIP file with the description saying “Java EE Full & Web Distribution”
5 - Add Magnolia to JBoss
- Unzip the file you downloaded and create a new folder within the "standalone/deployments" folder. Name this folder “<name_of_Magnolia_instance>.war”. This is a regular folder and it will not be a WAR file, we will just be having “.war” as part of the name.
- Drop the Magnolia WAR file into this newly created folder.
- Explode the added WAR file: How to Explode a WAR.
6 - Configure Magnolia With JBoss
- Within standalone/deployments/<name_of_Magnolia_instance>.war/WEB-INF folder, create a new file and name it “jboss-deployment-structure.xml”.
- Paste the following code into this newly created file:
<?xml version="1.0"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"> <deployment> <exclude-subsystems> <subsystem name="weld" /> <subsystem name="jaxrs" /> <subsystem name="webservices" /> </exclude-subsystems> <exclusions> <module name="org.apache.log4j" /> <module name="org.apache.logging.log4j.api"/> <module name="org.bouncycastle" /> </exclusions> </deployment> </jboss-deployment-structure>
- Open your magnolia.properties file and add the following line : magnolia.definitions.classpath=info.magnolia
7 - Deploy Your Magnolia Instance
Create a new file within standalone/deployments and name it “<name_of_folder_with_exploded_WAR>.dodeploy”. As an example, if you named the folder magnoliaAuthor.war, the name of this new file will be “magnoliaAuthor.war.dodeploy”. No other changes will be made to this file.
8 - Start The Server
Open a console window and change directory to “<JBoss_folder>/bin”. And execute the following command:
./standalone.sh -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
9 - Access The Page
The page name is the name of the folder you created.
10 - Stop The Server
You can shut off the server by doing ctrl+c on the console that you started the server with.
11 - Patch The Server
You can patch a JBoss installation by dropping the patch zip file onto JBoss Admin console and then follow the instructions on screen.
12 - Troubleshooting
The startup option -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl seems to be necessary only during the Magnolia install phase or it will abort with errors such as
13:28:50,779 INFO [info.magnolia.repository.DefaultRepositoryManager] (Thread-141) Loading workspace imaging (logical name imaging). 13:28:50,843 ERROR [info.magnolia.jackrabbit.ProviderImpl] (Thread-141) Unable to register workspace, will continue: java.lang.IllegalArgumentException: Not supported: http://javax.xml.XMLConstants/property/accessExternalDTD at org.apache.xalan.processor.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:580) at __redirected.__TransformerFactory.setAttribute(__TransformerFactory.java:119) at info.magnolia.jackrabbit.WorkspaceConfigurationMerger.merge(WorkspaceConfigurationMerger.java:123) at info.magnolia.jackrabbit.ProviderImpl.createWorkspace(ProviderImpl.java:549) at info.magnolia.jackrabbit.ProviderImpl.registerWorkspace(ProviderImpl.java:523) at info.magnolia.repository.DefaultRepositoryManager.loadWorkspace(DefaultRepositoryManager.java:289) at info.magnolia.module.ModuleManagerImpl.loadRepository(ModuleManagerImpl.java:647) at info.magnolia.module.ModuleManagerImpl.loadModulesRepositories(ModuleManagerImpl.java:572) at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:265) at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:126) at java.lang.Thread.run(Thread.java:748) 13:28:50,846 ERROR [info.magnolia.repository.DefaultRepositoryManager] (Thread-141) Failed to initialize workspace imaging in repository magnolia: javax.jcr.NoSuchWorkspaceException: imaging at org.apache.jackrabbit.core.RepositoryImpl.getWorkspaceInfo(RepositoryImpl.java:707)