1 2 Previous Next 19 Replies Latest reply on Jan 26, 2012 4:14 PM by Sverker Abrahamsson

    Modeshape on JBoss AS 7?

    Sverker Abrahamsson Novice

      Does modeshape work on JBoss AS 7? I did a quick test with 2.6.0.Beta1 files from JBoss AS 6 bundle and get failure to deploy on webdav and rest modules. The .failure file for webdav contains the following:

       

      {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"modeshape-webdav.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"modeshape-webdav.war\".INSTALL: Failed to process phase INSTALL of deployment \"modeshape-webdav.war\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.modeshape-webdav.modeshape-webdav.modeshape-webdav.ValidatorFactory missing [ jboss.naming.context.java.module.modeshape-webdav.modeshape-webdav ]","jboss.naming.context.java.comp.modeshape-webdav.modeshape-webdav.modeshape-webdav.Validator missing [ jboss.naming.context.java.module.modeshape-webdav.modeshape-webdav ]"]}}}

       

      The .failure file for rest contains the following:

       

      {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.web.realm.\"modeshape-rest.war\" missing [ jboss.security.security-domain.modeshape ]"]}}}

       

      It seems the modeshape-services and jcr deployed fine.

        • 1. Re: Modeshape on JBoss AS 7?
          Randall Hauch Master

          We have separate ModeShape kits for JBoss AS 5.x and 6.x, but to my knowledge neither of them work when installed into JBoss AS7. Sorry, we just haven't had time to get that running.

           

          Has anyone else tried it and figured out the recipe for deploying on AS7?

          • 2. Re: Modeshape on JBoss AS 7?
            Sverker Abrahamsson Novice

            To summarize up what I've done so far on this topic:

             

            I'm using AS 7.0.1 as base with the standalone configuration and the files from AS 6 bundle of Modeshape 2.6.0.Beta2. I'm installing modeshape as follows:

             

            • Create a folder modules/org/modeshape/jcr/main where I put jcr-2.0.jar, modeshape-jcr-api-2.6.0.Beta2.jar and modeshape-jdbc-local-2.6.0.Beta2.jar. The module is defined by the following module.xml:

             

            <?xml version="1.0"?>
            <module xmlns="urn:jboss:module:1.0" name="org.modeshape.jcr">
            <resources>
              <resource-root path="jcr-2.0.jar" />
              <resource-root path="modeshape-jcr-api-2.6.0.Beta2.jar" />
              <resource-root path="modeshape-jdbc-local-2.6.0.Beta2.jar" />
            </resources>
            <!-- TODO Configure the dependencies on other modules -->
            <!--dependencies>
              <module name="javax.api" />
              <module name="javax.mail.api" />
              <module name="javax.servlet.api" />
              <module name="javax.servlet.jsp.api" />
              <module name="javax.transaction.api" />
            </dependencies-->
            </module>

             

            • Edit standalone/conf/standalone.xml. Add the following:

            To <subsystem xmlns="urn:jboss:domain:logging:1.1"> section add

                        <logger category="org.modeshape">
                            <level name="INFO"/>
                        </logger>

             

            To <subsystem xmlns="urn:jboss:domain:security:1.0"> section under <security-domains> add

                            <security-domain name="modeshape">
                                <authentication>
                                    <login-module code="UsersRoles" flag="required">
                                        <module-option name="unauthenticatedIdentity" value="guest"/>
                                        <module-option name="usersProperties" value="${jboss.server.config.dir}/modeshape-users.properties"/>
                                        <module-option name="rolesProperties" value="${jboss.server.config.dir}/modeshape-roles.properties"/>
                                    </login-module>
                                </authentication>
                            </security-domain>

             

            The datasource configurations will also need to be put in this config file but I haven't got there yet

             

            • Put the modeshape-users.properties and modeshape-roles.properties in standalone/conf. I've been able to verify that the authentication works fine.

             

             

             

            • In standalone/deployments I put modeshape-services.jar, modeshape-rest.war and modeshape-webdav.war as exploded deployments. To make them deploy I need to create a trigger file for each which is the name with extension .dodeploy

             

             

            • In modeshape-services.jar/META-INF I create a file jboss-deployment-structure.xml with the following content:

            <?xml version="1.0"?>
            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
            <deployment>
              <resources>
               <!-- TODO Remove the entries that does not need to be exported to depending modules -->
               <resource-root path="aperture-1.1.0.Beta1.jar"/>
               <resource-root path="common-2.4.0.jar"/>
               <resource-root path="common-3.3.0-v20070426.jar"/>
               <resource-root path="contenttype-3.2.100-v20070319.jar"/>
               <resource-root path="core-3.3.0-v_771.jar"/>
               <resource-root path="ecore-2.4.2.jar"/>
               <resource-root path="ecore-xmi-2.4.1.jar"/>
               <resource-root path="expressions-3.3.0-v20070606-0010.jar"/>
               <resource-root path="jobs-3.3.0-v20070423.jar"/>
               <resource-root path="joda-time-1.6.jar"/>
               <resource-root path="lucene-analyzers-3.1.0.jar"/>
               <resource-root path="lucene-core-3.1.0.jar"/>
               <resource-root path="lucene-misc-3.1.0.jar"/>
               <resource-root path="lucene-regex-3.0.3.jar"/>
               <resource-root path="modeshape-clustering-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-cnd-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-common-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-disk-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-filesystem-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-infinispan-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-jbosscache-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-jcr-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-jdbc-metadata-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-store-jpa-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-connector-svn-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-graph-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-jbossas-service-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-jcr-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-mimetype-detector-aperture-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-repository-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-search-lucene-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-classfile-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-cnd-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-ddl-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-images-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-java-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-jbpm-jpdl-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-mp3-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-msoffice-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-sramp-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-teiid-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-text-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-wsdl-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-xml-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-xsd-2.6.0.Beta2.jar"/>
               <resource-root path="modeshape-sequencer-zip-2.6.0.Beta2.jar"/>
               <resource-root path="osgi-3.4.3.R34x_v20081215-1030.jar"/>
               <resource-root path="poi-3.6.jar"/>
               <resource-root path="poi-scratchpad-3.6.jar"/>
               <resource-root path="preferences-3.2.100-v20070522.jar"/>
               <resource-root path="rdf2go.api-4.6.2.jar"/>
               <resource-root path="registry-3.3.0-v20070522.jar"/>
               <resource-root path="resources-3.3.0-v20070604.jar"/>
               <resource-root path="runtime-3.3.100-v20070530.jar"/>
               <resource-root path="wsdl4j-1.6.2.jar"/>
               <resource-root path="xsd-2.2.3.jar"/>
              </resources>
              <dependencies>
               <module name="org.modeshape.jcr" />
               <!-- TODO Figure out which other dependencies are needed -->
               <!--module name="javax.mail.api" />
               <module name="org.apache.xerces" />
               <module name="org.jboss.modules" />
               <module name="system" export="false">
                <imports>
                 <include path="com/sun/jmx"/>
                 <exclude path="/**" />
                </imports>
               </module-->
              </dependencies>
            </deployment>
            </jboss-deployment-structure>

             

            I probably also need to edit META-INF/jboss-beans.xml as it points to the wrong path but at this point modeshape-services.jar is deploying without throwing any exceptions.

             

            • In modeshape-rest.war and modeshape-webdav.war I create a file WEB-INF/jboss-deployment-structure.xml with the following content:

            <?xml version="1.0"?>
            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
            <deployment>
              <dependencies>
               <module name="org.modeshape.jcr" />
               <module name="deployment.modeshape-services.jar" />
               <module name="org.slf4j" />
              </dependencies>
            </deployment>
            </jboss-deployment-structure>

             

            Currently I'm getting NoClassDefFoundError when deploying rest and webdav wars as they can't find classes which are present in modeshape-services.jar/modeshape-common-<version>.jar. My understanding from reading the AS 7 developers guide was that it would be made availible by the dependency on module deployment.modeshape-services.jar as specified above but it doesn't work. I've asked a question regarding that issue in the AS 7 forum: http://community.jboss.org/thread/172367

            • 3. Re: Modeshape on JBoss AS 7?
              Sverker Abrahamsson Novice

              I've tested to put modeshape-common-<version>.jar in modeshape-rest.war/WEB-INF/lib and deploy it. Then it doesn't throw any exceptions on deployment but when I try to access it (just made a http request to http://localhost:8080/modeshape-rest/) I get the following stack trace after authenticating:

               

              23:38:11,466 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/modeshape-rest].[Resteasy]] (http-127.0.0.1-127.0.0.1-8080-1) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
                      at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
                      at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
              Caused by: java.lang.NullPointerException
                      at org.modeshape.web.jcr.spi.FactoryRepositoryProvider.getJcrRepositoryNames(FactoryRepositoryProvider.java:64) [modeshape-web-jcr-2.6.0.Beta2.jar:]
                      at org.modeshape.web.jcr.RepositoryFactory.getJcrRepositoryNames(RepositoryFactory.java:94) [modeshape-web-jcr-2.6.0.Beta2.jar:]
                      at org.modeshape.web.jcr.rest.ServerHandler.getRepositories(ServerHandler.java:41) [modeshape-web-jcr-rest-2.6.0.Beta2.jar:]

                      at org.modeshape.web.jcr.rest.JcrResources.getRepositories(JcrResources.java:168) [modeshape-web-jcr-rest-2.6.0.Beta2.jar:]
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
                      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
                      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:]
                      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]
                      ... 21 more

              • 4. Re: Modeshape on JBoss AS 7?
                Sverker Abrahamsson Novice

                Randall wrote in the other thread:

                There basically are a number of separate components:

                 

                • Global Classpath - these are needed by the war files, and should include the two API classes needed by ModeShape clients: modeshape-jcr-api-<version>.jar and jcr.jar file. The "modeshape-jdbc-local-<version>.jar" file contains the ModeShape JDBC driver and is needed if and only if your web applications want to query the repository using JCR-SQL2 via the JDBC API. (I'd recommend getting it working without the JDBC driver at first; you can always add it in later once everything else is working.)
                • Services - this is everything needed by the ModeShape JCR engine (e.g., 'modeshape-jcr-<version>.jar'), including all extensions (e.g., sequencers, connectors, text extractors) and all libraries they are dependent upon. If you're not sure of the dependencies, look at our current Maven assembly that puts together the JARs that are needed for running ModeShape as a service in AS 5 and 6. Note that this includes all extension libraries and their 3rd party dependencies, so if you want to trim down you'll need to look at the dependencies needed for each extension. BTW, I don't tink this includes the SLF4J API jar because it is (or should be) available globally (I hope I'm right about this).
                • Web apps - these should be deployable and self-contained (e.g., they would have their own copies of classes like 'CheckArg'), except for the two API jars that are globally available. They are deployed just like any other web app resource.

                 

                Where this gets complicated is that I don't think any of the Java classes in the "modeshape-jbossas-service" project are needed nor can be used in AS 7, since they depend on the profile service used in AS 5 and 6. I was thinking we'd need to create another Java class similar to ManagedEngine that would be instantiated by AS 7 as the service. Perhaps I'm wrong, and the Managed* classes for AS5/6 can actually work in AS7.

                 

                Hopefully this is what you need to keep going. I wish I could provide more guidance on AS7 integration, but I just haven't yet had the time to dive into that.

                 

                 

                I believe the supporting jars (jcr-2.0.jar et al) is deployed correctly in the module. Next step is to make sure the modeshape-services are deployed correctly and that this is the optimal way to deploy on AS7.

                • 5. Re: Modeshape on JBoss AS 7?
                  Sverker Abrahamsson Novice

                  I believe there is a bug in how jar deployments are handled in AS 7 as I outline in the thread in AS 7 Users forum. It is also necessary to use the nightly snapshot build as pojo deployment (which reads the jboss-beans,xml file) is not availible until AS 7.0.2.Final. Apart from that I've done the following changes:

                   

                  deployment/modeshape-service.jar/META-INF/jboss-beans.xml:

                   

                  <?xml version="1.0" encoding="UTF-8"?>
                  <deployment xmlns="urn:jboss:pojo:7.0"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="urn:jboss:pojo:7.0 jboss-pojo_7_0.xsd">

                  <bean name="URL" class="java.net.URL">
                    <constructor>
                     <parameter><value class="java.lang.String">file:/${jboss.server.base.dir}/deployments/modeshape-services.jar/modeshape-config.xml</value></parameter>
                    </constructor>
                  </bean>

                  <bean name="ModeShapeEngine" class="org.modeshape.jboss.managed.ManagedEngine">
                    <property name="configURL">
                     <inject bean="URL" />
                    </property>
                  </bean>

                  <bean name="JNDIManaged" class="org.modeshape.jboss.managed.JNDIManagedRepositories">
                    <property name="managedEngine">
                     <inject bean="ModeShapeEngine" />
                    </property>
                    <property name="modeshapeUrl"><value>jndi:jcr/local</value></property>
                    <depends>ModeShapeEngine</depends>
                  </bean>

                  <bean name="ModeShapeSequencingService" class="org.modeshape.jboss.managed.ManagedSequencingService">
                    <property name="managedEngine">
                     <inject bean="ModeShapeEngine" />
                    </property>
                    <depends>ModeShapeEngine</depends>
                  </bean>
                  </deployment>

                  deployment/modeshape-services.jar/modeshape-config.xml:

                       Change dataSourceJndiName to java:jboss/datasources/ExampleDS

                   

                  Now I get the following error:

                   

                  22:50:09,918 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.pojo.JNDIManaged.START: org.jboss.msc.service.StartException in service jboss.pojo.JNDIManaged.START: java.lang.reflect.InvocationTargetException
                          at org.jboss.as.pojo.service.LifecyclePojoPhase.start(LifecyclePojoPhase.java:79)
                          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
                          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
                          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
                          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
                  Caused by: java.lang.reflect.InvocationTargetException
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
                          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
                          at org.jboss.as.pojo.service.MethodJoinpoint.dispatch(MethodJoinpoint.java:41)
                          at org.jboss.as.pojo.service.LifecyclePojoPhase.start(LifecyclePojoPhase.java:77)
                          ... 5 more
                  Caused by: java.lang.UnsupportedOperationException: Naming context is read-only
                          at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:314)
                          at javax.naming.InitialContext.createSubcontext(InitialContext.java:464) [:1.6.0_24]
                          at org.jboss.util.naming.Util.createSubcontext(Util.java:74)
                          at org.jboss.util.naming.Util.rebind(Util.java:130)
                          at org.jboss.util.naming.Util.rebind(Util.java:117)
                          at org.modeshape.jboss.managed.JNDIManagedRepositories.rebind(JNDIManagedRepositories.java:113)
                          at org.modeshape.jboss.managed.JNDIManagedRepositories.start(JNDIManagedRepositories.java:60)
                          ... 11 more

                  This issue was supposed to be solved to AS 7.0.0.Final but apperently not... This is supposed to be a way to do the same in AS 7: https://github.com/stuartwdouglas/as7-example-jndi-binding/blob/master/src/main/java/org/jboss/as/example/jndibinding/JndiServiceActivator.java

                  • 7. Re: Modeshape on JBoss AS 7?
                    Sverker Abrahamsson Novice

                    No, it's depending either on this issue: https://issues.jboss.org/browse/AS7-421 or to make a proper AS7-style service for modeshape.

                    • 8. Re: Modeshape on JBoss AS 7?
                      Claudiu Muresan Newbie

                      I've took latest release of JBoss AS7 which is 7.1.0 CR1. AS7-421 is suppossed to be fixed in 7.1.0beta1 but still modeshape's jboss sevices fail with the same error (Caused by: java.lang.UnsupportedOperationException: Naming context is read-only). I guess the only thing left is to rewrite the services to be compatible with AS7 style. Have you already done that (I don't want to re-invent the wheel)?

                       

                      Regards,

                      Claudiu

                      • 9. Re: Modeshape on JBoss AS 7?
                        Sverker Abrahamsson Novice

                        Hi

                        I started to work on it some time ago and was actually just looking into finishing it. I believe the right approach is to instead of the modeshape-jbossas-service create a as7-style subsystem. So far it's quite simple but what I've yet not understood is how the @ManagemetObjects in as5/6 works which the service use. Looks like they would be mbeans or something like that.

                         

                        Your input is very welcome.

                        /Sverker

                        • 10. Re: Modeshape on JBoss AS 7?
                          Randall Hauch Master

                          We've started this work in the 3.x codebase. It's incomplete (it doesn't allow much runtime monitoring or management yet), but it does allow us to deploy ModeShape 3 into AS7. See https://github.com/ModeShape/modeshape/tree/3.x/deploy/jbossas/modeshape-jbossas-subsystem for the code - hopefully it will help with creating an AS7 subsystem for ModeShape 2.x. BTW, we'd welcome any such contribution.

                          • 11. Re: Modeshape on JBoss AS 7?
                            Sverker Abrahamsson Novice

                            I've looked at that code and copied over the files to the 2.x tree. I've modified the assembly descriptors so that works as it should and it deploys fine. However it does not configure any engine.

                             

                            Looking at the modeshape-jbossas-subsystem code I don't see anywhere that it actually configures the engine, or am I just missing it? I'm comparing to what is described at https://docs.jboss.org/author/display/AS7/Example+subsystem

                             

                            /sverker

                            • 12. Re: Modeshape on JBoss AS 7?
                              Randall Hauch Master

                              Looking at the modeshape-jbossas-subsystem code I don't see anywhere that it actually configures the engine, or am I just missing it? I'm comparing to what is described at https://docs.jboss.org/author/display/AS7/Example+subsystem

                              You're referring to https://github.com/ModeShape/modeshape/tree/3.x/deploy/jbossas/modeshape-jbossas-subsystem ? That code is incomplete, and I think it doesn't yet start the engine. Part of our community is working on it now (part-time). Holler if you'd like to help!

                              • 13. Re: Modeshape on JBoss AS 7?
                                Sverker Abrahamsson Novice

                                Yes, that's what I figured. As I understand you are moving the modeshape config from xml file to the subsystem configuration and then use that to set up the engine.

                                 

                                My approach for a subsystem for 2.x tree is to keep the modeshape confing in it's own file and configure the subsystem like this:

                                 

                                        <subsystem xmlns="urn:jboss:domain:modeshape:2.0">
                                            <engine config-url="${jboss.server.config.url}/modeshape-config.xml" jndi-name="jndi:jcr/local"/>
                                        </subsystem>

                                I've been having difficulties to follow the example subsystem as it doesn't tell so much about why each step is taken and how it connects together. I see that you've used tiid as a base for your impl, which is a bit complex. I found the mail subsystem which has much easier code and looks similar to what is needed to initialize the engine with the config above. That is how far I've got. The idea then would be to implement a ModeShapeEngineService which is bound to the jndi name and contains similar code as JNDIManagedRepositories and ManagedEngine. May need more than one service implementation for that.

                                 

                                I think I need someone to discuss the above approach and how to complete it. If I can help also on 3.x tree I'm intrested of that.

                                • 14. Re: Modeshape on JBoss AS 7?
                                  Ted Jones Master

                                  Hi Sverker,

                                   

                                  I am working on the ModeShape subsystem in the 3.x code base. I agree the documentation for building a subsystem is still a WIP and consequently difficult to follow and connect the dots. I also concur the Teiid subsystem is complex, but it is mirrored after the Infinispan subsystem code which has analogous processes/functionality. 

                                   

                                  I think your approach for the 2.x tree makes sense, however we would not be able to leverage DMR to make configuration changes to the underlying ModeShape configuration via CLI (at least not easliy). That might be okay for the 2.x codebase though.

                                   

                                  For 3.x, I am leaning towards an EngineService like you describe above. It would allow us to manage the connection and provide a hook to the repositories, operations, and metrics.

                                   

                                  WDYT?

                                   

                                  Thanks,

                                  Ted

                                  1 2 Previous Next