-
1. Re: Can't get repository explorer working
wesssel May 1, 2015 7:56 AM (in response to urugator)Make sure you are using a Modeshape configuration and have deployed the Modeshape subsystem to WildFly.
You should be using the standalone-modeshape.xml configuration file, not standalone-full.xml
-
2. Re: Can't get repository explorer working
hchiorean May 1, 2015 8:03 AM (in response to urugator)If you want to use the repository explorer in Wildfly, you should ideally use the WAR file which is packaged in the ModeShape Wildfly kit (http://downloads.jboss.org/modeshape/4.2.0.Final/modeshape-4.2.0.Final-jboss-wf8-dist.zip) and which is deployed via the ModeShape WF subsystem using the webapp element: https://github.com/ModeShape/modeshape/blob/modeshape-4.2.0.Final/deploy/jbossas/kit/jboss-wf8/standalone/configuration/standalone-modeshape.xml#L290
The WAR artifact which you're using is not packaged out-of-the-box for Wildfly, so you have to modify manually and:
1) add the correct dependency descriptor - e.g. https://github.com/ModeShape/modeshape/blob/modeshape-4.2.0.Final/deploy/jbossas/modeshape-jbossas-explorer-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
2) make sure you're using the ModeShape WF subsystem for defining your repositories.
This is because by default, the Web Explorer WAR will look for a ModeShape Engine instance bound in JNDI under java:/jcr. If you're not using the WF subsystem for defining repositories, this binding does not exist by default and the Explorer will not find anything. If you're using the JSON configuration approach in WF, then you must customize the Explorer's web.xml file and use the JSON connector - see https://docs.jboss.org/author/display/MODE40/Repository+Web+Explorer for more information.
-
3. Re: Can't get repository explorer working
urugator May 1, 2015 10:08 AM (in response to urugator)I don't want to use WF modeshape subsystem. I didn't realize I need to modify web.xml of explorer project directly.
Now, this is a bit embarrassing, but I can't modify the .war archive in any way.
First a tried to add config file and update web.xml with 7zip, which ended up on some error.
Than I tried to repack the archive with "jar -x/-c" commands, resulting in undeployable .war (I tried to repack the archive without making any modifications to it, same problem) - deploy ends up on some exception.
And if I try to use "jar -u" command I get an exception:
java.util.zip.ZipException: duplicate entry: META-INF/maven/org.modeshape/modeshape-web-explorer-war/pom.xml
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:233)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
at sun.tools.jar.Main.update(Main.java:630)
at sun.tools.jar.Main.run(Main.java:269)
at sun.tools.jar.Main.main(Main.java:1233)
Do you have any idea what's the problem? I would like to avoid building explorer from sources.
-
4. Re: Can't get repository explorer working
hchiorean May 1, 2015 10:24 AM (in response to urugator)Normally you should do this via your build system. Both Maven & Gradle support out-of-the-box WAR overlaying if your module has a "war" type dependency.
-
5. Re: Can't get repository explorer working
urugator May 1, 2015 11:36 AM (in response to hchiorean)Ok, I created new maven project with:
<dependency>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-web-explorer-war</artifactId>
<version>4.2.0.Final</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
created my web.xml and repository-config.json and succesfully deployed to WF.
The message on dialog window has changed to: "The url argument may not be null"
I tried to navigate to "/tree", which results in NPE.
My repository configuration contains only:
{
"name": "default"
}
web.xml:
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
<param-name>connector-class</param-name>
<param-value>org.modeshape.web.server.impl.JsonConfigConnectorImpl</param-value>
</context-param>
<context-param>
<param-name>config-url</param-name>
<param-value>/WEB-INF/classes/repository-config.json</param-value>
</context-param>
</web-app>
I checked that repository-config.json is on classpath in builded war