Package org.exoplatform.services.jcr.config

Examples of org.exoplatform.services.jcr.config.RepositoryConfigurationException


      {
         return wsConfig.getCache().getParameterValue(JBOSSCACHE_CONFIG);
      }
      else
      {
         throw new RepositoryConfigurationException("Cache configuration not found");
      }
   }
View Full Code Here


      {
         container = rService.getRepository(repositoryName).getWorkspaceContainer(workspaceName);
      }
      catch (RepositoryException e)
      {
         throw new RepositoryConfigurationException(e);
      }

      // Recovery Filters are
      String changesFilterClassName = config.getParameterValue(QueryHandlerParams.PARAM_CHANGES_FILTER_CLASS, null);
      boolean recoveryFilterUsed = false;

      if (changesFilterClassName != null)
      {
         try
         {
            Class<?> changesFilterClass = ClassLoading.forName(changesFilterClassName, this);
            // Set recoveryFilterUsed, if changes filter implements LocalIndex strategy
            if (changesFilterClass != null)
            {
               recoveryFilterUsed = LocalIndexMarker.class.isAssignableFrom(changesFilterClass);
            }
         }
         catch (ClassNotFoundException e)
         {
            throw new RepositoryConfigurationException(e.getMessage(), e);
         }
      }

      QueryHandlerContext context =
         new QueryHandlerContext(container, itemMgr, indexingTree, nodeTypeDataManager, nsReg, parentHandler,
View Full Code Here

   {
      // initialize query handler
      String className = config.getType();
      if (className == null)
      {
         throw new RepositoryConfigurationException("Content hanler       configuration fail");
      }

      try
      {
         Class<?> qHandlerClass = ClassLoading.forName(className, this);
View Full Code Here

            continue;
         }

         if (!DBInitializerHelper.getDatabaseType(wsEntry).equals(dbType))
         {
            throw new RepositoryConfigurationException("All workspaces must be of same DB type. But "
               + wsEntry.getName() + "=" + DBInitializerHelper.getDatabaseType(wsEntry) + " and " + wsConfig.getName()
               + "=" + dbType);
         }

         // source name
         String wsSourceName = null;
         String newWsSourceName = null;
         try
         {
            wsSourceName = wsEntry.getContainer().getParameterValue("sourceName");
            newWsSourceName = wsConfig.getContainer().getParameterValue("sourceName");
         }
         catch (RepositoryConfigurationException e)
         {
            if (LOG.isTraceEnabled())
            {
               LOG.trace("An exception occurred: " + e.getMessage());
            }
         }

         if (wsSourceName != null && newWsSourceName != null)
         {
            if (dbType.isShareSameDatasource())
            {
               if (!wsSourceName.equals(newWsSourceName))
               {
                  throw new RepositoryConfigurationException("SourceName must be equals in " + dbType
                     + "-database repository." + " Check " + wsEntry.getName() + " and " + wsConfig.getName());
               }
            }
            else
            {
               if (wsSourceName.equals(newWsSourceName))
               {
                  throw new RepositoryConfigurationException("SourceName " + wsSourceName + " already in use in "
                     + wsEntry.getName() + ". SourceName must be different in " + dbType
                     + "-database structure type. Check configuration for " + wsConfig.getName());
               }
            }
View Full Code Here

            {
               backupDirsList.add(zipFile);
            }
            else
            {
               throw new RepositoryConfigurationException("There is no backup data for value storage with id "
                  + valueStorage.getId());
            }
         }
      }
View Full Code Here

            continue;
         }

         if (!DBInitializerHelper.getDatabaseType(wsEntry).equals(dbType))
         {
            throw new RepositoryConfigurationException("All workspaces must be of same DB type. But "
               + wsEntry.getName() + "=" + DBInitializerHelper.getDatabaseType(wsEntry) + " and " + wsConfig.getName()
               + "=" + dbType);
         }

         // source name
         String wsSourceName = null;
         String newWsSourceName = null;
         try
         {
            wsSourceName = wsEntry.getContainer().getParameterValue("sourceName");
            newWsSourceName = wsConfig.getContainer().getParameterValue("sourceName");
         }
         catch (RepositoryConfigurationException e)
         {
            if (LOG.isTraceEnabled())
            {
               LOG.trace("An exception occurred: " + e.getMessage());
            }
         }

         if (wsSourceName != null && newWsSourceName != null)
         {
            if (dbType.isShareSameDatasource())
            {
               if (!wsSourceName.equals(newWsSourceName))
               {
                  throw new RepositoryConfigurationException("SourceName must be equals in " + dbType
                     + "-database repository." + " Check " + wsEntry.getName() + " and " + wsConfig.getName());
               }
            }
            else
            {
               if (wsSourceName.equals(newWsSourceName))
               {
                  throw new RepositoryConfigurationException("SourceName " + wsSourceName + " already in use in "
                     + wsEntry.getName() + ". SourceName must be different in " + dbType
                     + "-database structure type. Check configuration for " + wsConfig.getName());
               }
            }
View Full Code Here

            {
               backupDirsList.add(zipFile);
            }
            else
            {
               throw new RepositoryConfigurationException("There is no backup data for value storage with id "
                  + valueStorage.getId());
            }
         }
      }
View Full Code Here

            try
            {
               DataSource ds = (DataSource)initialContextInitializer.getInitialContext().lookup(dbSourceName);
               if (ds != null)
               {
                  throw new RepositoryConfigurationException("RepositoryEntry for new " + repositoryEntry.getName()
                     + " repository contains already binded datasource " + dbSourceName + ".");
               }
            }
            catch (NameNotFoundException e)
            {
               if (LOG.isTraceEnabled())
               {
                  LOG.trace("An exception occurred: " + e.getMessage());
               }
            }
            catch (NamingException e)
            {
               throw new RepositoryConfigurationException(e.getMessage(), e);
            }
         }

         dataSourceNames.add(dbSourceName);
      }
View Full Code Here

      this.repositoryService = repositoryService;
      this.regWorkspaces = new HashMap<String, String>();
      if (params == null)
      {
         throw new RepositoryConfigurationException("Init parameters expected");
      }

      this.props = params.getPropertiesParam("locations");
      if (props == null)
      {
         throw new RepositoryConfigurationException("Property parameters 'locations' expected");
      }

      ValuesParam mixinValues = params.getValuesParam("mixin-names");
      if (mixinValues != null)
      {
View Full Code Here

            con.close();
         }
      }
      catch (final IOException e)
      {
         throw new RepositoryConfigurationException("Configuration read exception. " + e, e);
      }
      catch (final SQLException e)
      {
         throw new RepositoryConfigurationException("Database exception. " + e, e);
      }
      catch (final NamingException e)
      {
         throw new RepositoryConfigurationException("JDNI exception. " + e, e);
      }
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.config.RepositoryConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.