/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @bug 4010355
* @summary RemoteException should have server's stack trace
*
* @author Laird Dornin
*
* @library ../../testlibrary
* @build TestLibrary ClientStackTrace MyRemoteObject_Stub
* @run main/othervm/policy=security.policy/timeout=120 ClientStackTrace
*/
/*
* This test ensures that the stack trace in a caught server side
* remote exception contains the string "exceptionReceivedFromServer".
*/
}
implements MyRemoteInterface {
throw new RemoteException("This is a test remote exception");
}
}
public class ClientStackTrace {
try {
myRobj = new MyRemoteObject();
/* cause a remote exception to occur. */
try {
} catch (RemoteException re) {
throw new RuntimeException("No client stack trace on " +
"thrown remote exception");
} else {
trace);
}
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
} finally {
}
}
// make sure that the remote object goes away.
// make sure that the object goes away
try {
UnicastRemoteObject.unexportObject(r, true);
} catch (Exception e) {
e.getMessage();
e.printStackTrace();
}
}
}