FileDocCategorySizeDatePackage
PersistenceUnitLoadingException.javaAPI DocGlassfish v2 API10228Tue May 22 16:54:18 BST 2007oracle.toplink.essentials.exceptions

PersistenceUnitLoadingException

public class PersistenceUnitLoadingException extends TopLinkException

Fields Summary
private String
resourceName
public static final int
EXCEPTION_LOADING_FROM_DIRECTORY
public static final int
EXCEPTION_LOADING_FROM_JAR
public static final int
EXCEPTION_PROCESSING_PERSISTENCE_UNIT
public static final int
EXCEPTION_PROCESSING_PERSISTENCE_XML
public static final int
EXCEPTION_SEARCHING_FOR_PERSISTENCE_RESOURCES
public static final int
EXCEPTION_SEARCHING_FOR_ENTITIES
public static final int
EXCEPTION_LOADING_CLASS
public static final int
FILE_PATH_MISSING_EXCEPTION
public static final int
EXCEPTION_LOADING_FROM_URL
public static final int
EXCEPTION_OPENING_ORM_XML
public static final int
COULD_NOT_GET_CLASS_NAMES_FROM_URL
public static final int
COULD_NOT_GET_PERSISTENCE_UNIT_INFO_FROM_URL
Constructors Summary
public PersistenceUnitLoadingException()
INTERNAL: TopLink exceptions should only be thrown by TopLink.


                  
      
        super();
    
protected PersistenceUnitLoadingException(String message)
INTERNAL: TopLink exceptions should only be thrown by TopLink.

        super(message);
    
protected PersistenceUnitLoadingException(String message, Throwable internalException)
INTERNAL: TopLink exceptions should only be thrown by TopLink.

        super(message);
        setInternalException(internalException);
    
Methods Summary
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptioncouldNotGetClassNamesFromUrl(java.net.URL url)

        Object[] args = { url };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, COULD_NOT_GET_CLASS_NAMES_FROM_URL, args));
        loadingException.setResourceName(url.toString());
        loadingException.setErrorCode(COULD_NOT_GET_CLASS_NAMES_FROM_URL);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptioncouldNotGetUnitInfoFromUrl(java.net.URL url)

        Object[] args = { url };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, COULD_NOT_GET_PERSISTENCE_UNIT_INFO_FROM_URL, args));
        loadingException.setResourceName(url.toString());
        loadingException.setErrorCode(COULD_NOT_GET_PERSISTENCE_UNIT_INFO_FROM_URL);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionLoadingClassWhileLookingForAnnotations(java.lang.String className, java.lang.Exception cause)

        Object[] args = { className };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_CLASS, args), cause);
        loadingException.setErrorCode(EXCEPTION_LOADING_CLASS);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionLoadingFromDirectory(java.io.File directory, java.lang.Exception cause)

        Object[] args = { directory };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_DIRECTORY, args), cause);
        loadingException.setResourceName(directory.toString());
        loadingException.setErrorCode(EXCEPTION_LOADING_FROM_DIRECTORY);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionLoadingFromJar(java.net.URL jarFile, java.lang.Exception cause)

        Object[] args = { jarFile };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_JAR, args), cause);
        loadingException.setResourceName(jarFile.toString());
        loadingException.setErrorCode(EXCEPTION_LOADING_FROM_JAR);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionLoadingFromUrl(java.lang.String url, java.lang.Exception cause)

        Object[] args = { url };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_URL, args), cause);
        loadingException.setResourceName(url);
        loadingException.setErrorCode(EXCEPTION_LOADING_FROM_URL);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionLoadingORMXML(java.lang.String fileName, java.lang.Exception cause)

        Object[] args = { fileName };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_OPENING_ORM_XML, args), cause);
        loadingException.setResourceName(fileName);
        loadingException.setErrorCode(EXCEPTION_OPENING_ORM_XML);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionProcessingPersistenceUnit(java.net.URL url, java.lang.Exception cause)

        Object[] args = { url };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_PROCESSING_PERSISTENCE_UNIT, args), cause);
        loadingException.setResourceName(url.toString());
        loadingException.setErrorCode(EXCEPTION_PROCESSING_PERSISTENCE_UNIT);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionProcessingPersistenceXML(java.net.URL url, java.lang.Exception cause)

        Object[] args = { url };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_PROCESSING_PERSISTENCE_XML, args), cause);
        loadingException.setResourceName(url.toString());
        loadingException.setErrorCode(EXCEPTION_PROCESSING_PERSISTENCE_XML);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionSearchingForEntities(java.net.URL url, java.lang.Exception cause)

        Object[] args = { url };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_SEARCHING_FOR_ENTITIES, args), cause);
        loadingException.setResourceName(url.toString());
        loadingException.setErrorCode(EXCEPTION_SEARCHING_FOR_ENTITIES);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionexceptionSearchingForPersistenceResources(java.lang.ClassLoader loader, java.lang.Exception cause)

        Object[] args = { loader };

        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_SEARCHING_FOR_PERSISTENCE_RESOURCES, args), cause);
        loadingException.setErrorCode(EXCEPTION_SEARCHING_FOR_PERSISTENCE_RESOURCES);
        return loadingException;
    
public static oracle.toplink.essentials.exceptions.PersistenceUnitLoadingExceptionfilePathMissingException(java.lang.String filePath)

        Object[] args = { filePath };
        
        PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, FILE_PATH_MISSING_EXCEPTION, args));
        loadingException.setResourceName(filePath);
        loadingException.setErrorCode(FILE_PATH_MISSING_EXCEPTION);
        return loadingException;
    
public java.lang.StringgetResourceName()

        return resourceName;
    
public voidsetResourceName(java.lang.String resourceName)

        this.resourceName = resourceName;