Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page will give you the steps needed to get Magnolia running with JBoss.  Using a DB outside of derby is not covered here. 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

...

2 - Determine Which Java Version To Use

WildFly 10 and above requires Java SE 8. It will not run with Java SE 6 or , 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 Mangolia Magnolia version you wish to use: Magnolia Certified Stack .

4 - Download JBoss

Versions Below JBoss EAP 7.0 / JBoss AS

...

Download the ZIP file with the description saying “Java EE Full & Web Distribution”Distribution.

Versions With JBoss EAP 7.0 and Above

...

Download the ZIP file with the description saying “Java EE Full & Web Distribution”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<name_of_Magnolia_instance>.war”war. This is a regular folder and it will not be a war WAR file, we will just be having “.war” as part of the name. 

 - Drop the Magnolia WAR file into the this newly created folder.

 - Explode the added WAR fileHow 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 “jbossjboss-deployment-structure.xml”. -Screenshot-xml”. 

- Paste the following code into this newly created file:

Code Block
titleJboss-deployment-structure.xml
<?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            <module name="org.slf4j" .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.

...

Open a console window and change directory to “<JBoss_folder>/bin”. And execute the following command: 

Code Block
languagebash
./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. 

...

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.


Image Added

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

Code Block
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)