Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusException


                NucleusLogger.DATASTORE_SCHEMA.error(errorMsg);
                throw new NucleusUserException(errorMsg, e);
            }
            if (!success)
            {
                throw new NucleusException("DeleteTables operation failed");
            }
        }
    }
View Full Code Here


        {
            if (sm.getClassMetaData().getInheritanceMetaData().getStrategy() == InheritanceStrategy.SUBCLASS_TABLE)
            {
                throw new NucleusUserException(LOCALISER.msg("032013", className));
            }
            throw new NucleusException(LOCALISER.msg("032014", className,
                sm.getClassMetaData().getInheritanceMetaData().getStrategy())).setFatal();
        }

        if (storeMgr.getRuntimeManager() != null)
        {
View Full Code Here

                {
                    ((PreparedStatement) ps).setShort(param, ((Long)value).shortValue());
                }
                else
                {
                    throw new NucleusException("SmallIntRDBMSMapping.setObject called for " +
                        StringUtils.toJVMIDString(value) + " but not supported");
                }
            }
        }
        catch (SQLException e)
View Full Code Here

                }
                else
                {
                    NucleusLogger.DATASTORE_SCHEMA.error(LOCALISER_RDBMS.msg("050044", e));
                }
                throw new NucleusException(e.toString(), e).setFatal();
            }
            finally
            {
                // If something went wrong, roll things back to the way they were before we started.
                // This may not restore the database 100% of the time (if DDL statements are not transactional)
View Full Code Here

                {
                    ((PreparedStatement) ps).setInt(param, ((Boolean)value) ? 1 : 0);
                }
                else
                {
                    throw new NucleusException("TinyIntRDBMSMapping.setObject called for " +
                        StringUtils.toJVMIDString(value) + " but not supported");
                }
                //TODO bug with SQL SERVER DRIVER. It doesn't accept Byte -128
                //ps.setByte(param, ((Byte)value).byteValue());
            }
View Full Code Here

            }
            catch (Exception e)
            {
                NucleusLogger.DATASTORE_SCHEMA.error(
                    "Exception thrown during update of schema for table " + table, e);
                throw new NucleusException(
                    "Exception thrown during update of schema for table " + table, e);
            }
        }
    }
View Full Code Here

            {
                fieldMappings[fieldNumber] = storeMgr.getMappingManager().getMapping(this, fmd, clr, FieldRole.ROLE_FIELD);
            }
            else if (fmd.getPersistenceModifier() != FieldPersistenceModifier.TRANSACTIONAL)
            {
                throw new NucleusException(LOCALISER.msg("031006",
                    cmd.getFullClassName(), fmd.getName(), fmd.getPersistenceModifier())).setFatal();
            }
        }

        state = TABLE_STATE_INITIALIZED;
View Full Code Here

        return null; // No versions for Views
    }

    public JavaTypeMapping getExternalMapping(AbstractMemberMetaData fmd, int mappingType)
    {
        throw new NucleusException("N/A").setFatal();
    }
View Full Code Here

        throw new NucleusException("N/A").setFatal();
    }

    public AbstractMemberMetaData getMetaDataForExternalMapping(JavaTypeMapping mapping, int mappingType)
    {
        throw new NucleusException("N/A").setFatal();
    }
View Full Code Here

     * Accessor for a mapping for the ID (PersistenceCapable) for this table.
     * @return The (PersistenceCapable) ID mapping.
     **/
    public JavaTypeMapping getIdMapping()
    {
        throw new NucleusException("Attempt to get ID mapping of SchemaTable!").setFatal();
    }
View Full Code Here

TOP

Related Classes of org.datanucleus.exceptions.NucleusException

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.