473,769 Members | 3,872 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with javabeans activex bridge!

Hi,

I've run into a rather odd problem. get Methods seem to return values
from the wrong methods! For example, let's pretend my activex control
stores values about a person. getName would return their age, while
getAge might return null! Something is also going wrong with my method
that accepts input and returns a value (okay, it is a money conversion
program!)... it is returning null!

They are consistently returning the same, wrong values each time.

I have verified that all these methods work perfectly by running the
code in JBuilder with a Main class.

Any idea what to do?

(also, has anybody had any luck getting the activex bridge to work
with vb .NET, with or [hopefully] without vb6?)

Thanks!
Jul 17 '05 #1
1 2228
ma****@gmail.co m (Mattt) wrote in message news:<f4******* *************** ****@posting.go ogle.com>...
Hi,

I've run into a rather odd problem. get Methods seem to return values
from the wrong methods! For example, let's pretend my activex control
stores values about a person. getName would return their age, while
getAge might return null! Something is also going wrong with my method
that accepts input and returns a value (okay, it is a money conversion
program!)... it is returning null!

They are consistently returning the same, wrong values each time.

I have verified that all these methods work perfectly by running the
code in JBuilder with a Main class.

Any idea what to do?

(also, has anybody had any luck getting the activex bridge to work
with vb .NET, with or [hopefully] without vb6?)

Thanks!

The problem is more likely to be with the ActiveX side. It sounds like
a version problem between the version of the ActiveX component you are
actually running and the interface definition that was used to
generate the Java bridging components. ActiveX methods can be
referenced by number so if the interface looks like (VB-ish syntax):

public Function foo()
public Function getName() as String
public Function getAge() as Long

Then foo would be called as function number 0, getName as function
number 1, getAge as function number 2.

If the interface used to be simpler in the past, e.g. only 2 functions

public Function getName() as String
public Function getAge() as Long

Then getName() would be 0, getAge would be 1 and there would be no
function number 2. So this could explain the functionality that you're
seeing; java expects getName to be number 1, but it's really 0 so when
you call getName you actually end up calling getAge and when you call
getAge you actually call a nonexistent function; the null return is
probably hiding an exception that's being thrown somewhere in the
system (probably within the COM subsystem).

You need to recreate the intermediate pieces of the bridge; however
your bridging software does so; making sure that the ActiveX component
you point it at is up-to-date with the binary one you will call at
runtime (on all the machines you'll ever run on!).

If you're also writing the ActiveX component then you need to be aware
that changing the interface that component offers requires rebuilding
of all the clients as well as any intermediate bridging components
that you are using.

HTH

- Richard
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
15409
by: Steven M. Scotten | last post by:
Hi-- I seem to have the PHP Java Bridge (2.0.5 built from tarball) working with PHP 5.0.3 (also built from tarball) on my Fedora Core 1 server with Apache 2.0.50 and I'm pretty excited about it all. There are a couple of configuration issues I've run into that are perplexing me. First, I can't seem to change the classpath. I've added:
2
2473
by: Patrick Vanhoof | last post by:
Hi, I want to learn about what JavaBeans are and how to create/use them. I could not find good information yet, so any help is much appreciated. I am using Eclipse to do some Java testing, does this support JavaBeans? Thanks, Patrick
14
2325
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are going to use .Net......I highly recommend signing up for the free KBAlertz newsletter at http://www.kbalertz.com/default.aspx. Looking at all of the errors and quirks sometimes makes me wonder if this thing is really ready for prime time.
5
1554
by: Lorn | last post by:
I'm undertaking wriitng a bridge application between a remote data server API and multiple utility applications which pull and send data to the API. The reason for a bridge is that the data server limits connectivity to a single connection/account. I already have the bridge->API connection functioning and now I need to begin the multiple utilityApps->bridge connection. I have never undertaken a task as this and I'm wondering what the...
12
1993
by: Adrian | last post by:
The code below was taken from an example. All the "noise" in the example was thrown out. This is supposedly according to the bridge pattern. What in the code (which lines) represent the bridge pattern (make this code to be according to the bridge pattern), and what is the advantage of employing the bridge pattern? It seems "l'art pour l'art" to me. Adrian
0
1283
by: sneha29 | last post by:
Hi, I am trying to write a bridge similar to Python- Uno bridge. I have read from these links about the PyUNO bridge. http://udk.openoffice.org/python/python-bridge.html But I haven't found information about the basic achitecture of the bridge. Eg: the basic requirements of the files, library, specific directory structure . Is there any document/tutorial available about the approach taken to write the bridge?
4
1309
by: mmedved | last post by:
I ran into a problem using a custom ActiveX I wrote in VB 2005. It has a property that is "indexed" - that is, it has a parameter and needs to be addressed as (Index) - kinda like this: MyActiveXControl.MyProperty(Index) The thing is, VB2005 refuses to recognize that this property exists. Other - non-indexed - properties work ok, and show up in the little helper window as I type in the code, but the indexed properties do
9
4608
by: Ramon F Herrera | last post by:
Is there some standard (ish) way to build reusable graphic components in the C++ environment? -Ramon
1
1569
by: shivapadma | last post by:
i know javabean is nothing but a class written in java language the business logic is written in javabean but, i want know the advantages and objectives of using javabeans question : suppose,if i am using jsp to write a program i can write business logic in jsp then why to use javabeans in jsp... example:writing business logic in jsp itself
0
10206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10035
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9851
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.