Examples of MetaDataException


Examples of com.drew.metadata.MetadataException

    }

    private static Wpt wptFromGpsTag(Directory gps) throws MetadataException{
        Wpt result = null;
        if(!gps.containsTag(GpsDirectory.TAG_GPS_LATITUDE)){
           throw new MetadataException("GPS latitude missing.");
        }
        if(!gps.containsTag(GpsDirectory.TAG_GPS_LATITUDE_REF)){
           throw new MetadataException("GPS latitude reference missing.");
        }
        if(!gps.containsTag(GpsDirectory.TAG_GPS_LONGITUDE)){
           throw new MetadataException("GPS longitude missing.");
        }
        if(!gps.containsTag(GpsDirectory.TAG_GPS_LONGITUDE_REF)){
           throw new MetadataException("GPS longitude reference missing.");
        }
        result = new Wpt();
        result.setLat(
                    asBigDecimal(
                    gps.getRationalArray(GpsDirectory.TAG_GPS_LATITUDE),
View Full Code Here

Examples of nexj.core.meta.MetadataException

      EndpointPart part = (m_destinationList.isEmpty()) ? m_rootPart :
         (EndpointPart)m_destinationList.get(m_destinationList.size() - 1);
     
      if (part.isPrimitive())
      {
         throw new MetadataException("err.meta.transformation.primitiveParent", new Object[]{part.getName()});
      }

      addDestination(part.getChild(sName), bFixed);
   }
View Full Code Here

Examples of org.apache.lenya.cms.metadata.MetaDataException

           
            MetaDataRegistry registry = null;
            try {
                registry = (MetaDataRegistry) this.manager.lookup(MetaDataRegistry.ROLE);
                if (!registry.isRegistered(namespaceUri)) {
                    throw new MetaDataException("The namespace [" + namespaceUri
                            + "] is not registered!");
                }
            } catch (ServiceException e) {
                throw new MetaDataException(e);
            } finally {
                if (registry != null) {
                    this.manager.release(registry);
                }
            }
View Full Code Here

Examples of org.apache.ojb.broker.metadata.MetadataException

        {
            ord = cld.getCollectionDescriptorByName(reference);
        }
        if(ord == null)
        {
            throw new MetadataException("Reference with name '" + reference + "' does not exist in " + clazz.getName());
        }
        ord.setCascadeRetrieve(autoretrieve);
        ord.setCascadingStore(autoupdate);
        ord.setCascadingDelete(autodelete);
        ord.setLazy(useProxy);
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

                    _repos.getConfiguration(), props.toString());
                seq.setType(_type);
            } else if (_factory != null)
                seq = _factory.toSequence(cls, props.toString());
            else
                throw new MetaDataException(_loc.get("not-seq-cls", _name,
                    cls));
            return seq;
        } catch (OpenJPAException ke) {
            throw ke;
        } catch (Exception e) {
            if (e instanceof PrivilegedActionException)
                e = ((PrivilegedActionException) e).getException();
            throw new MetaDataException(_loc.get("cant-init-seq", _name)).
                setCause(e);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

            // try against this value type's package too
            pkg = Strings.getPackageName(vmd.getDeclaredType());
            cls = CFMetaDataParser.classForName(name, pkg, runtime, loader);
        }
        if (cls == null)
            throw new MetaDataException(_loc.get("bad-class", name,
                (vmd == null) ? (Object) meta : (Object) vmd));
        return cls;
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

     */
    private void parseFetchGroups(ClassMetaData meta, FetchGroup... groups) {
        org.apache.openjpa.meta.FetchGroup fg;
        for (FetchGroup group : groups) {
            if (StringUtils.isEmpty(group.name()))
                throw new MetaDataException(_loc.get("unnamed-fg", meta));

            fg = meta.addDeclaredFetchGroup(group.name());
            if (group.postLoad())
                fg.setPostLoad(true);
            for (String s : group.fetchGroups())
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

    private void parseFetchAttribute(ClassMetaData meta,
        org.apache.openjpa.meta.FetchGroup fg, FetchAttribute attr) {
        FieldMetaData field = meta.getDeclaredField(attr.name());
        if (field == null
            || field.getManagement() != FieldMetaData.MANAGE_PERSISTENT)
            throw new MetaDataException(_loc.get("bad-fg-field", fg.getName(),
                meta, attr.name()));

        field.setInFetchGroup(fg.getName(), true);
        if (attr.recursionDepth() != Integer.MIN_VALUE)
            fg.setRecursionDepth(field, attr.recursionDepth());
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

        if (Generator.UUID_HEX.equals(generator))
            return ValueStrategies.UUID_HEX;
        if (Generator.UUID_STRING.equals(generator))
            return ValueStrategies.UUID_STRING;
        throw new MetaDataException(_loc.get("generator-bad-strategy",
            context, generator));
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

                case JavaTypes.PC:
                case JavaTypes.PC_UNTYPED:
                    if (Serializable.class.isAssignableFrom(type))
                        fmd.setSerialized(true);
                    else
                        throw new MetaDataException(_loc.get("bad-meta-anno",
                            fmd, "Basic"));
                    break;
                case JavaTypes.ARRAY:
                    if (type == char[].class || type == Character[].class
                        || type == byte[].class || type == Byte[].class)
                        break;
                    if (Serializable.class.isAssignableFrom
                        (type.getComponentType()))
                        fmd.setSerialized(true);
                    else
                        throw new MetaDataException(_loc.get("bad-meta-anno",
                            fmd, "Basic"));
                    break;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.