Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusException


            stack.push(subquerySqlExpr);
            return subquerySqlExpr;
        }
        else
        {
            throw new NucleusException("Dont currently support SubqueryExpression " + keyword +
                " for type " + subqueryExpr);
        }
    }
View Full Code Here


    public void bindVariable(String varName, AbstractClassMetaData cmd, SQLTable sqlTbl, JavaTypeMapping mapping)
    {
        SQLTableMapping m = getSQLTableMappingForAlias(varName);
        if (m != null)
        {
            throw new NucleusException("Variable " + varName + " is already bound to " + m.table +
                " yet attempting to bind to " + sqlTbl);
        }
        else
        {
            NucleusLogger.QUERY.debug(">> QueryToSQL.bindVariable variable " + varName +
View Full Code Here

                    try
                    {
                        ResultObjectFactory rof = null;
                        if (elementsAreEmbedded || elementsAreSerialised)
                        {
                            throw new NucleusException("Cannot have FK set with non-persistent objects");
                        }
                        else
                        {
                            rof = storeMgr.newResultObjectFactory(emd, resultDefinition, false, null,
                                clr.classForName(elementType));
View Full Code Here

            catch (Exception e)
            {
                if (e instanceof InvocationTargetException)
                {
                    InvocationTargetException ite = (InvocationTargetException)e;
                    throw new NucleusException(LOCALISER_RDBMS.msg("047004", poolingType,
                        ite.getTargetException().getMessage()), ite.getTargetException()).setFatal();
                }
                else
                {
                    throw new NucleusException(LOCALISER_RDBMS.msg("047004", poolingType,
                        e.getMessage()),e).setFatal();
                }
            }
        }
    }
View Full Code Here

        }
        else if (datastoreMajorVersion < 9 && sqlExpr instanceof BooleanExpression &&
            !sqlExpr.getJavaTypeMapping().getDatastoreMapping(0).isStringBased())
        {
            // Oracle 8 or earlier don't support ORDER BY on non-String based booleans ? (came from TJDO)
            throw new NucleusException(LOCALISER.msg("052505")).setFatal();
        }
        else
        {
            return orderString;
        }
View Full Code Here

        }

        // Check if auto-increment and that it is supported by this RDBMS
        if (idColumn.isIdentity() && !dba.supportsOption(DatastoreAdapter.IDENTITY_COLUMNS))
        {
            throw new NucleusException(LOCALISER.msg("057020",
                cmd.getFullClassName(), "datastore-identity")).setFatal();
        }
    }
View Full Code Here

                        storeMgr.getStringProperty("datanucleus.rdbms.connectionProviderName"),
                        "class-name", null, null);
                if (connProvider == null)
                {
                    // No provider with this name (missing plugin ?)
                    throw new NucleusException(LOCALISER_RDBMS.msg("050000",
                        storeMgr.getStringProperty("datanucleus.rdbms.connectionProviderName"))).setFatal();
                }
                connProvider.setFailOnError(storeMgr.getBooleanProperty("datanucleus.rdbms.connectionProviderFailOnError"));
            }
            catch (Exception e)
            {
                // Error creating provider
                throw new NucleusException(LOCALISER_RDBMS.msg("050001",
                    storeMgr.getStringProperty("datanucleus.rdbms.connectionProviderName"), e.getMessage()), e).setFatal();
            }
        }
View Full Code Here

        this.mmd = mmd;
        this.ownerType = mmd.getClassName(true);

        if (mmd.getPersistenceModifier() == FieldPersistenceModifier.NONE)
        {
            throw new NucleusException(LOCALISER.msg("057006", mmd.getName())).setFatal();
        }
    }
View Full Code Here

     * This is not supported by join tables since they don't represent FCOs.
     * @return The (PersistenceCapable) ID mapping.
     */
    public JavaTypeMapping getIdMapping()
    {
        throw new NucleusException("Unsupported ID mapping in join table").setFatal();
    }
View Full Code Here

            cls = ec.getNucleusContext().getPluginManager().loadClass(
                elem.getExtension().getPlugin().getSymbolicName(), elem.getAttribute("class-name"));
        }
        if (cls == null)
        {
            throw new NucleusException("Cannot create ValueGenerator for strategy "+valueGeneratorName);
        }
        generator = mgr.createValueGenerator(seqMetaData.getName(), cls, props, storeManager, connProvider);

        if (NucleusLogger.PERSISTENCE.isDebugEnabled())
        {
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.