Skip to main content

InvalidObjectException

java.io.InvalidObjectException

InvalidObjectException is described in the javadoc comments as:

Indicates that one or more deserialized objects failed validation tests. The argument should provide the reason for the failure.
see: ObjectInputValidation since: JDK1.1 author: unascribed version: 1.16, 01/12/04 since: JDK1.1

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.

javax.management.ObjectName.readObject(ObjectInputStream)

/**
     * Deserializes an {@link ObjectName} from an {@link ObjectInputStream}.
     * @serialData <ul>
     *               <li>In the current serial form (value of property
     *                   <code>jmx.serial.form</code> differs from
     *                   <code>1.0</code>): the string
     *                   "<domain>:<properties><wild>",
     *                   where: <ul>
     *                            <li><domain> represents the domain part
     *                                of the {@link ObjectName}</li>
     *                            <li><properties> represents the list of
     *                                properties, as returned by 
     *                                {@link #getKeyPropertyListString}
     *                            <li><wild> is empty if not
     *                                <code>isPropertyPattern</code>, or
     *                                is the character '<code>*</code>' if
     *                                <code>isPropertyPattern</code>
     *                                and <properties> is empty, or
     *                                is '<code>,*</code>' if
     *                                <code>isPropertyPattern</code> and
     *                                <properties> is not empty.
     *                            </li>
     *                          </ul>
     *                   The intent is that this string could be supplied
     *                   to the {@link #ObjectName(String)} constructor to
     *                   produce an equivalent {@link ObjectName}.
     *               </li>
     *               <li>In the old serial form (value of property
     *                   <code>jmx.serial.form</code> is
     *                   <code>1.0</code>): <domain> <propertyList>
     *                   <propertyListString> <canonicalName>
     *                   <pattern> <propertyPattern>,
     *                   where: <ul>
     *                            <li><domain> represents the domain part
     *                                of the {@link ObjectName}</li>
     *                            <li><propertyList> is the 
     *                                {@link Hashtable} that contains all the
     *                                pairs (key,value) for this
     *                                {@link ObjectName}</li>
     *                            <li><propertyListString> is the
     *                                {@link String} representation of the
     *                                list of properties in any order (not
     *                                mandatorily a canonical representation)
     *                                </li>
     *                            <li><canonicalName> is the
     *                                {@link String} containing this
     *                                {@link ObjectName}'s canonical name</li>
     *                            <li><pattern> is a boolean which is
     *                                <code>true</code> if this
     *                                {@link ObjectName} contains a pattern</li>
     *                            <li><propertyPattern> is a boolean which
     *                                is <code>true</code> if this
     *                                {@link ObjectName} contains a pattern in
     *                                the list of properties</li>
     *                          </ul>
     *               </li>
     *             </ul>
     */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    String cn;
    if (compat) {
        final ObjectInputStream.GetField fields = in.readFields();
        cn = (String) fields.get('domain', 'default') + ':' + (String) fields.get('propertyListString', '');
    } else {
        in.defaultReadObject();
        cn = (String) in.readObject();
    }
    try {
        construct(cn);
    } catch (NullPointerException e) {
        throw new InvalidObjectException(e.toString());
    } catch (MalformedObjectNameException e) {
        throw new InvalidObjectException(e.toString());
    }
}

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

java.text.MessageFormat.readObject(ObjectInputStream)

/**
     * After reading an object from the input stream, do a simple verification
     * to maintain class invariants.
     * @throws InvalidObjectException if the objects read from the stream is invalid.
     */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    boolean isValid = maxOffset >= -1 && formats.length > maxOffset && offsets.length > maxOffset && argumentNumbers.length > maxOffset;
    if (isValid) {
        int lastOffset = pattern.length() + 1;
        for (int i = maxOffset; i >= 0; --i) {
            if ((offsets[i] < 0) || (offsets[i] > lastOffset)) {
                isValid = false;
                break;
            } else {
                lastOffset = offsets[i];
            }
        }
    }
    if (!isValid) {
        throw new InvalidObjectException('Could not reconstruct MessageFormat from corrupt stream.');
    }
}

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

java.text.DecimalFormat.readObject(ObjectInputStream)

