Examples of JcrMappingException


Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

    public static Object newInstance(Class clazz) {
        try {
            return clazz.newInstance();
        }
        catch(Exception ex) {
            throw new JcrMappingException("Cannot create instance for class "
                    + clazz,
                    ex);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

            Class converterClass= forName(className);

            return  ConstructorUtils.invokeConstructor(converterClass, params);
        }
        catch(Exception ex) {
            throw new JcrMappingException("Cannot create instance for class "  + className,  ex);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

        try {
            PropertyUtils.setNestedProperty(object, fieldName, value);
        }
        catch(Exception ex) {
            String className = (object == null) ? "<null>" : object.getClass().getName();
            throw new JcrMappingException("Cannot set the field " + fieldName + " in the class : " + className,
                    ex);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

    public static Object newInstance(String clazz) {
        try {
            return forName(clazz).newInstance();
        }
        catch(Exception ex) {
            throw new JcrMappingException("Cannot create instance for class "  + clazz, ex);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

    public static Class forName(String clazz) {
        try {
            return Class.forName(clazz, true, getClassLoader());
        }
        catch(Exception ex) {
            throw new JcrMappingException("Cannot load class " + clazz, ex);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

   * @return The class matching to the interface default interface
   */
  public static Class getDefaultImplementation(Class clazz)
  {
    if (! clazz.isInterface())
      throw new JcrMappingException(clazz + " is not an interface");

    return defaultImplementation.get(clazz);
  }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

            Class elementClass = ReflectionUtils.forName(elementClassName);
            // For multi value collections, only Collections are supported
            if (! (objects instanceof ManageableCollection))
            {

              throw new JcrMappingException("Impossible to retrieve the attribute "
                  + collectionDescriptor.getFieldName() + " in the class "
                  + collectionDescriptor.getClassDescriptor().getClassName()
                  " because it is not a collection");
            }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

            log.debug("Logout. Persisting current session changes.");
            this.session.save();
            this.session.logout();
            log.debug("Session closed");
        } catch (NoSuchNodeTypeException nsnte) {
            throw new JcrMappingException("Cannot persist current session changes. An unknown node type was used.", nsnte);
        } catch (javax.jcr.version.VersionException ve) {
            throw new VersionException("Cannot persist current session changes. Attempt to overwrite checked-in node", ve);
        } catch (LockException le) {
            throw new ObjectContentManagerException("Cannot persist current session changes. Violation of a lock detected", le);
        } catch (javax.jcr.RepositoryException e) {
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

    public void save() {
        try {
            this.session.save();
        } catch (NoSuchNodeTypeException nsnte) {
            throw new JcrMappingException("Cannot persist current session changes. An unknown node type was used.", nsnte);
        } catch (javax.jcr.version.VersionException ve) {
            throw new VersionException("Cannot persist current session changes. Attempt to overwrite checked-in node", ve);
        } catch (LockException le) {
            throw new ObjectContentManagerException("Cannot persist current session changes. Violation of a lock detected", le);
        } catch (RepositoryException e) {
View Full Code Here

Examples of org.apache.jackrabbit.ocm.exception.JcrMappingException

    {
        String parentPath = "";

        if (!isValidPath(path))
        {
            throw new JcrMappingException("Invalid path : " + path);
        }

        String[] pathElements = path.split(PATH_SEPARATOR);

        // Firts path element should be = empty string because a uri always start with '/'
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.