Examples of ClassNotPersistenceCapableException


Examples of org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException

            checkForPrimaryKeys();
        }
        catch (Exception e)
        {
            throw new ClassNotPersistenceCapableException("Can not init Identity for given object " +
                    objectToIdentify, e);
        }
    }
View Full Code Here

Examples of org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException

    protected void checkForPrimaryKeys() throws ClassNotPersistenceCapableException
    {
        // if no PKs are specified OJB can't handle this class !
        if (m_pkValues.length == 0)
        {
            throw new ClassNotPersistenceCapableException(
                    "OJB needs at least one primary key attribute for class "
                    + " objectsRealClass=" + m_objectsRealClass
                    + ", objectTopLevelClass=" + m_objectsTopLevelClass);

        }
View Full Code Here

Examples of org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException

                result = ConstructorHelper.instantiate(con);
            }
            catch (InstantiationException e)
            {
                throw new ClassNotPersistenceCapableException(
                        "Can't instantiate class '" + cld.getClassNameOfObject()+"'");
            }
        }
        else
        {
View Full Code Here

Examples of org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException

        {
            msg = "Unexpected error:";
        }
        if(e != null)
        {
            return new ClassNotPersistenceCapableException(msg + eol +
                        "objectTopLevelClass=" + (m_objectsTopLevelClass != null ? m_objectsTopLevelClass.getName() : null) + eol +
                        "objectRealClass=" + (m_objectsRealClass != null ? m_objectsRealClass.getName() : null) + eol +
                        "pkValues=" + (m_pkValues != null ? ArrayUtils.toString(m_pkValues) : null) +
                        (objectToIdentify != null ? (eol + "object to identify: " + objectToIdentify) : ""), e);
        }
        else
        {
            return new ClassNotPersistenceCapableException(msg + eol +
                        "objectTopLevelClass=" + (m_objectsTopLevelClass != null ? m_objectsTopLevelClass.getName() : null) + eol +
                        "objectRealClass=" + (m_objectsRealClass != null ? m_objectsRealClass.getName() : null) + eol +
                        "pkValues=" + (m_pkValues != null ? ArrayUtils.toString(m_pkValues) : null) +
                        eol + "object to identify: " + objectToIdentify);
        }
View Full Code Here

Examples of org.datanucleus.api.jdo.exceptions.ClassNotPersistenceCapableException

    public static JDOException getJDOExceptionForNucleusException(NucleusException ne)
    {
        // Specific exceptions first
        if (ne instanceof ClassNotPersistableException)
        {
            return new ClassNotPersistenceCapableException(ne.getMessage(), ne);
        }
        else if (ne instanceof NoPersistenceInformationException)
        {
            return new org.datanucleus.api.jdo.exceptions.NoPersistenceInformationException(ne.getMessage(), ne);
        }
View Full Code Here

Examples of org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException

    public static JDOException getJDOExceptionForNucleusException(NucleusException jpe)
    {
        // Specific exceptions first
        if (jpe instanceof ClassNotPersistableException)
        {
            return new ClassNotPersistenceCapableException(jpe.getMessage(), jpe);
        }
        else if (jpe instanceof NoPersistenceInformationException)
        {
            return new org.datanucleus.jdo.exceptions.NoPersistenceInformationException(jpe.getMessage(), jpe);
        }
View Full Code Here

Examples of org.exolab.castor.jdo.ClassNotPersistenceCapableException

        while ((i < _engines.length) && (molder == null)) {
            molder = _engines[i++].getClassMolderWithDependent(type);
        }
       
        if (molder == null) {
            throw new ClassNotPersistenceCapableException(Messages.format(
                    "persist.classNotPersistenceCapable", type.getName()));
        } else if (molder.isDependent()) {
            throw new ClassNotPersistenceCapableException(Messages.format(
                    "persist.classIsDependent", type.getName(), molder.getDepends().getName()));
        }
       
        return molder;
    }
View Full Code Here

Examples of org.exolab.castor.jdo.ClassNotPersistenceCapableException

    public OID load(final TransactionContext tx, final OID oid, final ProposedEntity proposedObject,
            final AccessMode suggestedAccessMode, final int timeout, final QueryResults results)
    throws PersistenceException {
        TypeInfo typeInfo = (TypeInfo) _typeInfo.get(oid.getName());
        if (typeInfo == null) {
            throw new ClassNotPersistenceCapableException(Messages.format(
                    "persist.classNotPersistenceCapable", oid.getName()));
        }

        ClassMolder molder = oid.getMolder();
        AccessMode accessMode = molder.getAccessMode(suggestedAccessMode);
View Full Code Here

Examples of org.exolab.castor.jdo.ClassNotPersistenceCapableException

        TypeInfo   typeInfo;
        typeInfo = (TypeInfo) _typeInfo.get(oid.getName());

        if (typeInfo == null) {
            throw new ClassNotPersistenceCapableException(Messages.format(
                    "persist.classNotPersistenceCapable", oid.getName()));
        }
        typeInfo._molder.markCreate(tx, oid, null, object);
    }
View Full Code Here

Examples of org.exolab.castor.jdo.ClassNotPersistenceCapableException

        OID newoid;
        boolean succeed;

        typeInfo = (TypeInfo) _typeInfo.get(object.getClass().getName());
        if (typeInfo == null) {
            throw new ClassNotPersistenceCapableException(Messages.format(
                    "persist.classNotPersistenceCapable", object.getClass().getName()));
        }
           
        lock = null;
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.