8 Replies Latest reply on Aug 15, 2012 4:18 PM by asilchenko

    Datasource= java:/datasources/ModeShapeDS is Enabled=false.

    Newbie

      Just installed and configured ModeShape (3.0.0.Beta2) in JBoss (jboss-as-7.1.1.Final) but when open AS7 console, I see  Datasource= java:/datasources/ModeShapeDS is Enabled=false. Could you please let me know how to enable it? Thank you very much.

       

      Best REgards,

      Anna

        • 1. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
          Horia Chiorean Master

          Hi,

           

          Are there any errors reported during AS7 startup ? (the DS should be enabled by default)

           

          A couple of things you can check: the <drivers> section of the standalone configuration file should contain:

             <driver name="modeshape" module="org.modeshape.jdbc">

                <driver-class>org.modeshape.jdbc.LocalJcrDriver</driver-class>

            </driver>

           

          and also, the  <connection-url>jdbc:jcr:jndi:jcr?repositoryName=...</connection-url> of the DataSource should have a repositoryName which corresponds to a  <repository name="...">

          • 2. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
            Newbie

            Thank you so much for your quick response!

            Standalone.xml looks ok...

                       <datasource jndi-name="java:/datasources/ModeShapeDS" pool-name="java:/datasources/ModeShapeDS">
                            <connection-url>jdbc:jcr:jndi:jcr?repositoryName=artifacts</connection-url>
                            <driver>modeshape-driver</driver>
                            <security>
                                <user-name>admin</user-name>
                                <password>admin</password>
                            </security>
                        </datasource>
                        <datasource jndi-name="java:/datasources/ModeShapeDS" pool-name="java:/datasources/ModeShapeDS">
                            <connection-url>jdbc:jcr:jndi:jcr?repositoryName=artifacts</connection-url>
                            <driver>modeshape-driver</driver>
                            <security>
                                <user-name>admin</user-name>
                                <password>admin</password>
                            </security>
                        </datasource>

             

            No errors during start up and the log file looks fine...

            09:57:24,556 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

            09:57:24,583 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010404: Deploying non-JDBC-compliant driver class org.modeshape.jdbc.LocalJcrDriver (version 3.0)

             

            I am launching the server using this command:

            bin/standalone.sh -c=standalone.xml

            • 3. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
              Horia Chiorean Master

              Provided you've copied the files from modeshape-3.0.0.Beta2-jbossas-7-dist.zip into your 7.1.1 folder, you should launch the server with the standlone-modeshape.xml configuration (from the zip), which contains the ModeShape config data.

              • 4. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
                Newbie

                Thank you for your response. I must be doing something wrong because I am getting error during the launch when using standalone-modeshape.xml parameter:

                 

                [silchenko@jaques jboss-as-7.1.1.Final]$ bin/standalone.sh -c=standlone-modeshape.xml

                JAVA_OPTS already set in environment; overriding default settings with values: -Xms512m -Xmx1024m

                WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.

                =========================================================================

                  JBoss Bootstrap Environment

                  JBOSS_HOME: /local/disk/silchenko/programs/jboss-as-7.1.1.Final

                  JAVA: /local/disk/silchenko/programs/java/jdk1.6.0_07/bin/java

                  JAVA_OPTS:  -server -XX:+TieredCompilation -Xms512m -Xmx1024m

                =========================================================================

                11:17:53,845 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

                java.lang.IllegalStateException: JBAS014805: Could not get main file: standlone-modeshape.xml. Specified files must be relative to the configuration dir: /local/disk/silchenko/programs/jboss-as-7.1.1.Final/standalone/configuration

                        at org.jboss.as.controller.persistence.ConfigurationFile.determineMainFile(ConfigurationFile.java:148)

                        at org.jboss.as.controller.persistence.ConfigurationFile.<init>(ConfigurationFile.java:90)

                        at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:375)

                        at org.jboss.as.server.Main.determineEnvironment(Main.java:242)

                        at org.jboss.as.server.Main.main(Main.java:83)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                        at java.lang.reflect.Method.invoke(Method.java:597)

                        at org.jboss.modules.Module.run(Module.java:260)

                        at org.jboss.modules.Main.main(Main.java:291)

                 

                Thank you very much!

                • 5. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
                  Horia Chiorean Master

                  You need to download the ModeShape Subsystem for AS7: http://www.jboss.org/modeshape/downloads/downloads3-0-0-beta.html and after that, extract the .zip file into your root 7.1.1 folder, overwriting files if/when prompted.

                  Once you've done this, you should find the jboss-as-7.1.1.Final/standalone/configuration/standalone-modeshape.xml file and should be able to start with -c standalone-modeshape.xml

                  • 6. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
                    Newbie

                    It solved my problem. I can see Datasource= java:/datasources/ModeShapeDS is Enabled=TRUE. Thank you very much!

                     

                    Best Regards,

                    Anna

                    • 7. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
                      Randall Hauch Master

                      Anna:

                       

                      I just wanted to clarify something: this data source is a ModeShape JDBC driver that allows clients to query the content of a repository through the JDBC API, using JCR-SQL2 queries; it is not the JDBC data source that ModeShape uses to store/persist repository content. With ModeShape 3 it is very easy to persist repository content inside a relational database, but that's done by configuring the Infinispan cache for the repository to use a cache store.

                       

                      Hopefully this was your understanding.

                       

                      Best regards,

                       

                      Randall

                      • 8. Re: Datasource= java:/datasources/ModeShapeDS is Enabled=false.
                        Newbie

                        Hello Randall,

                        Thank you  for your clarification. Will look into Infinispan and its configuration to persist content inside a relational database.

                         

                        Best Regards,

                        Anna