1 2 Previous Next 19 Replies Latest reply on Jan 20, 2004 7:32 PM by 843804

    Run-time error '430'

    843804
      Hi Folks!

      I am using the packager of JDK 1.4.2 but when I try to use a class created by it I get the following error:

      Run-time error '430'
      Class does not support Automation or does not support expected interface

      Does anyone know what could be wrong? It's a simple Javabean with getters and setters.
        • 1. Re: Run-time error '430'
          843804
          A little more detail would be helpful. Are you using it from VB, PB, C++? Are you using it as a Control or as an Object? How are you instantiating it, etc.?
          • 2. Re: Run-time error '430'
            843804
            My enviroment is the following:
            - JDK 1.4.2
            - VC++ 6 and VB 6 with SP5
            - Windows 2000 with all SP's and patches

            The command to make the activex is that (the JRE_HOME env variable is correctly set):

            packager -clsid {D824B185-AE3C-11D6-ABF5-00B0D07B8581} -out %JRE_HOME%\axbridge\bin -reg c:\dev\com\filial.jar br.com.inflor.sif.AraFiliales

            My class is that:

            package br.com.inflor.sif;

            public class AraFiliales implements java.io.Serializable
            {
                 private java.lang.String abrev;
                 private java.lang.String cdFilial;
                 private java.lang.String nomFilial;
                 private java.lang.Double supFilial;
            public AraFiliales() { }
            // the rest are only getters and setters...
            }

            I've created a simple application in VB6:

            Private Sub Command1_Click()
            Dim p As New AraFiliales.AraFiliales
            p.setAbrev "test"
            p.getAbrev
            End Sub
            • 3. Re: Run-time error '430'
              843804
              The only way I have been able to get the bridge to run, is to add the active-x bean to a form, not declaring it in the code. I received the same error you did when I declared my bean in code.
              • 4. Re: Run-time error '430'
                843804
                Is it the only way? I want to pack several classes for database access, but none of them is to be viewed. Only classes for manipulating data.
                What kind of approach do I have?
                • 5. Re: Run-time error '430'
                  843804
                  Are you dropping the generated bean on a form or are you doing
                  Set objJava = new AraFiliales.AraFiliales

                  If so, that is the cause of your problems. The new bridge, it seems, only works as an ActiveX CONTROL, not a non visual object.

                  People have, however, reported being able to make it work using late binding...

                  Set objJava = CreateObject("AraFiliales.Bean.1")

                  Hope this helps.
                  • 6. Re: Run-time error '430'
                    843804
                    Yeah! It did help a lot! :)
                    Thanks!!! If I still had duke dollars you would earn it. ;)
                    • 7. Re: Run-time error '430'
                      843804
                      People have, however, reported being able to make it
                      work using late binding...

                      Set objJava = CreateObject("AraFiliales.Bean.1")
                      That doesn't seem to work if your bean generates events. I have:

                      Private o As Object
                      Private WithEvents myBean As MyBean.MyBean
                      ...

                      Set o = CreateObject("MyBean.Bean")
                      Set myBean = o

                      The object creation works OK, but the assignemt to myBean fails with a run-time error 13 - Type Mismatch.

                      Does anyone have any ideas?

                      Thanks,
                      David
                      • 8. Re: Run-time error '430'
                        843804
                        work using late binding...

                        Set objJava = CreateObject("AraFiliales.Bean.1")
                        That doesn't seem to work if your bean generates
                        events. I have:

                        Private o As Object
                        Private WithEvents myBean As MyBean.MyBean
                        ...

                        Set o = CreateObject("MyBean.Bean")
                        Set myBean = o

                        The object creation works OK, but the assignemt to
                        myBean fails with a run-time error 13 - Type
                        Mismatch.

                        Does anyone have any ideas?
                        I have the same problem.
                        Accessing to props and methods is OK, but never catch events.

                        I want some good examples...
                        • 9. Re: Run-time error '430'
                          843804
                          I have the same problem.
                          Accessing to props and methods is OK, but never catch
                          events.

                          I want some good examples...
                          I'm also running into problem with capturing events generated by the Java bean from Javascript. (Please see my post dated 11/26)
                          I hope SUN can provide some clarifications on the issue. Specially the Calendar example provided by SUN. That example seems to exchange events.

                          Using ActiveX Test Container Application, I can actually see the event being captured and parsed by the client. However I could not make it work for Javascript.


                          ActiveX Bridge TEAM: Please clarify if there are issues with scripting the JavaBean ActiveX control events.
                          • 10. Re: Run-time error '430'
                            843804
                            There is a new bug against this problem, see the URL
                            http://developer.java.sun.com/developer/bugParade/bugs/4964563.html
                            • 11. Re: Run-time error '430'
                              843804
                              I have an even more strange problem. I have a JavaBean with no user interface at all that I want to call from VB. I'm using JDK 1.4.2 and have done

                              packager.exe -clsid {4ccdcc47-9eac-48a0-a4bf-5863d7d8f3d1} -out "C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\axbridge\bin" -reg c:\dokument\prog\FreeCBR\dist\lib\FreeCBR.jar FreeCBR.CBR

                              and when I do
                              Dim c As Object
                              Set c = CreateObject("CBRCtl.CBR")
                              I get an 429 error "ActiveX component can't create object". If I try to add it as an ActiveX control to the form, in the moment when I try to add it it throws an error "Instruction on xxxxx referenced "0x00000000"". The same thing when I try to do the
                              Set c = CreateObject("CBR.Bean.1")
                              trick.

                              Does anyone have any idea??? Would it work if I tried the old JDK 1.3 packager??
                              • 12. Re: Run-time error '430'
                                843804
                                I found out what was the problem. I installed the new NetBeans IDE/J2SE 1.4.2 cobundle, and it installs a JRE 1.4.2 but the JRE is not added in the registry. Is that a bug?? Anyway, the registry points to the old 1.4.1 JRE but I added the axbridge files to the 1.4.2 JRE.
                                I tried the same thing on a separate installation with only JDK 1.4.2 (which installed JRE 1.4.2 properly) and it worked.
                                • 13. Re: Run-time error '430'
                                  843804
                                  There is a new bug against this problem, see the URL
                                  http://developer.java.sun.com/developer/bugParade/bugs/4964563.html
                                  The bug was marked fixed however it seems it is tagged for release in Tiger-beta.
                                  Does it mean the Active Bridge is essentially in-operable, for scripting, till J2SDK 1.5?



                                  • 14. Re: Run-time error '430'( Alpha 1.5.0: Any Luck??)
                                    843804
                                    I tried to use packager.exe to generate ActiveX bridge using Alpha release of the 1.5.0. I was however unable to any of invoke methods on activeX, with the help of MS visual studio ActiveX Control Test Container Application. (The method invocation works all right with 1.4.2_xx generated activex control DLL).

                                    Did any one get chance to try hands on the alpha 1.5.0; supposed to have fix for early binding issues with activeX controls?

                                    Suraj
                                    1 2 Previous Next