Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.ObjectNotFoundException


            }

            // execute the SQL query
            rs = stmt.executeQuery();
            if (!rs.next()) {
                throw new ObjectNotFoundException(Messages.format(
                        "persist.objectNotFound", _type, identity));
            }

            // if this class is part of an extend relation (hierarchy), let's investigate
            // what the real class type is vs. the specified one as part of the load statement;
View Full Code Here


            // Objects marked deleted in the transaction therefore we
            // throw a ObjectNotFoundException to signal that object isn't
            // available any more.
            if (_tracker.isDeleted(objectInTx)) {
                throw new ObjectNotFoundException(Messages.format(
                        "persist.objectNotFound", molder.getName(), identity));
            }

            // ssa, multi classloader feature (note - this code appears to be
            // duplicated, yet different, in both cases. Why?)
View Full Code Here

                if (classMolder != null) {
                    msg += " " + classMolder.getName();
                }
                LOG.error(msg, ex);
            }
            throw new ObjectNotFoundException("lazy loading error - "
                    + ex.getMessage(), ex);
        }
    }
View Full Code Here

            }
           
            return lock.getOID();
        } catch (ObjectDeletedWaitingForLockException except) {
            // This is equivalent to object does not exist
            throw new ObjectNotFoundException(Messages.format(
                    "persist.objectNotFound", oid.getName(), oid.getIdentity()), except);
        } catch (LockNotGrantedException e) {
            if (lock != null) { lock.release(tx); }
            throw e;
        } finally {
View Full Code Here

            return !succeed;
        } catch (ObjectModifiedException e) {
            throw e;
        } catch (ObjectDeletedWaitingForLockException except) {
            // This is equivalent to object not existing
            throw new ObjectNotFoundException(Messages.format(
                    "persist.objectNotFound", internaloid.getName(),
                    internaloid.getIdentity()), except);
        } finally {
            if (lock != null) {
                lock.confirm(tx, succeed);
View Full Code Here

            // object has been created in this transaction, it cannot be
            // re-loaded but no error is reported.
            if ( entry.engine != engine )
                throw new PersistenceException( Messages.format("persist.multipleLoad", molder.getName(), identity ) );
            if ( entry.deleted )
                throw new ObjectNotFoundException( "Object is deleted" + molder.getName() + identity );
            // ssa, multi classloader feature
            // ssa, FIXME : Are the two following statements equivalent ?
            // if ( ! molder.getJavaClass().isAssignableFrom( entry.object.getClass() ) )
            if ( ! molder.getJavaClass( _db.getClassLoader() ).isAssignableFrom( entry.object.getClass() ) )
                throw new PersistenceException( Messages.format("persist.typeMismatch", molder.getName(), entry.object.getClass() ) );
View Full Code Here

            if (_log.isDebugEnabled()) {
              _log.debug( Messages.format( "jdo.loading.with.id", typeInfo.molder.getName(), oid.getIdentity() ) );
            }
        } catch ( ObjectDeletedWaitingForLockException except ) {
            // This is equivalent to object does not exist
            throw new ObjectNotFoundException( Messages.format("persist.objectNotFound", oid.getName(), oid.getIdentity()));
        } finally {
            if ( lock != null ) lock.confirm( tx, succeed );
        }
        return oid;
    }
View Full Code Here

            */
        } catch ( ObjectModifiedException e ) {
            throw e;
        } catch ( ObjectDeletedWaitingForLockException except ) {
            // This is equivalent to object not existing
            throw new ObjectNotFoundException( Messages.format("persist.objectNotFound", oid.getName(), oid.getIdentity()) );
        } finally {
            if ( lock != null )
                lock.confirm( tx, succeed );
        }
    }
View Full Code Here

        if ( classMolder != null ) {
          msg += " " + classMolder.getName();
        }
        _log.error(msg, ex);
      }
      throw new ObjectNotFoundException("lazy loading error - " + ex.getMessage());
    }
  }
View Full Code Here

            }

            // query the object
            rs = stmt.executeQuery();
            if ( ! rs.next() )
                throw new ObjectNotFoundException( Messages.format("persist.objectNotFound", _clsDesc.getJavaClass().getName(), identity) );

            // Load all the fields of the object including one-one relations
            count = 1;
            Object[] temp = new Object[10]; // assume complex field max at 10
            for ( int i = 0 ; i < _fields.length ; ++i  ) {
View Full Code Here

TOP

Related Classes of org.exolab.castor.jdo.ObjectNotFoundException

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.