/**
     * Reads the default serializable fields from the stream and performs
     * validations and adjustments for older serialized versions. The
     * validations and adjustments are:
     * <ol>
     * <li>
     * Verify that the superclass's digit count fields correctly reflect
     * the limits imposed on formatting numbers other than
     * <code>BigInteger</code> and <code>BigDecimal</code> objects. These
     * limits are stored in the superclass for serialization compatibility
     * with older versions, while the limits for <code>BigInteger</code> and
     * <code>BigDecimal</code> objects are kept in this class.
     * If, in the superclass, the minimum or maximum integer digit count is
     * larger than <code>DOUBLE_INTEGER_DIGITS</code> or if the minimum or
     * maximum fraction digit count is larger than
     * <code>DOUBLE_FRACTION_DIGITS</code>, then the stream data is invalid
     * and this method throws an <code>InvalidObjectException</code>.
     * <li>
     * If <code>serialVersionOnStream</code> is less than 3, then call
     * the setters for the minimum and maximum integer and fraction digits with
     * the values of the corresponding superclass getters to initialize the
     * fields in this class. The fields in this class are new with version 3.
     * <li>
     * If <code>serialVersionOnStream</code> is less than 1, indicating that
     * the stream was written by JDK 1.1, initialize
     * <code>useExponentialNotation</code>
     * to false, since it was not present in JDK 1.1.
     * <li>
     * Set <code>serialVersionOnStream</code> to the maximum allowed value so
     * that default serialization will work properly if this object is streamed
     * out again.
     * </ol>
     * Stream versions older than 2 will not have the affix pattern variables
     * <code>posPrefixPattern</code> etc.  As a result, they will be initialized
     * to <code>null</code>, which means the affix strings will be taken as
     * literal values.  This is exactly what we want, since that corresponds to
     * the pre-version-2 behavior.
     */
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    if (super.getMaximumIntegerDigits() > DOUBLE_INTEGER_DIGITS || super.getMaximumFractionDigits() > DOUBLE_FRACTION_DIGITS) {
        throw new InvalidObjectException('Digit count out of range');
    }
    if (serialVersionOnStream < 3) {
        setMaximumIntegerDigits(super.getMaximumIntegerDigits());
        setMinimumIntegerDigits(super.getMinimumIntegerDigits());
        setMaximumFractionDigits(super.getMaximumFractionDigits());
        setMinimumFractionDigits(super.getMinimumFractionDigits());
    }
    if (serialVersionOnStream < 1) {
        useExponentialNotation = false;
    }
    serialVersionOnStream = currentSerialVersion;
    digitList = new DigitList();
}

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

java.text.NumberFormat.readObject(ObjectInputStream)

/**
     * First, read in the default serializable data.
     * Then, if <code>serialVersionOnStream</code> is less than 1, indicating that
     * the stream was written by JDK 1.1,
     * set the <code>int</code> fields such as <code>maximumIntegerDigits</code>
     * to be equal to the <code>byte</code> fields such as <code>maxIntegerDigits</code>,
     * since the <code>int</code> fields were not present in JDK 1.1.
     * Finally, set serialVersionOnStream back to the maximum allowed value so that
     * default serialization will work properly if this object is streamed out again.
     * If <code>minimumIntegerDigits</code> is greater than
     * <code>maximumIntegerDigits</code> or <code>minimumFractionDigits</code>
     * is greater than <code>maximumFractionDigits</code>, then the stream data
     * is invalid and this method throws an <code>InvalidObjectException</code>.
     * In addition, if any of these values is negative, then this method throws
     * an <code>InvalidObjectException</code>.
     * @since 1.2
     */
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    if (serialVersionOnStream < 1) {
        maximumIntegerDigits = maxIntegerDigits;
        minimumIntegerDigits = minIntegerDigits;
        maximumFractionDigits = maxFractionDigits;
        minimumFractionDigits = minFractionDigits;
    }
    if (minimumIntegerDigits > maximumIntegerDigits || minimumFractionDigits > maximumFractionDigits || minimumIntegerDigits < 0 || minimumFractionDigits < 0) {
        throw new InvalidObjectException('Digit count range invalid');
    }
    serialVersionOnStream = currentSerialVersion;
}

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

javax.print.attribute.EnumSyntax.readResolve()

