PRB: Cannot Call Static and Overloaded Methods from ASP (250538)
The information in this article applies to:
- Microsoft virtual machine
This article was previously published under Q250538 SYMPTOMS
When you try to call static and/or overloaded methods of a Java class that is registered as a Java COM object from Active Server Pages (ASP) or a Microsoft Visual Basic Scripting file, you may receive the following errors:
For a static method:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'staticMethod'
For an overloaded method:
Microsoft VBScript runtime error '800a000d'
Type Mismatch:'OverLoadedMethodName'
NOTE: The overloaded method has the same method name and the same number of parameters but has different parameter types.
In some cases, you may not receive an error message, but you may notice that only one of the overloaded methods is being called.
CAUSE
For static methods, this problem occurs because static methods are not exposed through the Auto-IDispatch feature.
For overloaded methods, this problem occurs because the Microsoft virtual machine (Microsoft VM) for Java only differentiates between overloaded methods by number of parameters; it does not differentiate based on parameter types. When the overloaded method has the same number of parameters, the Microsoft VM chooses to expose the last method in the .class file through the Auto-IDispatch feature.
STATUS
This behavior is by design.
REFERENCES
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 6/14/2006 |
---|
Keywords: | kbJava kbprb KB250538 |
---|
|