Home : Common Visual Basic / Visual C++ / ASP Errors
Q30316 - ERRMSG: Common Visual Basic / Visual C++ / ASP Errors

Common Visual Basic / Visual C++ / ASP Errors

 
  1. VB: Run-time error '-2147221020 (800401e3)': Automation Error Invalid Syntax
  2. VB: Run-time error '-2147221020 (800401e4)': Automation Error Invalid Syntax
  3. VB / ASP: Run-time error '429': ActiveX component can't create object
    VC++: 0x80040154 (Class not registered)
  4. VB: Run-time error '-2147483644 (8000004)': Automation Error No Such interface supported
    VC++: 0x80000004
  5. VB: Run-time error '430': Class does not support Automation or does not support expected interface
  6. VB: Run-time error '5': Invalid procedure call or argument
  7. ASP: An exception of type 'unknown exception' was not handled.
  8. ASP: Error Type: Server object, ASP 0177 (0x800401F3) Invalid ProgID.

1. VB: Run-time error '-2147221020 (800401e3)': Automation Error Invalid Syntax

You will get this error if you are attempting to instantiate a Java object like this (where SomeJvmId has not been registered on this machine using the regjvm command):

Set o = GetObject("SomeJvmId:SomeJavaClass")

2. VB: Run-time error '-2147221020 (800401e4)': Automation Error Invalid Syntax

You will get this error if you are attempting to instantiate a Java object via Late Binding without including J-Integra's bin directory in PATH environment variable:

Set o = GetObject("SomeJvmId:SomeJavaClass")

3. VB / ASP: Run-time error '429': ActiveX component can't create object
VC++: 0x80040154 (Class not registered)

You will get this error if the JVM is not running, or not registered correctly, or if the Java class could not be instantiated. Start your JVM with logging enabled and direct it to System.err. When you run your VB client, look and see if the J-Integra runtime receives a connection from the VB client (logging text will be printed). If no connection is received (no logging text is printed), then either:

1) You may forget to run regtlb in Visual Basic / ASP accessing Java using early binding.

2) The jvmId used when you are calling com.linar.jintegra.Jvm.register("jvmId") is wrong

3) The port you specified when starting the JVM is wrong, or is already in use. You can see which port the J-Integra runtime uses when you have logging enabled:

OXID Resolver started. Listening on port XXXX

To list all ports that are currently used, run this command from command prompt:

netstat /a

4) You made a mistake when registering the JVM, either you specified the wrong JvmID, wrong host, or wrong port when invoking regjvm jvmId host[port] on the VB client machine.

5) The VB environment is very old, and does not support the "MyJvm:MyClass" parameter format to GetObject. A workaround is to use J-Integra's 'regprogid' command to map a progid to the JVM/class:

regprogid My.ProgId "MyJvm:MyClass"

Then in your code use:

GetObject("My.ProgId")

6) Make sure that the JDK specified in your PATH and CLASSPATH is the same JVM configured using the regjvm tool (i.e. no mismatch of JVMs). You can use the "Scan" button under regjvm's option "Native mode in process" to scan JVMs installed on your machine.

4. VB: Run-time error '-2147483644 (8000004)': Automation Error No Such interface supported
VC++: 0x80000004

You will get this error when using early-bound access to a COM object, and you attempt to invoke a method on that object. You have either not compiled the Java wrapper files generated by the 'java2com' tool, or they can not be loaded by the J-Integra runtime (jintegra.jar) because they are not in your CLASSPATH.

If you are using JDK1.2, you should not put the J-Integra runtime in the "ext" directory, since if it is in that directory it will unable to load classes in your CLASSPATH (such as the wrapper classes). Instead put the runtime in your CLASSPATH.

You can see this if you start the JVM with J-Integra logging turned on:

17:13:23+: J-Integra ObjectExporter0 received an unfragmented request with call ID 1
17:13:23+: There are 1 request handler threads, of which 0 are currently busy.
17:13:23+: Setting causalityId aa04701c-ef5f-11d2-8faf-204c4f4f5020 for thread Thread[J-Integra Request Handler number 0,5,main]
17:13:23 : IRemUnknown::RemQueryInterface received on java.awt.Button[button0,0,0,0x0,invalid,label=]
17:13:23+: Attempting to load class IID0f05e83c_00d7_1000_5001_c009c8780000Wrapper
17:13:23+: Failed to load interface wrapper ID0f05e83c_00d7_1000_5001_c009c8780000Wrapper: java.lang.ClassNotFoundException: IID0f05e83c_00d7_1000_5001_c009c8780000Wrapper
17:13:23+: Unsuccessful query interface for 0f05e83c-00d7-1000-5001-c009c8780000 on java.awt.Button[button0,0,0,0x0,invalid,label=]
17:13:23*: IRemUnknown::RemQueryInterface. Object with ipid 14a62c59-00d7-1000-500a-c009c8780000 (java.awt.Button[button0,0,0,0x0,invalid,label=]) does not support IID 0f05e83c-00d7-1000-5001-c009c8780000
17:13:23+: J-Integra ObjectExporter0 sending 88 bytes
17:13:23+: Clearing causalityId for thread Thread[J-Integra Request Handler number 0,5,main]

5. VB: Run-time error '430': Class does not support Automation or does not support expected interface

You will get this error if you didn't correctly set the CLASSPATH environment variable. For example, in the Visual Basic to Java early binding example, you may forgot to included:\pure\vbeb\dcomawt into CLASSPATH.

6. VB: Run-time error '5': Invalid procedure call or argument

You will get this error in the Visual Basic to Java early binding example if the Main.java is not running or Main.java does not invoke:

com.linar.jintegra.Jvm.register("dcomawt");

7. ASP: An exception of type 'unknown exception' was not handled.

If you get this error in ASP-to-Java Native Mode In-process, you could have updated PATH and CLASSPATH environment variables through user variables, but was running the application as a different user. You should update PATH and CLASSPATH through system variables (Settings -> Control Panel -> System -> Advanced -> Environment Variables... -> System variables)

8. ASP: Error Type: Server object, ASP 0177 (0x800401F3) Invalid ProgID.

You will see this error message displayed on the browser if you use Server.CreateObject in your ASP page, but passed a wrong ProgID or forgot to use regprogid to register a ProgID. An alternative code is to use GetObject instead of Server.CreateObject.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 7/10/2006.
Last Modified by No Author Name Available!.
Article has been viewed 28103 times.
Rated 5 out of 10 based on 35 votes.
Print Article
Email Article