COM+ and ActiveX bridge vs earlier bridge

Any help would be appreciated.
Looks like we may be having a problem with the following...
1. ASP page accesses (2)
2. VB component registered as COM+ which calls on instances of (3)
3. Java classes registered using previous COM (javareg.exe)
We're getting (sproadically) marshalling problems.
0x8001010E is the error we're seeing. Text is:
Automation error The application called an interface that
was marshalled for a different thread.
Any ideas? Could the new ActiveX bridge resolve this?

Okay, I might as well update this problem.
The marshalling problems were solved by changing the COM+ threading settings for that VB app to "REQUIRES_NEW" to force a new context for each instance. Otherwise, the stupid COM+ components want to "share" each other's instances... That solved that problem.

Similar Messages

  • Problems with context in JAXB and ActiveX bridge

    Hello!
    I'm using Java ActiveX Bridge for accesing from Navision to a digital invoice API developed by spanish Industry, Commerce and Tourism Department.
    I successfully executed the invoice creation process from a standalone java application. However, it doesn't work through activex bridge.
    I suspect the problem is probably related to a classloader woe. Here's the first code snippet I used:
      public static void marshal(es.mityc.facturae31.Facturae paramFacturae, String paramString)
        try
          logger.info("Loading context es.mityc.facturae31");
          JAXBContext localJAXBContext = JAXBContext.newInstance("es.mityc.facturae31");
          logger.info("Creating marshaller"); The obtained exception is:
    java.lang.NullPointerException
         at javax.xml.bind.ContextFinder.find(ContextFinder.java:279)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
         at es.mityc.facturae.utils.MarshallerUtil.marshal(MarshallerUtil.java:85)
         at com.mailgrafica.navifacturae.Facturae31.firmar(Facturae31.java:3153)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.BeanDispatchImpl.invoke(Unknown Source)Then, I changed code to make sure the context creation method receives a classloader which loads classes from appropiate jar file (Facturae-API.jar):
          URL[] urls = { new URL("file:///c:/Archivos de programa/Java/jre6/axbridge/lib/Facturae-API.jar"),
                    new URL("file:///c:/Archivos de programa/Java/jre6/axbridge/lib/lib/jaxb-api.jar"),
                    new URL("file:///c:/Archivos de programa/Java/jre6/axbridge/lib/lib/jaxb-impl.jar"),
                    new URL("file:///c:/Archivos de programa/Java/jre6/axbridge/lib/lib/jsr173_1.0_api.jar")};
          ClassLoader oldcloader = Thread.currentThread().getContextClassLoader();
          URLClassLoader cloader = new URLClassLoader(urls, oldcloader);
          Thread.currentThread().setContextClassLoader(cloader);
          logger.info("Created URLClassloader");
          logger.info("Loading context es.mityc.facturae31");
          JAXBContext localJAXBContext = JAXBContext.newInstance("es.mityc.facturae31", cloader);
          logger.info("Creating marshaller");
          Marshaller localMarshaller = localJAXBContext.createMarshaller();
          FacturaeNamespacePrefixMapper localFacturaeNamespacePrefixMapper = new FacturaeNamespacePrefixMapper();
          localMarshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", localFacturaeNamespacePrefixMapper);
          FileOutputStream localFileOutputStream = new FileOutputStream(paramString + ".xsig");
          logger.info("Starting the marshal process");
          System.out.println("Starting the marshal process");
          localMarshaller.marshal(paramFacturae, localFileOutputStream);  // Exception now is produced here.  Now the exception is:
    javax.xml.bind.JAXBException: class es.mityc.facturae31.Facturae nor any of its super class is known to this context.
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:556)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:478)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:257)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
         at es.mityc.facturae.utils.MarshallerUtil.marshal(MarshallerUtil.java:92)
         at com.mailgrafica.navifacturae.Facturae31.firmar(Facturae31.java:3153)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.BeanDispatchImpl.invoke(Unknown Source)Could anybody help me? Thanks in advance.

    According problem 1: this is not normal behavior and you could try first to restart Bridge holding down option key to reset the preferences.
    But if you experience this also on the server I don't know if this solutions works. And according to problem 2, you should open a case on Adobe support using the little contact button top right on this page, not many users (including me) of this forum are using a server or know a lot about of that workflow :-(
    You could try a forum search also on the word server (Search for forum only works when you are on the mainpage with al the post for Bridge for some strange reason...)

  • Catching Events from Com side using ActiveX bridge

    Hi,
    I have packaged a java swing application into an activex control using the ActiveX bridge. I now need to be able to fire events from my java code which the com/VB code needs to be able to trap. The event handler on the com side looks like this: function(BSTR param1, BSTR param2, BSTR param3), but the java event model only allows passing the EventObject in the param for the introspector to work. How do I fire an activex event that the com client is able to trap??

    Thanks, beders. Your solutions above works, although I found the only way to install the SDK was to the use following URL rather then the one beders suggested:
    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
    This SDK is the full one and not just the Core SDK so may take a little longer to download.
    You also need to ensure that the location to cmd.exe (ie. C:\WINDOWS\system32) is on the path variable otherwise SetEnv.bat fails when it calls cmd.
    J

  • I use Adobe Photoshop Elements and Adobe Bridge. Do these come in a package together?

    I'm going to update my current set up. I use Adobe Photoshop Elements and Adobe Bridge. Do these come in a package together? What would be the best way to go about this upgrade?

    Bridge comes with Photoshop but not with Elements.

  • Does RM29.90 per month photography package with photoshop and lightrooms come with Adobe bridge app as well?

    Does RM29.90 per month photography package with photoshop and lightrooms come with Adobe bridge app as well?

    Does RM29.90 per month photography package with photoshop and lightrooms come with Adobe bridge app as well?

  • Nd help configuring JMS Bridges between COM and SOM

    We skip the JMS Bridge between SOM and COM because we deploy the O2A cartridge using the:
    - When Central Order Management and Service Order Management Exist in the Same
    OSM Instance in a Non-Cluster Environment.
    - Customer and Service Order Management in the Same OSM Instance
    "Deploy the following cartridges through Design Studio for the simple fulfillment
    topology"
    Now what happening is: the flow of the order taking time before it was completed or need manually submit the task using oms-automation user.
    But even with the above work around we cannot see the billing data in BRM.
    UpdateSalesOrderSiebelCommsProvABCSImpl (v. 1.0) this is the last BPEL process we see in BPEL.
    FulfillBillingFunction.BRM-ALL.BundleGranularity.FulfillBillingSignificantUpdates is the last Activity we can see in osmwebui if not manually update the task.
    Then ProvisionOrderSIResponseTask is the current task in osm task web client where order state is In-Progress.
    With that it seems the SOM is not processing.
    Do you have any idea why we can't complete the order and see the billing data in BRM?
    Is'it the COM and SOM not properly configured, or have some issue with other application(RODOD)?
    Thanks,
    Ace

    Hi All,
    This issue already resolve by configuring the routing in AIA.

  • Configuring JMS Bridges between COM and SOM

    Hi,
    We started working on OSM 7.0.2 and I have a question about the configuration of JMS Bridges between COM and SOM.
    When COM and SOM Cartridges are installed in the same OSM instance on non-cluster env., it is mandatory to configure JMS Bridges between COM and SOM?
    If it is case, could you please detail the procedure to follow?
    In the document called "Application Integration Architecture Order-to-Activate Cartridge Guide Release 7.0.2 E18005-01" it is not obvious to understand. If you have a look in the table 2-1 page 2-15, I don't see all the mandatory field values to create a new destination bridges (for instance, what is the value of destination JNDI name?). Does anyone configure this part in the setting up OSM to the Order-to-Activate Solution?
    Best regards.

    The COM-SOM bridge is only required when COM and SOM are deployed on separate osm server instances and AIA Emulators are deployed (on both) for development/demo/quick testing purposes.
    In QA/SIT/PRODUCTION environments, OSM should be integrated via AIA, this means that all participant applications ( CRM , OSM-COM, OMS-SOM, BRM ) should be using queue bridges (or SAF in 7.0.3)

  • Tapeless workflows and Sandy Bridge or other PC's: KISS or LOVE?

    Tapeless workflows and Sandy Bridge or other PC's: KISS or LOVE?
    Life used to be so simple when shooting video on a tape based camera. You shot your material, captured it for editing and stored your precious original footage on tape in a safe and dry place. Sure, it took time to capture, but the big advantage was that if you had a computer or drive failure, you would still have the original tape so everything could be recreated.
    Now with tapeless workflows we have the significant advantage of much faster import of the original footage. Connect the flash card or disk drive to the computer over USB and copy the data to a HDD on the computer, ready for editing. The data on the flash card or disk drive can then be erased, so you can reuse it for more shots. But, like Johan Cruyff has said repeatedly, every advantage has its drawback. In this case it simply means that you no longer have the original material to fall back on, in case of computer or drive failures. That is a very unpleasant and insecure feeling.
    The easy anwser to that problem is backups. Backup of the original media, backup of projects and backup of exports. This often means a bundle of externals for backup or NAS configurations. One thing is clear, it requires discipline to make regular backups and it costs time, as well as a number of disks. Four as a minimum: 1 for media, 1 for exports and at least 2 for projects. Note: This is excluding a backup drive for OS & programs.
    There are different backup strategies in use. Some say backup daily and use one disk for monday, one for tuesday, and so on.  Others say one disk for the first backup, the second for the second backup, then the first again for an incremental backup, etc. and once weekly a complete backup on a third disk. Whatever you choose, be aware that shelf live of a disk is far less than tape. There are horror stories everywhere about ball-bearings getting stuck after some time and without original tapes, you better be safe than sorry, so don't skimp on backups.
    What is the relevancy of all this? I thought this was about Sandy Bridge and other PC's.
    It is and let me try to explain.
    Card based cameras are for the most part DSLR and AVCHD type cameras, and we all know how much muscle is required to edit that in a convenient way. Adobe suggests in the system requirements to use raid configurations for HD editing and practice has shown that raid arrays do give a significant performance boost and improve responsiveness, making for a nicer editing experience. The larger the project and the longer the time-line, the more a raid array will help maintain the responsiveness.
    One thing you would not do is using a raid0 for projects, media and exports, even if you have backups. The simple reason is that the chance of disk failure multiplies by the number of disks in the raid0. Two disks double the chance of disk failure, three disks triple the chance, four disks quadruples the chance, etc.
    Remember: Disaster always strikes when it is most inconvenient.
    Imagine you have been working all day on a project, you decide to call it a day and to make your daily backup, but then the raid fails, before you made your backup. Gone is all of today's work. Then take into consideration the time and effort it takes to restore your backups to the state it was in yesterday. That does not make you happy.
    Another thing to avoid is using a software or mobo based parity raid, for the simple reason that it is slooowww and puts a burden on the CPU, that you want to use for editing, not house keeping.
    For temporary or easily recreated files, like the page-file, media cache, media cache database and preview files, it is very much advised to use a raid0. It makes everything a lot snappier and if disaster strikes, so what? These are easily recreated in a short time.
    This was a general overview of what is required with tapeless workflows. Now let's get down to what this means in terms of system design.
    Two approaches or train of thoughts
    KISS: Keep it stupidly simple or LOVE: Laughing over video editing
    The first one, the most economic one, is to use a system with 3 or 4 disks internally and 4 or more backup disks.
    A typical disk setup can look like this:
    This is a perfectly sensible approach if one does not have large or complex projects, long time-lines and is willing to take the risk of occasionally losing a whole days work, between backups. Many hobbyists and consumers fall in this category.
    The KISS approach keeps it stupidly simple. The drawback is that there is no logical way to add more disks or storage. The discipline, diligence and effort required for regular backups make it far from a laughing matter. In fact it can quickly become a bore. Add to that the fact that the disk setup is simple but not very fast, so less suited for situations where lots of clips are involved, multi-cam is a regularly recurring situation or lots of video tracks are involved.
    A number of video editors want more from their system than the occasional platonic KISS, they want to really LOVE their system, which lead to the other train of thought.
    This is more costly than the KISS approach, but you all know a fiancée or wife is more costly and dear than the occasional kiss on the cheek by an old friend.
    Let's start with a typical disk setup. It may look like this:
    Two striking differences in comparison to the KISS approach:
    1. Much easier disk organization and more disks and thus more space.
    2. It requires a hardware raid controller, causing a higher investment cost. It is like an engagement ring. You don't get LOVE for free, one of the guiding principles of the oldest trade in the world.
    These are easy statements to make, but what are the benefits or advantages, that you would fall in LOVE with such a system, and what are the drawbacks? Think back to Johan Cruyff's adage.
    The only drawback is cost. The advantages are multiple, easier organization, more speed, more storage, snappier editing, no jerkiness, lesser requirements for regular backups and - this is the major benefit - hardly a chance of losing a day's work in case of a drive failure. Keep in mind that a parity raid keeps all your data intact in case of a drive failure, so lessens the need for up-to-date backups.
    We all know, we get what we pay for: "If you pay peanuts, you get monkeys. OTOH, if you pay money to monkeys, you get rich monkeys". But in this case you get what you pay for, a much better editing experience with a much easier workflow.
    Using a parity raid (be it raid 3/5/6/30/50/60) you get security, ease of mind that you are protected against losing precious media, that you need not worry about the last time you made a backup, that the editing you did today may be lost and you save valuable time editing and a lot of aggravation because of a much more responsive system.
    How does this all relate to Sandy Bridge and other PC's?
    First of all, the price difference between a Sandy Bridge / P67 platform and an i7-950+ / X58 platform is very small. Of course the new architecture is slightly more expensive than the older one, but the differences are small, almost not worth talking about.
    So what are the differences? Look below:
    The first thing to keep in mind is that the Sandy Bridge is the successor of the i7-8xx CPU and as such it is much more evolutionary than revolutionary. The CPU power has increased significantly over the i7-8xx due to new architecture and a smaller production process (32 nm), but in essence all the capabilities have remained unchanged. Same memory, same PCI-e lanes, same version, same L3 cache and no support for dedicated raid controllers.
    It is great that the processor performs much better than the older i7-8xx CPU's, almost achieving the level of the i7-9xx range of processors, but is still limited:
    The Sandy Bridge is unsuitable for anything more than a KISS system.
    Why? Because it lacks the required PCI-e lanes to accomodate more than a 16 x PCI-e nVidia card with CUDA support to enable hardware MPE acceleration and the integrated graphics are not supported by CS5.
    You may wonder if that is a bad thing. The plain and simple anser is NO. It is a great processor, it delivers great value for money, is a solid performer, but it has its limitations. Intel had a reason to position this CPU as a mid-level CPU, because that is what it is, a mid-level performer in comparison to what is to come.
    The term mid-level performer may seem strange when compared to the old generation of i7-9xx CPU's, because they perform almost equally well, but keep in mind that there is a generation difference between them.
    So what about the i7-9xx and X58 platform?
    It still is going strong. About the same performance as a Sandy Bridge, with only the much more expensive hexa-cores clearly in the lead, both performance and price wise. The quad cores deliver about the same value for money.  The main difference however is the platform that allows a dedicated raid controller to be installed, thus making it the platform of choice for those who want to go from a passing KISS to true LOVE.
    And what lies ahead?
    Sandy Bridge E on the Waimea platform (X68). Now that is revolutionary. More than double almost everything a processor can offer: double the cores, double the PCI-e lanes, triple the memory, more than double the L3 cache, increase the PCI-e support from 2.0 to 3.0, etc...
    This is why Intel calls this a high-end CPU / platform.
    So what now?
    If you prefer a KISS approach, choose either a Sandy Bridge/P67 or an i7-950+/X58 platform.
    If you wonder whether in the future you may need multi-cam more frequently, edit more complex projects and longer timelines or even progress to RED, look at KISS/LOVE solutions, meaning the i7-950+/X58.
    If you can't have downtime, time pressure is high, delivery dates to clients are critical or you edit highly complex projects, lots of multi-cam situations or lengthy time-lines, choose a LOVE solution, an i7-950+/X58 platform.
    If you have the time to wait till Q4/2011, Sandy Bridge E/Waimea looks to be worth the wait.
    Hope this gives you some more insight into recent and future developments and helps you make wise investment decisions.

    I'm upgrading from an AMD 3800+, cutting with Vegas 7 Pro. Usually shoot DSLR or HDV, sometimes P2, EX or RED. I have ridiculously cheap access to Macs, FCP/FCS, all kinds of software.
    I've been agonizing over this for the last month, was originally hoping the UD7 mobo was the solution, read the read about the NF200/PCIe issue a few days ago, http://www.dvinfo.net/forum/non-linear-editing-pc/489424-i7-980x-now-wait-sandybridge-2.ht ml- and still decided to go for a 2600k. 
    My preference is to treat my video footage the same way as my digital imagery: I make (at least) duplicate back ups of everything before reformatting the cards, never delete the back ups, and only worry about the day-to-day stuff at night. Unless I'm rendering or involved in other long processes, in which case I'll back up the work in process the next day. If I am under a really really tight deadline I might back up as I go.
    Yes, a RAID might make it easier, but I'm paranoid enough to prefer a slower, safer backup. You can always duplicate, and usually improve upon, a days work, but you can never get back original footage you lost. I have only ever had one hard drive die on me (a few enclosures crapped out, though)- it took a couple of (mostly unattended) hours to rectify. As a matter of act, I've had far more loss/damage from tapes than from hard drives.
    I ordered the UD7, 2 F4s and 4 F3Rs, understanding I will probably want to upgrade to SBE when it comes out, or maybe next year. The 2600k/mobo/RAM will likely hold its value better than a 950/X58, likely because of the marketplace as much as merit.
    The UD7 / RAID card issue is in it's early days, there may be a solution/mitigation. Probably not. But if I really really need a RAID card, then I probably really really need a 980, NAS, etc etc.
    But Harm still rocks!

  • Does the ActiveX Bridge work if not C++ installed?

    I've been reading the ActiveX Bridge developer guide at
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    and it seems that you must have Visual C++ installed to run the packager.exe to create a dll. I kind of wasn't sure whether to believe that so I tried the Person tutorial (thanks scsi-boy) at
    http://www.reallyusefulcomputing.com/java/activex/tutorial.php
    and tried tweaking it to use the new 1.4.2 packager but I got the error
    C:\j2sdk1.4.2\bin>packager -reg c:\PersonBean.jar Person
    Failed to generate type library, missing midl.exe.which gives me the idea that I really do need C++ installed to run this (I'm guessing midl.exe is part of C++) - bit of downer when we only have VB.
    Can this really be true? Have any VB people got it working out there?

    packager.exe depends on the tools available with Visual C++, and therefore you must have it installed to make the packager work. Visual C++ IS NOT required to execute the bean, only to run the packager.exe.

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Interfacing problems using the Activex Bridge

    I have a bean that's based on a JPanel. I am packaging it and then using it in Visual Basic as an OCX component.
    I have to adhere to an interface on the VB side so that the bean will plug into the rest of our product.
    I'm hitting several problems, all of which I'm attributing to to the fact that the packager introspects the interface for the typelib instead of asking me what I want to expose and how I want to expose it.
    1) Getter/Setter methods for properties which contain additional attributes arent recognised as such.
    e.g. for property foo:
    public int getFoo() is fine
    but
    public int getFoo(int extraCriteria) doesn't work.
    The packager doesn't recognise it as a valid getter and so doesn't bind it to Foo in the typelib.
    NB: I've also tried explicitly binding the methods in the bean's beanInfo, (using PropertyDescriptors), but to no effect.
    2) Typelib is only generated for the top level bean so how do I provide a similar interface for any java object that it returns?
    Any java objects that I return from methods in my bean cannot be interfaced:
    Therefore I have to deal with them all as VB Object and I'm also back to square one with my getFoo instead of "= Foo" problem.
    3) The packager arbitrarily listens to, and exposes, any events that my class throws. This includes events that are fired from any of the classes that I'm extending. Therefore I'm getting 20+ events showing up from my JPanel on the VB side, NONE of which I'm interested in. When the packager finds an event firing method it automatically exposes it AND registers the activex bridge as a listener of it. Again this is a case of the packager introspecting instead of asking the programmer what they want to expose...
    Basically I need help in either a) solving these specific problems, or b) coming at it from the opposite end and finding a way of getting control over what is exposed to VB. (Although this doesn't help me with problem 2)
    Any suggestions?
    Cheers
    Paul James

    See inline
    >
    I have a bean that's based on a JPanel. I am packaging
    it and then using it in Visual Basic as an OCX
    component.
    I have to adhere to an interface on the VB side so
    that the bean will plug into the rest of our product.
    I'm hitting several problems, all of which I'm
    attributing to to the fact that the packager
    introspects the interface for the typelib instead of
    asking me what I want to expose and how I want to
    expose it.Did you make sure that you marked the bean in the jar
    correctly? (The manifest.mf must declare the bean as bean
    so that the corresponding bean info can be found in the same jar)
    >
    1) Getter/Setter methods for properties which contain
    additional attributes arent recognised as such.
    e.g. for property foo:
    public int getFoo() is fine
    but
    public int getFoo(int extraCriteria) doesn't work.
    The packager doesn't recognise it as a valid getter
    and so doesn't bind it to Foo in the typelib.
    NB: I've also tried explicitly binding the methods in
    the bean's beanInfo, (using PropertyDescriptors), but
    to no effect.That might be a COM restriction? IN that prop get and prop put
    have to have a certain signature. If your method is public
    and part of the bean info, then you should at least have the method.
    (That always worked for me...)
    >
    2) Typelib is only generated for the top level bean so
    how do I provide a similar interface for any java
    object that it returns?Run the packager over all additional beans.
    >
    Any java objects that I return from methods in my bean
    cannot be interfaced:
    Therefore I have to deal with them all as VB Object
    and I'm also back to square one with my getFoo instead
    of "= Foo" problem.Once you start with your first bean, all subsequent objects
    you receive from your first bean can be analyzed via the
    java reflection mechanism on the VB side. Somewhere in the
    documentation for the ActiveX Packager, there is sample code
    on how to do this (how to get the class, find a method, invoke the
    method, create new objects for some other class, pass it to your bean
    etc).
    >
    3) The packager arbitrarily listens to, and exposes,
    any events that my class throws. This includes events
    that are fired from any of the classes that I'm
    extending. Therefore I'm getting 20+ events showing
    up from my JPanel on the VB side, NONE of which I'm
    interested in. When the packager finds an event
    firing method it automatically exposes it AND
    registers the activex bridge as a listener of it.
    Again this is a case of the packager introspecting
    instead of asking the programmer what they want to
    expose...The reason is that VB only knows one event interface (
    marked as dispinterface). This interface has to contain all
    events for the bean. I suppose the packager just goes and
    collects all events it finds for the bean, including all the
    inherited ones. The bridge has to be registered for all of them,
    otherwise no event could pass through.
    >
    Basically I need help in either a) solving these
    specific problems, or b) coming at it from the
    opposite end and finding a way of getting control over
    what is exposed to VB. (Although this doesn't help me
    with problem 2)
    Any suggestions?
    Cheers
    Paul James

  • Running the ActiveX Bridge examples

    I have just tried to download the examples and run them in JDK 1.4.2_06. Both the examples registered fine. Unfortunately, I get a very unhelpful message from Windows XP when I run the executable that the executable has to close before anything else happens. I have tried searching the forums for an error like this, but have seen nothing.
    Does anyone know why the documentation for the ActiveX bridge is so miniscule and incomprehensible? I wonder why they released it, if they're not going to document it properly.
    My eventual requirement (if I can get a proof-of-concept working) is to call Java from .NET code. Has anyone made this work, and if so, would you mind sharing hints? I'm very strong on the Java side, but it's been a long time since COM in school.
    Thanks!

    I also had a hard time to finally get my own bean running as expected. I call my Java objects from within Visual Basic. Post your error messages/exception stack traces so we may help you.

  • Which ActiveX bridge actually works????

    Hi all,
    i have really simple question...I have been looking for the proper ActiveX bridge really long time....I just wana to integrate ActiveX display component into the JAVA SWING API....Most suitable for this purpose seems to be IBM Bridge2Java...But actually it is not working, this bridge still crashes on this exception...
    com.ibm.bridge2java.ComException: Bad return code from Invoke().
    Please does anyone have any experiences with the Bridge2Java product or does anyone know any other better ActiveX bridges ????????
    Message was edited by:
    JCDenton

    Sun's ActiveX Bridge. Basically, the host is not seeing my bean properties. I have standard getters and setters. This is from an IDL from a C++ client and I need my java code to produce an equivalent property access.
    Please help. I'm really stuck on this.
    [propget, id(1), helpstring("property Version")] HRESULT Version([out, retval] LONG* pVal);

  • Problem calling java from vb via activex bridge

    I am trying to call java from vb via ActiveX Bridge and I am running into problems. I would appreciate any help.
    I am using Visual Basic 2010 express, and Java JDK 1.6.0_16. I have used the http://download.oracle.com/javase/1.4.2/docs/guide/beans/axbridge/developerguide/index.html page as a guideline. To try to make it work I took the following steps:
    1. Wrote a very simple java class (below):
    package xxx;
    import java.io.Serializable;
    public class axb implements Serializable {
    public int get_axb_Handle() {
    int Address = 12345678;
    return Address;
    2. After I compiled, and created the jar file. I built the dll using the following command:
    "C:\Program Files\Java\jdk1.6.0_16\bin\packager" -out "C:\Program Files\Java\jdk1.6.0_16\jre\axbridge\bin" E:\axb\dist\axb.jar xxx.axb
    3. I then registered using: regsvr32 axb.dll
    4. In Visual Basic Express IDE I use Project -> Add Reference to add Iterop.axb (dump below), and axb namespace
    5. In my basic code I use the following lines
    Dim axb1 As axb.axb
    axb1 = New axb.axb <== Crash here with AccessViolationException ( full exception below)
    What am I missing? Any help would be greatly appreciated
    Thanks
    Iterop.axb partial dump
    ___[MOD] C:\Documents and Settings\Elie A. Cohen.USINC022\My Documents\Visual Studio 2010\Projects\Repo API Example\Repo API Example\obj\x86\Release\Interop.axb.dll
    | M A N I F E S T
    |___[NSP] axb
    | |___[INT] axb.axb
    | | | .class interface public abstract auto ansi import /*02000006*/
    | | | implements axb.axbDispatch/*02000003*/
    | | | implements axb.axbSource_Event/*02000005*/
    | | | .custom /*0C000018:0A000001*/ instance void [mscorlib/*23000001*/]System.Runtime.InteropServices.GuidAttribute/*01000002*/::.ctor(string) /* 0A000001 */ = ( 01 00 24 34 45 36 44 30 44 41 38 2D 36 41 45 44 // ..$4E6D0DA8-6AED ...
    | | | .custom /*0C000019:0A000007*/ instance void [mscorlib/*23000001*/]System.Runtime.InteropServices.CoClassAttribute/*01000009*/::.ctor(class [mscorlib/*23000001*/]System.Type/*01000007*/) /* 0A000007 */ = ( 01 00 0C 61 78 62 2E 61 78 62 43 6C 61 73 73 00 // ...axb.axbClass. ...
    | |
    | |___[CLS] axb.axbClass
    | | | .class public auto ansi import /*02000004*/
    | | | implements axb.axbDispatch/*02000003*/
    | | | implements axb.axb/*02000006*/
    | | | implements axb.axbSource_Event/*02000005*/
    | | | .custom /*0C00000F:0A000008*/ instance void [mscorlib/*23000001*/]System.Runtime.InteropServices.ClassInterfaceAttribute/*0100000A*/::.ctor(int16) /* 0A000008 */ = ( 01 00 00 00 00 00 ) ...
    | | | .custom /*0C000010:0A000009*/ instance void [mscorlib/*23000001*/]System.Runtime.InteropServices.ComSourceInterfacesAttribute/*0100000B*/::.ctor(string) /* 0A000009 */ = ( 01 00 0F 61 78 62 2E 61 78 62 53 6F 75 72 63 65 // ...axb.axbSource ...
    | | | .custom /*0C000011:0A000001*/ instance void [mscorlib/*23000001*/]System.Runtime.InteropServices.GuidAttribute/*01000002*/::.ctor(string) /* 0A000001 */ = ( 01 00 24 43 44 42 46 36 42 33 33 2D 45 32 33 46 // ..$CDBF6B33-E23F ...
    | | | .custom /*0C000012:0A000002*/ instance void [mscorlib/*23000001*/]System.Runtime.InteropServices.TypeLibTypeAttribute/*01000003*/::.ctor(int16) /* 0A000002 */ = ( 01 00 02 00 00 00 ) ...
    | | |___[MET] method .ctor : void()
    | | |___[MET] method equals : bool(object)
    | | |___[MET] method getClass : object()
    | | |___[MET] method get_axb_Handle : int32()
    | | |___[MET] method hashCode : int32()
    | | |___[MET] method notify : void()
    | | |___[MET] method notifyAll : void()
    | | |___[MET] method toString : string()
    | | |___[MET] method wait : object(object,object)
    AccessViolationException exception
    System.AccessViolationException was unhandled
    Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    Source=mscorlib
    StackTrace:
    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
    at System.Activator.CreateInstance(Type type, Boolean nonPublic)
    at System.Activator.CreateInstance(Type type)
    at WindowsApplication1.Form1.getPatientHandle_Click(Object sender, EventArgs e) in C:\Documents and Settings\Elie A. Cohen.USINC022\my documents\visual studio 2010\Projects\Repo API Example\Repo API Example\Repo API Example.vb:line 13
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(ApplicationContext context)
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
    at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException:

    In case you haven't figured it out already... Or if anyone else is curious... Or for myself when I get old and forgetful...
    h2. Object Creation
    For starters, when you create an ActiveX object from within VB, use:
    Set myObject = CreateObject("JavaObject.Bean")When I refer to JavaObject.Bean, I'm meaning the full object name + ".Bean". So, in your case, you should use:
    Set myObject = CreateObject("xxx.axb.Bean")h2. Location
    The .dll file must be located in the JRE that is used at the time of calling. Meaning, the .dll file must be placed under <jre_home>\axbridge\bin and registered there.
    In your case:
    DLL:
    C:\Program Files\Java\jre6\axbridge\bin
    Jar:
    C:\Program Files\Java\jre6\axbridge\libh4. A Note:
    The only supported JRE is a 32bit version as far as I know with regards to the ActiveX bridge. Just like the packager.exe can only be found in the 32bit JDK.
    h2. Methods
    h3. Object Types
    ActiveX Bridge does not support passing literals or arrays. However, it does support passing java's primitive data types as Objects.
    Simply meaning:
    h4. Invalid:
    public int get_axb_Handle() {
         int Address = 12345678;
         return Address;
    }h4. Valid:
    public Integer get_axb_Handle() {
         int Address = 12345678;
         return Address;
    }On a normal circumstance, there's little difference between the two methods. However, in the second example, the JVM does a typecast from a literal data type to a object data type, resulting in a valid object to pass through to Visual Basic. Now, obviously there are multiple ways to do a proper change, new Integer(int) for example. It doesn't matter to me. At the end of the day, you have to pass an object.
    As a side note, the same idea applies when receiving data from Visual Basic.
    h4. Invalid:
    public void set_axb_Handle(int newHandle) {
         int Address = newHandle;
    }h4. Valid:
    public void set_axb_Handle(Integer newHandle) {
         int Address =newHandle;

  • ASP page hang for calling ActiveX bridge!!!

    Below are the steps I done
    Note: Using jdk1.5.1.
    1) It is my java program, i make it as simple program
    public class FirstProgram{
         public FirstProgram(){
    public String getMessage(){
    return "hello";
    2) My manifest.stub is like this:
    Name: FirstProgram.class
    Java-Bean: true
    3) Then I generate the "FirstProgram.jar" file.
    4) Then I register like this
    jdk1.5.1\bin\packager -out C:\Program Files\Java\ j2re1.5.1\axbridge\bin -reg FirstProgram.jar FirstProgram
    5) I tested this dll with Visual Basic. It works fine.
    6) I tested this dll with VB script in ASP.
    <%@ Language=VBScript %>
    <%
    Dim oTest
    Set oTest = CreateObject("FirstProgram.Bean.1")
    Response.Write oTest.getMessage()
    Set oTest = Nothing
    %>
    or I tried like this
    <%@ Language=VBScript %>
    <%
    Dim oTest
    Set oTest = Server.CreateObject("FirstProgram.Bean.1")
    Response.Write oTest.getMessage()
    Set oTest = Nothing
    %>
    Page will be be unavaible and i run it again (then IIS will hang and die).
    1) How do i solve this problem? Why it is able to run in VB not in asp? Is it because IIS bug?
    Note: Windows Server 2003 IIS 6.0/ Windows XP IIS 5.1 ( I have tested it on
    these two environments, it gave me same results).
    2) I read some forums said we might need to use javareg.exe to register this component. Is it true? Where can I get this component?
    Thanks for you help!!!

    I am having the same problem.
    I am running Windows 2003 Server and trying to create the object, but it is hanging. I am running the Sun JRE 1.5.3 ActiveX Bridge.
    I have tried both IIS6 and IIS5 Isolation Mode, but neither work. Under IIS5, IIS just hangs.
    HELP!

Maybe you are looking for

  • How can I display a changing variable in a subvi on the front panel of the main vi as the subvi is excuting

    In the document attached the vi on the right is sub to the vi on the left. On the subvi on the right the variable "Field Reading" is continuously updated on the front panel of the subvi as the "for" loop is executed, but only the last value of the va

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0 and  How to control the flv file  add the play paus button and add seekbar. I have using to load the flv file following code var flvPlaceHolder1:MovieClip = new MovieClip(

  • Downloading ebay page

    I am having a problem opening ebay page using my Safari. I know I contacted the site and it partially loads the page but then stops. Same experience with appleinsider.com . It all started after switching to new internet provider but they brought thei

  • Safari 4.0.3 constantly "disconnecting" from internet

    Hi there, I have a new iMac 24" and I am having a problem that Safari on a regular basis tells me that I am not connected to the internet. I run the Network Utility and it says I am connected and can ping outside addresses. I have PCs on the same net

  • Keyword search advice

    Hi all, I need some advice on best practice to create keyword search. I need to be able to search for keywords and also some other pre-defined drop down menus like location.... What would be the best and fastest way to return search results? Just sim