Class DeploymentException
- All Implemented Interfaces:
Serializable
DeploymentException
always contains an error code (one
of the constants specified in this class), and may optionally contain the
textual description of the error condition and a nested cause exception.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Syntax error in any manifest header.static final int
Bundle symbolic name is not the same as defined by the deployment package manifest.static final int
Bundle with the same symbolic name already exists.static final int
DeploymentAdmin.installDeploymentPackage(InputStream)
,DeploymentPackage.uninstall()
andDeploymentPackage.uninstallForced()
methods can throwDeploymentException
with this error code if theDeploymentAdmin.cancel()
method is called from another thread.static final int
Exception with this error code is thrown when one of the Resource Processors involved in the deployment session threw aResourceProcessorException
with theCODE_PREPARE
error code.static final int
Matched resource processor service is a customizer from another deployment package.static final int
A bundle in the deployment package is marked as DeploymentPackage-Missing but there is no such bundle in the target deployment package.static final int
Fix pack version range doesn't fit to the version of the target deployment package or the target deployment package of the fix pack doesn't exist.static final int
Missing mandatory manifest header.static final int
A resource in the source deployment package is marked as DeploymentPackage-Missing but there is no such resource in the target deployment package.static final int
DeploymentAdmin.installDeploymentPackage(InputStream)
methods can throwDeploymentException
with this error code if the got InputStream is not a jar.static final int
Order of files in the deployment package is bad.static final int
Other error condition.static final int
The Resource Processor service with the given PID (seeResource-Processor
manifest header) is not found.static final int
An artifact of any resource already exists.static final int
Bad deployment package signing.static final int
When a client requests a new session with an install or uninstall operation, it must block that call until the earlier session is completed. -
Constructor Summary
ConstructorsConstructorDescriptionDeploymentException
(int code) Create an instance of the exception.DeploymentException
(int code, String message) Create an instance of the exception.DeploymentException
(int code, String message, Throwable cause) Create an instance of the exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
CODE_CANCELLED
public static final int CODE_CANCELLEDDeploymentAdmin.installDeploymentPackage(InputStream)
,DeploymentPackage.uninstall()
andDeploymentPackage.uninstallForced()
methods can throwDeploymentException
with this error code if theDeploymentAdmin.cancel()
method is called from another thread.- See Also:
-
CODE_NOT_A_JAR
public static final int CODE_NOT_A_JARDeploymentAdmin.installDeploymentPackage(InputStream)
methods can throwDeploymentException
with this error code if the got InputStream is not a jar.- See Also:
-
CODE_ORDER_ERROR
public static final int CODE_ORDER_ERROROrder of files in the deployment package is bad. The right order is the following:- META-INF/MANIFEST.MF
- META-INF/*.SF, META-INF/*.DSA, META-INF/*.RS
- Localization files
- Bundles
- Resources
DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_MISSING_HEADER
public static final int CODE_MISSING_HEADERMissing mandatory manifest header.DeploymentAdmin.installDeploymentPackage(InputStream)
can throw exception with this error code.- See Also:
-
CODE_BAD_HEADER
public static final int CODE_BAD_HEADERSyntax error in any manifest header.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_MISSING_FIXPACK_TARGET
public static final int CODE_MISSING_FIXPACK_TARGETFix pack version range doesn't fit to the version of the target deployment package or the target deployment package of the fix pack doesn't exist.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_MISSING_BUNDLE
public static final int CODE_MISSING_BUNDLEA bundle in the deployment package is marked as DeploymentPackage-Missing but there is no such bundle in the target deployment package.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_MISSING_RESOURCE
public static final int CODE_MISSING_RESOURCEA resource in the source deployment package is marked as DeploymentPackage-Missing but there is no such resource in the target deployment package.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_SIGNING_ERROR
public static final int CODE_SIGNING_ERRORBad deployment package signing.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_BUNDLE_NAME_ERROR
public static final int CODE_BUNDLE_NAME_ERRORBundle symbolic name is not the same as defined by the deployment package manifest.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_FOREIGN_CUSTOMIZER
public static final int CODE_FOREIGN_CUSTOMIZERMatched resource processor service is a customizer from another deployment package.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_BUNDLE_SHARING_VIOLATION
public static final int CODE_BUNDLE_SHARING_VIOLATIONBundle with the same symbolic name already exists.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_RESOURCE_SHARING_VIOLATION
public static final int CODE_RESOURCE_SHARING_VIOLATIONAn artifact of any resource already exists.This exception is thrown when the called resource processor throws a
ResourceProcessorException
with theCODE_RESOURCE_SHARING_VIOLATION
error code.DeploymentAdmin.installDeploymentPackage(InputStream)
throws exception with this error code.- See Also:
-
CODE_COMMIT_ERROR
public static final int CODE_COMMIT_ERRORException with this error code is thrown when one of the Resource Processors involved in the deployment session threw aResourceProcessorException
with theCODE_PREPARE
error code.DeploymentAdmin.installDeploymentPackage(InputStream)
andDeploymentPackage.uninstall()
methods throw exception with this error code.- See Also:
-
CODE_OTHER_ERROR
public static final int CODE_OTHER_ERROROther error condition.All Deployment Admin methods which throw
DeploymentException
can throw an exception with this error code if the error condition cannot be categorized.- See Also:
-
CODE_PROCESSOR_NOT_FOUND
public static final int CODE_PROCESSOR_NOT_FOUNDThe Resource Processor service with the given PID (seeResource-Processor
manifest header) is not found.DeploymentAdmin.installDeploymentPackage(InputStream)
,DeploymentPackage.uninstall()
andDeploymentPackage.uninstallForced()
throws exception with this error code.- See Also:
-
CODE_TIMEOUT
public static final int CODE_TIMEOUTWhen a client requests a new session with an install or uninstall operation, it must block that call until the earlier session is completed. The Deployment Admin service must throw a Deployment Exception with this error code when the session can not be created after an appropriate time out period.DeploymentAdmin.installDeploymentPackage(InputStream)
,DeploymentPackage.uninstall()
andDeploymentPackage.uninstallForced()
throws exception with this error code.- See Also:
-
-
Constructor Details
-
DeploymentException
Create an instance of the exception.- Parameters:
code
- The error code of the failure. Code should be one of the predefined integer values (CODE_X
).message
- Message associated with the exceptioncause
- the originating exception
-
DeploymentException
Create an instance of the exception. Cause exception is implicitly set to null.- Parameters:
code
- The error code of the failure. Code should be one of the predefined integer values (CODE_X
).message
- Message associated with the exception
-
DeploymentException
public DeploymentException(int code) Create an instance of the exception. Cause exception and message are implicitly set to null.- Parameters:
code
- The error code of the failure. Code should be one of the predefined integer values (CODE_X
).
-
-
Method Details
-
getCause
Returns the cause of this exception ornull
if no cause was set. -
initCause
Initializes the cause of this exception to the specified value.- Overrides:
initCause
in classThrowable
- Parameters:
cause
- The cause of this exception.- Returns:
- This exception.
- Throws:
IllegalArgumentException
- If the specified cause is this exception.IllegalStateException
- If the cause of this exception has already been set.- Since:
- 1.1
-
getCode
public int getCode()- Returns:
- Returns the code.
-