/**
     * During object input, convert this deserialized enumeration instance to
     * the proper enumeration value defined in the enumeration attribute class.
     * @return  The enumeration singleton value stored at index
     *          <I>i</I>-<I>L</I> in the enumeration value table returned by 
     *          {@link #getEnumValueTable() <CODE>getEnumValueTable()</CODE>}, 
     *          where <I>i</I> is this enumeration value's integer value and 
     *          <I>L</I> is the value returned by {@link #getOffset() 
     *          <CODE>getOffset()</CODE>}. 
     * @throws ObjectStreamException if the stream can't be deserialised
     * @throws  InvalidObjectException
     *     Thrown if the enumeration value table is null, this enumeration 
     *     value's integer value does not correspond to an element in the 
     *     enumeration value table, or the corresponding element in the 
     *     enumeration value table is null. (Note: {@link 
     *     java.io.InvalidObjectException InvalidObjectException} is a subclass 
     *     of {@link java.io.ObjectStreamException ObjectStreamException}, which 
     *     <CODE>readResolve()</CODE> is declared to throw.) 
     */
protected Object readResolve() throws ObjectStreamException {
    EnumSyntax[] theTable = getEnumValueTable();
    if (theTable == null) {
        throw new InvalidObjectException('Null enumeration value table for class ' + getClass());
    }
    int theOffset = getOffset();
    int theIndex = value - theOffset;
    if (0 > theIndex || theIndex >= theTable.length) {
        throw new InvalidObjectException('Integer value = ' + value + ' not in valid range ' + theOffset + '..' + (theOffset + theTable.length - 1) + 'for class ' + getClass());
    }
    EnumSyntax result = theTable[theIndex];
    if (result == null) {
        throw new InvalidObjectException('No enumeration value for integer value = ' + value + 'for class ' + getClass());
    }
    return result;
}

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

javax.management.openmbean.SimpleType.readResolve()

/**
     * Replace an object read from an {@link
     * java.io.ObjectInputStream} with the unique instance for that
     * value.
     * @return the replacement object.
     * @exception ObjectStreamException if the read object cannot be
     * resolved.
     */
public Object readResolve() throws ObjectStreamException {
    final SimpleType canonical = (SimpleType) canonicalTypes.get(this);
    if (canonical == null) {
        throw new InvalidObjectException('Invalid SimpleType: ' + this);
    }
    return canonical;
}

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

java.lang.Enum.readObject(ObjectInputStream)

/**
      * prevent default deserialization
      */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    throw new InvalidObjectException('can't deserialize enum');
}

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

java.lang.Enum.readObjectNoData()

private void readObjectNoData() throws ObjectStreamException {
    throw new InvalidObjectException('can't deserialize enum');
}

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

java.io.ObjectInputStream.readHandle(boolean)

/**
     * Reads in object handle, sets passHandle to the read handle, and returns
     * object associated with the handle.
     */
private Object readHandle(boolean unshared) throws IOException {
    if (bin.readByte() != TC_REFERENCE) {
        throw new StreamCorruptedException();
    }
    passHandle = bin.readInt() - baseWireHandle;
    if (passHandle < 0 || passHandle >= handles.size()) {
        throw new StreamCorruptedException('illegal handle value');
    }
    if (unshared) {
        throw new InvalidObjectException('cannot read back reference as unshared');
    }
    Object obj = handles.lookupObject(passHandle);
    if (obj == unsharedMarker) {
        throw new InvalidObjectException('cannot read back reference to unshared object');
    }
    return obj;
}

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

java.net.InetSocketAddress.readObject(ObjectInputStream)

private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    s.defaultReadObject();
    if (port < 0 || port > 0xFFFF) {
        throw new InvalidObjectException('port out of range:' + port);
    }
    if (hostname == null && addr == null) {
        throw new InvalidObjectException('hostname and addr ' + 'can't both be null');
    }
}

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

java.net.Inet6Address.readObject(ObjectInputStream)

/**
     * restore the state of this object from stream
     * including the scope information, only if the
     * scoped interface name is valid on this system
     */
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    scope_ifname = null;
    scope_ifname_set = false;
    s.defaultReadObject();
    if (ifname != null && !''.equals(ifname)) {
        try {
            scope_ifname = NetworkInterface.getByName(ifname);
            try {
                scope_id = deriveNumericScope(scope_ifname);
            } catch (UnknownHostException e) {
                assert false;
            }
        } catch (SocketException e) {
        }
        if (scope_ifname == null) {
            scope_id_set = false;
            scope_ifname_set = false;
            scope_id = 0;
        }
    }
    ipaddress = (byte[]) ipaddress.clone();
    if (ipaddress.length != INADDRSZ) {
        throw new InvalidObjectException('invalid address length: ' + ipaddress.length);
    }
    if (family != IPv6) {
        throw new InvalidObjectException('invalid address family type');
    }
}

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

java.text.SimpleDateFormat.readObject(ObjectInputStream)

