Skip to main content

ActivationException

java.rmi.activation.ActivationException

ActivationException is described in the javadoc comments as:

General exception used by the activation interfaces.

As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The 'detail exception' that may be provided at construction time and accessed via the public {link: #detail} field is now known as the cause, and may be accessed via the {link: Throwable#getCause()} method, as well as the aforementioned 'legacy field.'

Invoking the method {link: Throwable#initCause(Throwable)} on an instance of ActivationException always throws {@link IllegalStateException}.
author: Ann Wollrath version: 1.24, 12/19/03 since: 1.2

Where is this exception thrown?

Following, is a list of exception messages cross-referenced to the source code responsible for throwing them. Click on the method link to view the code and see how the exception is thrown.

How is this exception thrown?

The following sub-sections identify where this exception is thrown, and how (or why) the code is throwing the exception.

Any source code quoted in this section is subject to the Java Research License unless stated otherwise.

java.rmi.activation.ActivationGroup.createGroup(ActivationGroupID, ActivationGroupDesc, long)

/**
     * Create and set the activation group for the current VM.  The
     * activation group can only be set if it is not currently set.
     * An activation group is set using the <code>createGroup</code>
     * method when the <code>Activator</code> initiates the
     * re-creation of an activation group in order to carry out
     * incoming <code>activate</code> requests. A group must first be
     * registered with the <code>ActivationSystem</code> before it can
     * be created via this method.
     * The group class specified by the
     * <code>ActivationGroupDesc</code> must be a concrete subclass of
     * <code>ActivationGroup</code> and have a public constructor that
     * takes two arguments: the <code>ActivationGroupID</code> for the
     * group and the <code>MarshalledObject</code> containing the
     * group's initialization data (obtained from the
     * <code>ActivationGroupDesc</code>.
     * If the group class name specified in the
     * <code>ActivationGroupDesc</code> is <code>null</code>, then
     * this method will behave as if the group descriptor contained
     * the name of the default activation group implementation class.
     * Note that if your application creates its own custom
     * activation group, a security manager must be set for that
     * group.  Otherwise objects cannot be activated in the group.
     * <code>java.rmi.RMISecurityManager</code> is set by default.
     * If a security manager is already set in the group VM, this
     * method first calls the security manager's
     * <code>checkSetFactory</code> method.  This could result in a
     * <code>SecurityException</code>. If your application needs to
     * set a different security manager, you must ensure that the
     * policy file specified by the group's
     * <code>ActivationGroupDesc</code> grants the group the necessary
     * permissions to set a new security manager.  (Note: This will be
     * necessary if your group downloads and sets a security manager).
     * After the group is created, the
     * <code>ActivationSystem</code> is informed that the group is
     * active by calling the <code>activeGroup</code> method which
     * returns the <code>ActivationMonitor</code> for the group. The
     * application need not call <code>activeGroup</code>
     * independently since it is taken care of by this method.
     * Once a group is created, subsequent calls to the
     * <code>currentGroupID</code> method will return the identifier
     * for this group until the group becomes inactive.
     * @param id the activation group's identifier
     * @param desc the activation group's descriptor
     * @param incarnation the group's incarnation number (zero on group's
     * initial creation)
     * @return the activation group for the VM
     * @exception ActivationException if group already exists or if error
     * occurs during group creation 
     * @exception SecurityException if permission to create group is denied.
     * (Note: The default implementation of the security manager 
     * <code>checkSetFactory</code>
     * method requires the RuntimePermission 'setFactory')
     * @see SecurityManager#checkSetFactory
     * @since 1.2
     */
public static synchronized ActivationGroup createGroup(ActivationGroupID id, final ActivationGroupDesc desc, long incarnation) throws ActivationException {
    SecurityManager security = System.getSecurityManager();
    if (security != null) security.checkSetFactory();
    if (currGroup != null) throw new ActivationException('group already exists');
    if (canCreate == false) throw new ActivationException('group deactivated and ' + 'cannot be recreated');
    try {
        String groupClassName = desc.getClassName();
        if (groupClassName == null) {
            groupClassName = sun.rmi.server.ActivationGroupImpl.class.getName();
        }
        final String className = groupClassName;
        Class cl;
        try {
            cl = (Class) java.security.AccessController.doPrivileged(new PrivilegedExceptionAction() {

                public Object run() throws ClassNotFoundException, MalformedURLException {
                    return RMIClassLoader.loadClass(desc.getLocation(), className);
                }
            });
        } catch (PrivilegedActionException pae) {
            throw new ActivationException('Could not load default group ' + 'implementation class', pae.getException());
        }
        Constructor constructor = cl.getConstructor(groupConstrParams);
        Object[] params = new Object[] { id, desc.getData() };
        Object obj = constructor.newInstance(params);
        if (obj instanceof ActivationGroup) {
            ActivationGroup newGroup = (ActivationGroup) obj;
            currSystem = id.getSystem();
            newGroup.incarnation = incarnation;
            newGroup.monitor = currSystem.activeGroup(id, newGroup, incarnation);
            currGroup = newGroup;
            currGroupID = id;
            canCreate = false;
        } else {
            throw new ActivationException('group not correct class: ' + obj.getClass().getName());
        }
    } catch (java.lang.reflect.InvocationTargetException e) {
        e.getTargetException().printStackTrace();
        throw new ActivationException('exception in group constructor', e.getTargetException());
    } catch (ActivationException e) {
        throw e;
    } catch (Exception e) {
        throw new ActivationException('exception creating group', e);
    }
    return currGroup;
}

Source: "Java SE Downloads: Java SE 6 JDK Source Code", at: http://www.oracle.com/technetwork/java/javase/downloads/index.html

java.rmi.activation.ActivationGroup.setSystem(ActivationSystem)

/**
     * Set the activation system for the VM.  The activation system can
     * only be set it if no group is currently active. If the activation
     * system is not set via this call, then the <code>getSystem</code>
     * method attempts to obtain a reference to the
     * <code>ActivationSystem</code> by looking up the name
     * 'java.rmi.activation.ActivationSystem' in the Activator's
     * registry. By default, the port number used to look up the
     * activation system is defined by
     * <code>ActivationSystem.SYSTEM_PORT</code>. This port can be overridden
     * by setting the property <code>java.rmi.activation.port</code>.
     * If there is a security manager, this method first
     * calls the security manager's <code>checkSetFactory</code> method.
     * This could result in a SecurityException.
     * @param system remote reference to the <code>ActivationSystem</code>
     * @exception ActivationException if activation system is already set
     * @exception SecurityException if permission to set the activation system is denied.
     * (Note: The default implementation of the security manager 
     * <code>checkSetFactory</code>
     * method requires the RuntimePermission 'setFactory')
     * @see #getSystem
     * @see SecurityManager#checkSetFactory
     * @since 1.2
     */
public static synchronized void setSystem(ActivationSystem system) throws ActivationException {
    SecurityManager security = System.getSecurityManager();
    if (security != null) security.checkSetFactory();
    if (currSystem != null) throw new ActivationException('activation system already set');
    currSystem = system;
}

Source: "Java SE Downloads: Java SE 6 JDK Source Code", at: http://www.oracle.com/technetwork/java/javase/downloads/index.html

java.rmi.activation.ActivationGroup.currentGroup()

/**
     * Returns the current group for the VM.
     * @exception ActivationException if current group is null (not active)
     */
static synchronized ActivationGroup currentGroup() throws ActivationException {
    if (currGroup == null) {
        throw new ActivationException('group is not active');
    }
    return currGroup;
}

Source: "Java SE Downloads: Java SE 6 JDK Source Code", at: http://www.oracle.com/technetwork/java/javase/downloads/index.html

java.rmi.activation.ActivationGroup.internalCurrentGroupID()

/**
     * Returns the activation group identifier for the VM.  If an
     * activation group does not exist for this VM, a default
     * activation group is created. A group can be created only once,
     * so if a group has already become active and deactivated.
     * @return the activation group identifier
     * @exception ActivationException if error occurs during group
     * creation, if security manager is not set, or if the group
     * has already been created and deactivated.
     */
static synchronized ActivationGroupID internalCurrentGroupID() throws ActivationException {
    if (currGroupID == null) throw new ActivationException('nonexistent group');
    return currGroupID;
}

Source: "Java SE Downloads: Java SE 6 JDK Source Code", at: http://www.oracle.com/technetwork/java/javase/downloads/index.html

java.rmi.activation.ActivationGroup.getSystem()

/**
     * Returns the activation system for the VM. The activation system
     * may be set by the <code>setSystem</code> method. If the
     * activation system is not set via the <code>setSystem</code>
     * method, then the <code>getSystem</code> method attempts to
     * obtain a reference to the <code>ActivationSystem</code> by
     * looking up the name 'java.rmi.activation.ActivationSystem' in
     * the Activator's registry. By default, the port number used to
     * look up the activation system is defined by
     * <code>ActivationSystem.SYSTEM_PORT</code>. This port can be
     * overridden by setting the property
     * <code>java.rmi.activation.port</code>.
     * @return the activation system for the VM/group
     * @exception ActivationException if activation system cannot be
     *  obtained or is not bound
     * (means that it is not running)
     * @see #setSystem
     * @since 1.2
     */
public static synchronized ActivationSystem getSystem() throws ActivationException {
    if (currSystem == null) {
        try {
            int port;
            port = ((Integer) java.security.AccessController.doPrivileged(new GetIntegerAction('java.rmi.activation.port', ActivationSystem.SYSTEM_PORT))).intValue();
            currSystem = (ActivationSystem) Naming.lookup('//:' + port + '/java.rmi.activation.ActivationSystem');
        } catch (Exception e) {
            throw new ActivationException('unable to obtain ActivationSystem', e);
        }
    }
    return currSystem;
}

Source: "Java SE Downloads: Java SE 6 JDK Source Code", at: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Comments

Popular posts from this blog

BAD_CERTIFICATE - A corrupt or unuseable certificate...

This is a simple symptom-cause-solution blog entry only. I hope these blogs will help fellow administrators.
Symptom
In wls_utc, when trying to test a webservice using SSL, the following error message is received: javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.
If SSL debugging is enabled, the following error also appears in the logs: ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)' <1254822672320>>
verification failed because RSA key public exponent [3] is too small
Cause
The certificate encryption is of a weaker strength than expected by newer versions of Java.
Solution
Add the flag "-Dweblogic.security.SSL.allowSmallRSAExponent=true" to the server startup parameters.
References


None.

Connection refused: No available router to destination

This is a simple symptom-cause-solution blog entry only. I hope these blogs will help fellow administrators.
Symptom

The following exception occurs in WebLogic server logs. Most likely to occur during WebLogic server start-up, but similar exceptions may occur at other times.
java.net.ConnectException: t3://myserver:8000: Destination unreachable; nested exception is: java.net.ConnectException: Connection refused: connect; No available router to destination] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:49) at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:363) at weblogic.jndi.Environment.getContext(Environment.java:307) at weblogic.jndi.Environment.getContext(Environment.java:277)
Cause
This message (Connection refused: connect; No available router to destination) is a kind of "catch…

WebLogic Admin Console

WebLogic Admin Console
The WebLogic Admin Console is a web-based, user interface used to configure and control a set of WebLogic servers or clusters (i.e. a "domain"). In any logical group of WebLogic servers there must exist one admin server, which hosts the WebLogic Admin Console application and manages the associated configuration files.
WebLogic Administrators will use the Administration Console for a number of tasks, including:
Starting and stopping WebLogic servers or entire clusters.Configuring server parameters, security, database connections and deployed applications.Viewing server status, health and metrics. Note: It is not strictly necessary to use the Weblogic Admin Console to perform these tasks, as they can be scripted using WLST (the WebLogic Scripting Tool).
Accessing the Admin Console
WebLogic Admin Console Url: http://hostname:port/console.
To access the WebLogic Administration Console, assuming the admin server has been started, goto the above url. Where hostname…