2 Replies Latest reply on Sep 4, 2012 11:42 AM by Alphonse Bendt

    Switch to Datasource

    uwew Newbie

      I tried to switch from the provided DBPC pool (i think) to a Jboss datasource. Therefore i applied the following changes:

      - added a datasource file gatein-oracle-ds.xml with the two datasources with the name jdbcidm_portal and jdbcjcr_portal

      - changed the configuration.properties:

           For the JCR part:

                gatein.jcr.datasource.name=java:jdbcjcr_portal

                gatein.jcr.datasource.dialect=auto

                gatein.jcr.datasource.schema=portaljdbcjcre

           For the IDM part

                gatein.idm.datasource.name=java:jdbcidm_portal

                gatein.idm.datasource.schema=portaljdbcidme

       

      - changed idm-configuration.xml:

           from <property name="hibernate.connection.datasource" value="${gatein.idm.datasource.name}${container.name.suffix}"/>

           to <property name="hibernate.connection.datasource" value="java:jdbcidm_portal"/>

       

      - changed jcr-configuration.xml:

           from <property name="source-name" value="${gatein.jcr.datasource.name}${container.name.suffix}"/>

           to <property name="source-name" value="java:jdbcjcr_portal"/>

       

      when using HSQLDB as the database, everything works fine. When using Oracle as the database the IDM tables are created without any problem, but unfortunately the JCR tables are not created. During startup of Jboss/Gatein, the JCR part throws the following error:

       

      2012-02-15 13:06:58,251 INFO  [exo.ws.rest.core.ResourceBinder] Bind new resource /jcr : class org.exoplatform.services.jcr.webdav.WebDavServiceImpl

      2012-02-15 13:06:58,255 INFO  [exo.ws.rest.core.ResourceBinder] Bind new resource /management : class org.exoplatform.management.RestManagementProvider

      2012-02-15 13:06:58,400 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//ENTITIES Special for XHTML//EN : dtd/xhtml-special.ent

      2012-02-15 13:06:58,400 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//ENTITIES Latin 1 for XHTML//EN : dtd/xhtml-lat1.ent

      2012-02-15 13:06:58,400 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//DTD XHTML 1.0 Transitional//EN : dtd/xhtml1-transitional.dtd

      2012-02-15 13:06:58,401 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//DTD XHTML 1.0 Frameset//EN : dtd/xhtml1-frameset.dtd

      2012-02-15 13:06:58,401 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN : dtd/web-app_2_3.dtd

      2012-02-15 13:06:58,401 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//DTD XMLSCHEMA 200102//EN : dtd/XMLSchema.dtd

      2012-02-15 13:06:58,401 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//DTD XHTML 1.0 Strict//EN : dtd/xhtml1-strict.dtd

      2012-02-15 13:06:58,401 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (public) : -//W3C//ENTITIES Symbols for XHTML//EN : dtd/xhtml-symbol.ent

      2012-02-15 13:06:58,402 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/2001/XMLSchema.dtd : dtd/XMLSchema.dtd

      2012-02-15 13:06:58,402 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://java.sun.com/dtd/web-app_2_3.dtd : dtd/web-app_2_3.dtd

      2012-02-15 13:06:58,402 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd : dtd/xhtml1-frameset.dtd

      2012-02-15 13:06:58,403 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd : dtd/xhtml1-transitional.dtd

      2012-02-15 13:06:58,403 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd : dtd/xhtml1-strict.dtd

      2012-02-15 13:06:58,404 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent : dtd/xhtml-symbol.ent

      2012-02-15 13:06:58,404 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/2001/datatypes.dtd : dtd/datatypes.dtd

      2012-02-15 13:06:58,404 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent : dtd/xhtml-lat1.ent

      2012-02-15 13:06:58,404 INFO  [exo.core.component.xml-processing.XMLResolvingServiceImpl] New entries to ResolvingService added (system) : http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent : dtd/xhtml-special.ent

      2012-02-15 13:06:58,411 INFO  [exo.core.component.xml-processing.TRAXTemplatesServiceImpl] XSLT schema found by relative path: xslt/get-method.xsl

      2012-02-15 13:06:58,688 INFO  [exo.jcr.component.core.StandaloneStoragePluginProvider] Value Storage Plugin initialized org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage@4857351c

      2012-02-15 13:06:58,690 ERROR [exo.jcr.component.core.RepositoryServiceImpl] Error start repository service

      javax.jcr.RepositoryException: jdbcjcr not bound: Cannot instantiate component class org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer: Cannot instantiate component class org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer

          at org.exoplatform.services.jcr.impl.RepositoryContainer.registerWorkspace(RepositoryContainer.java:374)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.registerWorkspacesComponents(RepositoryContainer.java:543)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.registerComponents(RepositoryContainer.java:484)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.<init>(RepositoryContainer.java:127)

          at org.exoplatform.services.jcr.impl.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:152)

          at org.exoplatform.services.jcr.impl.RepositoryServiceImpl.init(RepositoryServiceImpl.java:360)

          at org.exoplatform.services.jcr.impl.RepositoryServiceImpl.start(RepositoryServiceImpl.java:275)

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

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

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

       

      i double checked the jcr schema, user and password in oracle, this is ok.

       

      is there another place, where i have to change the datasource? Or is there a step by step info, on how to switch Gatein to use a Jboss datasource?

       

      Kind Regards,

      Uwe