/**
     * After reading an object from the input stream, the format
     * pattern in the object is verified.
     * @exception InvalidObjectException if the pattern is invalid
     */
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    try {
        compiledPattern = compile(pattern);
    } catch (Exception e) {
        throw new InvalidObjectException('invalid pattern');
    }
    if (serialVersionOnStream < 1) {
        initializeDefaultCentury();
    } else {
        parseAmbiguousDatesAsAfter(defaultCenturyStart);
    }
    serialVersionOnStream = currentSerialVersion;
    TimeZone tz = getTimeZone();
    if (tz instanceof SimpleTimeZone) {
        String id = tz.getID();
        TimeZone zi = TimeZone.getTimeZone(id);
        if (zi != null && zi.hasSameRules(tz) && zi.getID().equals(id)) {
            setTimeZone(zi);
        }
    }
}

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

java.text.ChoiceFormat.readObject(ObjectInputStream)

/**
     * After reading an object from the input stream, do a simple verification
     * to maintain class invariants.
     * @throws InvalidObjectException if the objects read from the stream is invalid.
     */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    if (choiceLimits.length != choiceFormats.length) {
        throw new InvalidObjectException('limits and format arrays of different length.');
    }
}

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

javax.management.remote.rmi.RMIConnector.readObject(java.io.ObjectInputStream)

/**
     * Read RMIConnector fields from an {@link java.io.ObjectInputStream
     * ObjectInputStream}.
     * Calls <code>s.defaultReadObject()</code> and then initializes
     * all transient variables that need initializing.
     * @param s The ObjectInputStream to read from.
     * @exception InvalidObjectException if none of <var>rmiServer</var> stub
     *    or <var>jmxServiceURL</var> are set.
     * @see #RMIConnector(JMXServiceURL,Map)
     * @see #RMIConnector(RMIServer,Map)
     **/
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
    s.defaultReadObject();
    if (rmiServer == null && jmxServiceURL == null) throw new InvalidObjectException('rmiServer and jmxServiceURL both null');
    initTransients();
}

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

javax.management.remote.rmi.RMIConnector.writeObject(java.io.ObjectOutputStream)

/**
     * Writes the RMIConnector fields to an {@link java.io.ObjectOutputStream
     * ObjectOutputStream}.
     * Connects the underlying RMIServer stub to an ORB, if needed,
     * before serializing it. This is done using the environment
     * map that was provided to the constructor, if any, and as documented
     * in {@link javax.management.remote.rmi}.
     * This method then calls <code>s.defaultWriteObject()</code>.
     * Usually, <var>rmiServer</var> is null if this object
     * was constructed with a JMXServiceURL, and <var>jmxServiceURL</var>
     * is null if this object is constructed with a RMIServer stub.
     * Note that the environment Map is not serialized, since the objects
     * it contains are assumed to be contextual and relevant only
     * with respect to the local environment (class loader, ORB, etc...).
     * After an RMIConnector is deserialized, it is assumed that the
     * user will call {@link #connect(Map)}, providing a new Map that
     * can contain values which are contextually relevant to the new
     * local environment.
     * Since connection to the ORB is needed prior to serializing, and
     * since the ORB to connect to is one of those contextual parameters,
     * it is not recommended to re-serialize a just de-serialized object -
     * as the de-serialized object has no map. Thus, when an RMIConnector
     * object is needed for serialization or transmission to a remote
     * application, it is recommended to obtain a new RMIConnector stub
     * by calling {@link RMIConnectorServer#toJMXConnector(Map)}.
     * @param s The ObjectOutputStream to write to.
     * @exception InvalidObjectException if none of <var>rmiServer</var> stub
     *    or <var>jmxServiceURL</var> are set.
     * @see #RMIConnector(JMXServiceURL,Map)
     * @see #RMIConnector(RMIServer,Map)
     **/
private void writeObject(java.io.ObjectOutputStream s) throws IOException {
    if (rmiServer == null && jmxServiceURL == null) throw new InvalidObjectException('rmiServer and jmxServiceURL both null.');
    connectStub(this.rmiServer, env);
    s.defaultWriteObject();
}

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

java.awt.font.TextAttribute.readResolve()

/**
     * Resolves instances being deserialized to the predefined constants.
     */
