JDK-4066450 : rmic: error: An error has occurred in the compiler;
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 1.1.2
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1997-07-22
  • Updated: 1997-08-27
  • Resolved: 1997-08-27
Related Reports
Duplicate :  
Description

Name: rlT66838			Date: 07/22/97


This is the file HelloImpl

import java.rmi.*;
import java.rmi.server.*;
import java.net.*;

public class HelloImpl extends UnicastRemoteObject implements Hello {

  public HelloImpl() throws RemoteException {
    super();
  }
    
  public String sayHello() throws RemoteException {
    return "Hello, World!";
  }

  public static void main(String args[]) {

    try {
      HelloImpl h = new HelloImpl();
      Naming.rebind("hello", h);
      System.out.println("Hello Server ready.");
    }
     catch (RemoteException re) {
      System.out.println("Exception in HelloImpl.main: " + re);
    }
    catch (MalformedURLException e) {
      System.out.println("MalformedURLException in HelloImpl.main: " + e);
    }

  }

}
------------------------------------------------
H:\VSSProjects\Java Test\RMI\HelloWorld>rmic "H:\VSSProjects\Java Test\RMI\Hello
World\HelloImpl.java"
sun.tools.java.CompilerError: mangle H:\VSSProjects\Java Test\RMI\HelloWorld\Hel
loImpl$java
        at sun.tools.java.Type.mangleInnerType(Type.java:205)
        at sun.tools.java.Type.tClass(Type.java:173)
        at sun.tools.java.ClassDeclaration.<init>(ClassDeclaration.java:59)
        at sun.rmi.rmic.Main.doCompile(Main.java:243)
        at sun.rmi.rmic.Main.compile(Main.java:121)
        at sun.rmi.rmic.Main.main(Main.java:404)
error: An error has occurred in the compiler; please file a bug report (http://j
ava.sun.com/cgi-bin/bugreport.cgi).
1 error
------------------------
company - Fraunhofer ISST , email - ###@###.###
======================================================================

Comments
EVALUATION peter.jones@East 1997-07-22 There is a bit of user error going on here, in that for "rmic", you need to supply the fully qualified class name fo the remote implementation class to compile stubs/skeletons for, as available from CLASSPATH, not the name of any file in absolute or relative path notation. So, what the user was doing is not supposed to work. But the failure mode is rather unexpected and should be cleaned up. peter.jones@East 1997-08-26 An update to this bug: the actual "CompilerError" is actually due to the fact that rmic expects a class name as an argument, and the compiler tools since 1.1 fail if asked to look up a class name with a " " in it, like the user's indicated file path contains. This has been filed as 4073373; I'm going to mark this bug as a duplicate.
11-06-2004

WORK AROUND Name: rlT66838 Date: 07/22/97 The problem lies in the path notation which is rmic "H:\VSSProjects\Java Test\RMI\HelloWorld\HelloImpl.java" with rmic HelloImpl everything works fine... ======================================================================
11-06-2004

PUBLIC COMMENTS "rmic" will fail, printing out the stack trace of a CompilerError if a class name argument contains a space (although they never should).
10-06-2004