|
-
Mar 4th, 2005, 07:36 PM
#1
Thread Starter
New Member
Beans/ActiveX (VB6) Bridge problem
I tried to call in VB6 an ActiveX created from JavaBeans with the SUN packager tool. All steps have been successful until trying to compile and run. The name of the bean is ActiveJMS (open source client for JMS).
1) ******************************************************************************* *****
Code from the samples (below): Compiles, but runtime error '429' on the 'Set' statement.
Option Explicit
Private WithEvents objActiveJMS As ActiveJMS.ActiveJMS
...
Private Sub Form_Load()
Set objActiveJMS = New ActiveJMS.ActiveJMS
...
End Sub
2) ******************************************************************************* *****
Changing the declaration and creation of objActiveJMS (below) made the application run until the event listener call. And then stop there with a runtime error 'java.lang.NoClassDefFoundError : org.activejms/ActiveJMS$2' .
Option Explicit
Dim objActiveJMS As Object
...
Private Sub Form_Load()
Set objActiveJMS = CreateObject("ActiveJMS.Bean.1")
lngProvider = objActiveJMS.getProvider("${default}")
lngConnectionFactory = objActiveJMS.lookupOnProvider(lngProvider, "EMERGENSYS")
lngConnection = objActiveJMS.createTopicConnectionOnTopicConnectionFactory(lngConnectionFactory , "admin", "admin")
lngReceiveSession = objActiveJMS.createTopicSessionOnTopicConnection(lngConnection, False, objActiveJMS.AutoAcknowledgeOnSession)
lngTopic = objActiveJMS.createTopicOnTopicSession(lngReceiveSession, "MCAD")
lngReceiver = objActiveJMS.createSubscriberOnTopicSession(lngReceiveSession, lngTopic, "", False)
objActiveJMS.activateMessageListenerOnMessageConsumer lngReceiver
objActiveJMS.startOnConnection (lngConnection)
...
End Sub
3) ******************************************************************************* ****
- I did not use the .tbl file ; It has not been generated by packager.
- I did also not use -clsid and -reg packager options.
- I have been able to generate the .dll fille and register it.
- I'm using j2sdk/jre 1.4.2_04
Thanks in advance for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|