During registration of a COM class, you may be prompted with an error or warning message. The following is a list of the more common errors and warnings. Each error or warning includes information as to the possible reasons the error occurred and, where applicable, suggestions on how to resolve the error or warning.
No registration attribute in class file 'filename'
Registration of the class file referenced in the error message was attempted but the class file did not contain a @com.register comment tag. Ensure that the COM class in the class file you are attempting to register has a valid @com.register comment tag.
Cannot create instance of class 'identifier'
In order to create a type library and register your COM class, a class must be able to be instantiated and call the standard constructor (the constructor that does not contain any parameters). This error can occur if any dependent classes of your COM class cannot be located or if there is an error in the standard constructor for your class. Ensure that the dependent classes for your COM class can be accessed and that your class's standard constructor contains no errors.
Cannot open filename 'filename'
During the COM registration process, a temporary type library file is generated. This error occurs when the temporary filename cannot be copied and renamed to the final type library name. Ensure that the file is not read-only, in a read-only directory, or in use by another application.
Unable to create registry keys for class 'identifier'
While attempting to register your COM class, the COM registration process could not create a key in the system registry. This error can also occur if the COM registration process cannot open a specific key or write a value into the registry. Ensure that your system registry is not damaged.
Class file 'filename' does not have the extension '.class'
In order to register a COM class, the compiled class file must have the .class extension. This error can also occur if the file to be registered as a COM class is not a valid Java class file. Ensure that the class file you are attempting to register as a COM class contains the .class extension and that it is a valid Java class file.
The internal class name 'identifier' does not match the file or directory name of class file 'filename' — it cannot be loaded
The COM class that is being registered has a different class name than the class file it is located in, or the class file is located in a directory that conflicts with the class's defined package. Ensure that the COM class name and its defined package match the location and name of the class file.
Classes contain more than one type library id. Only one type library can be created at a time
Only one type library can be specified in your Visual J++ project at a time. This error usually occurs when a COM class's @com.register comment tag has a different typelib GUID than the other COM classes in your project. All COM classes in a project must have the same typelib GUID specified. You can resolve this conflict by clearing the check box next to the class in the COM Classes tab of the Project Properties dialog box, apply the changes, and then recheck the check box for the class. This will reassign the class as a COM class and specify the same typelib GUID.
Base name of class 'identifier' conflicts with another class in the same type library
A class was found that was defined already within the type library. This error usually occurs when a COM class is defined in one package, and a COM class, with the same name, in a different package are both being added to the same type library. Change the name of one of the classes being added to the type library so that the conflict is resolved.