Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PersistenceBrokerException


                {
                    initializationMethod.invoke(result, NO_ARGS);
                }
                catch (Exception ex)
                {
                    throw new PersistenceBrokerException("Unable to invoke initialization method:" + initializationMethod.getName() + " for class:" + m_cld.getClassOfObject(), ex);
                }
            }
        }
        return result;
    }
View Full Code Here


                }
            }
        }
        catch (SQLException t)
        {
            throw new PersistenceBrokerException("Error reading class '"
                    + (fld != null ? fld.getClassDescriptor().getClassNameOfObject() : m_cld.getClassNameOfObject())
                    + "' from result set, current read field was '"
                    + (fld != null ? fld.getPersistentField().getName() + "'" : null), t);
        }
    }
View Full Code Here

            // allow field-conversion for discriminator column too
            String result = (String) fld.getFieldConversion().sqlToJava(tmp);
            result = result != null ? result.trim() : null;
            if (result == null || result.length() == 0)
            {
                throw new PersistenceBrokerException(
                        "ojbConcreteClass field for class " + cld.getClassNameOfObject()
                        + " returned null or 0-length string");
            }
            else
            {
                /*
                arminw: Make sure that we don't read discriminator field twice from the ResultSet.
                */
                row.put(fld.getColumnName(), result);
                return result;
            }
        }
        catch(SQLException e)
        {
            throw new PersistenceBrokerException("Unexpected error while try to read 'ojbConcretClass'" +
                    " field from result set using column name " + fld.getColumnName() + " main class" +
                    " was " + m_cld.getClassNameOfObject(), e);
        }
    }
View Full Code Here

        {
            result = m_cld.getRepository().getDescriptorFor(ojbConcreteClass);
            // if we can't find class-descriptor for concrete class, something wrong with mapping
            if (result == null)
            {
                throw new PersistenceBrokerException("Can't find class-descriptor for ojbConcreteClass '"
                        + ojbConcreteClass + "', the main class was " + m_cld.getClassNameOfObject());
            }
        }
        return result;
    }
View Full Code Here

        catch (Exception ex)
        {
            // ==> clear materialization cache
            pb.getInternalCache().doLocalClear();
            log.error(ex);
            throw new PersistenceBrokerException(ex);
        }
        finally
        {
            if (iter != null)
            {
View Full Code Here

            {
                throw (PersistenceBrokerException) e;
            }
            else
            {
                throw new PersistenceBrokerException(e);
            }
        }
    }
View Full Code Here

                {
                    throw (PersistenceBrokerException) e;
                }
                else
                {
                    throw new PersistenceBrokerException(e);
                }
            }
        }
        else
        {
View Full Code Here

        }
        catch (NoSuchMethodException e)
        {
            LoggerFactory.getDefaultLogger().error(primaryKeyClass.getName()
                    + " must implement a Constructor with one argument of type org.apache.ojb.broker.Identity");
            throw new PersistenceBrokerException(e);
        }
        catch (SecurityException e)
        {
            LoggerFactory.getDefaultLogger().error(e);
            throw new PersistenceBrokerException(e);
        }
    }
View Full Code Here

        {
            throw new PersistenceBrokerSQLException("Error reading object from column", e);
        }
        catch (Exception e)
        {
            throw new PersistenceBrokerException("Error reading Identity from result set", e);
        }
    }
View Full Code Here

            if(searchName.equals(fieldNames[i]))
            {
                return i;
            }
        }
        throw new PersistenceBrokerException("Can't find field name '" + searchName +
                "' in given array of field names");
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.PersistenceBrokerException

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.