protected Object readResolve() throws InvalidObjectException {
    if (this.getClass() != TextAttribute.class) {
        throw new InvalidObjectException('subclass didn't correctly implement readResolve');
    }
    TextAttribute instance = (TextAttribute) instanceMap.get(getName());
    if (instance != null) {
        return instance;
    } else {
        throw new InvalidObjectException('unknown attribute name');
    }
}

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

java.rmi.activation.ActivationID.writeObject(java.io.ObjectOutputStream)

/**
     * <code>writeObject</code> for custom serialization.
     * This method writes this object's serialized form for
     * this class as follows:
     * The <code>writeObject</code> method is invoked on
     * <code>out</code> passing this object's unique identifier
     * (a {@link java.rmi.server.UID UID} instance) as the argument.
     * Next, the {@link
     * java.rmi.server.RemoteRef#getRefClass(java.io.ObjectOutput)
     * getRefClass} method is invoked on the activator's
     * <code>RemoteRef</code> instance to obtain its external ref
     * type name.  Next, the <code>writeUTF</code> method is
     * invoked on <code>out</code> with the value returned by
     * <code>getRefClass</code>, and then the
     * <code>writeExternal</code> method is invoked on the
     * <code>RemoteRef</code> instance passing <code>out</code>
     * as the argument.
     * @serialData The serialized data for this class comprises a
     * <code>java.rmi.server.UID</code> (written with
     * <code>ObjectOutput.writeObject</code>) followed by the
     * external ref type name of the activator's
     * <code>RemoteRef</code> instance (a string written with
     * <code>ObjectOutput.writeUTF</code>), followed by the
     * external form of the <code>RemoteRef</code> instance as
     * written by its <code>writeExternal</code> method.
     * The external ref type name of the 
     * <code>RemoteRef</Code> instance is
     * determined using the definitions of external ref type
     * names specified in the {@link java.rmi.server.RemoteObject
     * RemoteObject} <code>writeObject</code> method
     * <b>serialData</b> specification.  Similarly, the data
     * written by the <code>writeExternal</code> method and read
     * by the <code>readExternal</code> method of
     * <code>RemoteRef</code> implementation classes
     * corresponding to each of the defined external ref type
     * names is specified in the {@link
     * java.rmi.server.RemoteObject RemoteObject}
     * <code>writeObject</code> method <b>serialData</b>
     * specification.
     **/
private void writeObject(java.io.ObjectOutputStream out) throws IOException, ClassNotFoundException {
    out.writeObject(uid);
    RemoteRef ref;
    if (activator instanceof RemoteObject) {
        ref = ((RemoteObject) activator).getRef();
    } else if (Proxy.isProxyClass(activator.getClass())) {
        InvocationHandler handler = Proxy.getInvocationHandler(activator);
        if (!(handler instanceof RemoteObjectInvocationHandler)) {
            throw new InvalidObjectException('unexpected invocation handler');
        }
        ref = ((RemoteObjectInvocationHandler) handler).getRef();
    } else {
        throw new InvalidObjectException('unexpected activator type');
    }
    out.writeUTF(ref.getRefClass(out));
    ref.writeExternal(out);
}

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

NullPointerException

java.lang.NullPointerException NullPointerException is described in the javadoc comments as: Thrown when an application attempts to use null in a case where an object is required. These include: Calling the instance method of a null object. Accessing or modifying the field of a null object. Taking the length of null as if it were an array. Accessing or modifying the slots of null as if it were an array. Throwing null as if it were a Throwable value. Applications should throw instances of this class to indicate other illegal uses of the null object. author: unascribed version: 1.19, 12/19/03 since: JDK1.0 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. The message ' java.lang.NullPointerException: ' is thrown within the method: com.sun.corba.se.impl.interceptors.ClientRequestInfoImpl.get_r

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

Recovering WebLogic Passwords

In one of my previous articles ( here ) I explained that the SerializedSystemIni.dat file in WebLogic contains the key used to encrypt and decrypt passwords. If you're not currently keeping this file secure I suggest you do, as with it someone can (to name a few things): Decrypt the WebLogic admin username and password from boot.properties. Recover database passwords, if JDBC Connection pools are configured, from config.xml. Recover the keystore passwords from config.xml and obtain SSL certificates stored in the jks keystores. Essentially, they can do whatever they want, so if you don't know who can read your SerializedSystemIni.dat files, look... now. In this article I will show how easy it is for this file to be used to recover lost passwords via a simple WLST script. The Script The script I use to decrypt passwords is incredibly short, and it works with WebLogic 8, 9 and 10 (probably for version 7 too). To use it, just create a new file called decryptpwd.py and paste the fol