-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: sdR10048 Date: 11/21/2000
Method java.rmi.ConnectException.printStackTrace dumps core for some
ConnectException objects under jdk1.4.0-beta40 or later.
See test example. Such a big example needed to create such
sophisticated ConnectException object.
=========================================================
import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.*;
import java.net.*;
interface NBind extends Remote {}
class NBindImpl extends UnicastRemoteObject implements NBind {
public NBindImpl() throws RemoteException {}
}
public class T2 {
public void doit(boolean printStackTrace) {
System.out.println(">>doit:printStackTrace: "+printStackTrace);
String name = "rmi://:1000/Nope";
try {
NBind bo = new NBindImpl();
Naming.bind(name, bo);
} catch (AlreadyBoundException e) {
System.out.println(e);
e.printStackTrace();
} catch (MalformedURLException e) {
System.out.println(e);
e.printStackTrace();
} catch (RemoteException e) {
System.out.println("=====");
System.out.println(e);
System.out.println("=====");
if ( printStackTrace ) {
e.printStackTrace();
}
}
}
public static void main(String[] args) {
T2 t = new T2();
t.doit(false);
t.doit(true);
System.exit(1);
}
}
=========================================================
] dsv@falcon ~/tmp
] java -version
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b40)
Java HotSpot(TM) Client VM (build 1.4beta-B40, mixed mode)
] dsv@falcon ~/tmp
] javac T2.java
] dsv@falcon ~/tmp
] rmic NBindImpl
] dsv@falcon ~/tmp
] java T2
>>doit:printStackTrace: false
=====
java.rmi.ConnectException: Connection refused to host: 192.168.205.44; nested exception is:
java.net.ConnectException: Connection refused
=====
>>doit:printStackTrace: true
=====
java.rmi.ConnectException: Connection refused to host: 192.168.205.44; nested exception is:
java.net.ConnectException: Connection refused
=====
java.rmi.ConnectException: Connection refused to host: 192.168.205.44; nested exception is:
java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F534F4C415249530E43505007C2 01
#
# Problematic Thread: prio=5 tid=0x28140 nid=0x1 runnable
#
Abort (core dumped)
--------------------------------------------------
Note: this does not happen with jdk1.4.0-beta35.
======================================================================
- duplicates
-
JDK-4387663 [merlin] VM aborts when filling stack trace if element has no source file info
- Closed