Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.OJBRuntimeException


                setContext(null);
            }
            catch (Exception e)
            {
                log.error("Cannot instantiate the InitialContext", e);
                throw new OJBRuntimeException(e);
            }
        }
        return ctx;
    }
View Full Code Here


        {
            return getContext().lookup(jndiName);
        }
        catch (NamingException e)
        {
            throw new OJBRuntimeException("Lookup failed for: " + jndiName, e);
        }
        catch(OJBRuntimeException e)
        {
            throw e;
        }
View Full Code Here

            setContext(prop);
        }
        catch (NamingException e)
        {
            log.error("Unable to refresh the naming context");
            throw new OJBRuntimeException("Refresh of context failed, used properties: "
                    + (prop != null ? prop.toString() : "none"), e);
        }
    }
View Full Code Here

            /*
            arminw:
            if no PBKey is set we throw an exception, because we don't
            know which PB (connection) should be used.
            */
            throw new OJBRuntimeException("Can't find associated PBKey. Need PBKey to obtain a valid" +
                                          "PersistenceBroker instance from intern resources.");
        }
        // first try to use the current threaded broker to avoid blocking
        broker = PersistenceBrokerThreadMapping.currentPersistenceBroker(getBrokerKey());
        // current broker not found, create a intern new one
View Full Code Here

    protected ClassDescriptor getClassDescriptor()
    {
        ClassDescriptor cld = (ClassDescriptor) m_classDescriptor.get();
        if(cld == null)
        {
            throw new OJBRuntimeException("Requested ClassDescriptor instance was already GC by JVM");
        }
        return cld;
    }
View Full Code Here

            ClassDescriptor cld = getClassDescriptor();

            FieldDescriptor[] fieldDescriptors = cld.getPkFields();
            if(fieldDescriptors == null || fieldDescriptors.length == 0)
            {
                throw new OJBRuntimeException("No PK fields defined in metadata for " + cld.getClassNameOfObject());
            }
            FieldDescriptor field = fieldDescriptors[0];

            stmt.append(SELECT);
            stmt.append(field.getColumnName());
View Full Code Here

            if(actors == null)
            {
                actors = new ArrayList();
            }
            if(!actors.contains(actor)) actors.add(actor);
            else throw new OJBRuntimeException("Can't add same object twice");
        }
View Full Code Here

            if(actors2 == null)
            {
                actors2 = new ArrayList();
            }
            if(!actors2.contains(actor)) actors2.add(actor);
            else throw new OJBRuntimeException("Can't add same object twice");
        }
View Full Code Here

            {
                clazz = ClassHelper.getClass(className, true);
            }
            catch (ClassNotFoundException e)
            {
                throw new OJBRuntimeException("Class, " + className + ", could not be found.", e);
            }
            result = discoverDescriptor(clazz);
         }
        return result;
    }
View Full Code Here

            case Types.DATALINK:
                result = new URLFieldType();
                break;
//#endif
            default:
                throw new OJBRuntimeException("Unkown or not supported field type specified, specified jdbc type was '"
                        + jdbcType + "', as string: " + JdbcTypesHelper.getSqlTypeAsString(jdbcType.getType()));
        }
        // make sure that the sql type was set
        result.setSqlType(jdbcType);
        return result;
View Full Code Here

TOP

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

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.