Package org.apache.ojb.broker.metadata

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


    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

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

        {
            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

TOP

Related Classes of org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException

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.