ActiveJMS Java Bean Bridge - VB6 - ActiveX event listener

I tried to run a simple ActiveJMS client in VB6 with SUN's broker. All steps have been successful until trying to compile and run the ActiveX in VB6 code.
1) ************************************************************************************
Code from the ActiveJMS 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.

I tried to run a simple ActiveJMS client in VB6 with SUN's broker. All steps have been successful until trying to compile and run the ActiveX in VB6 code.
1) ************************************************************************************
Code from the ActiveJMS 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.

Similar Messages

  • I can not get LabVIEW to respond to a VB6 ActiveX event

    I am working with a VB6 ActiveX dll (VBtablet.dll is a wrapper for Wintab32 for a tablet interface) using LV8.2.1 and can not get it to respond to an event.  I have opend the object and registered it for callback, but have had no luck in having an event generated.  Is there anyway to see these events generated or at least that it has been registered?  The dll has no problem working in a VB app or in Excel using a VB macro.  Is there anything special that has to be in the ActiveX object to get LabVIEW to respond to it?
    When I register the callback I use a control reference of the data being returned as my "user data" and in the callback VI I wire the event data into the "Value" of the control reference. I believe this is all I have to do.  Any ideas would be helpfull.
    Thanks,
    Paul 

    cueball wrote:
    I am able to see that events are generated from the dll, but somewhere between the ActiveX object and LabVIEW it is disconnected.  Is it possible that LabVIEW is excepting these events and not allowing then into the code.  The path as I see it is
    dll -> WinAPI -> ActiveX -> LabVIEW
    One thing this dll requires is a windows handle and I am wondering if LabVIEW itself is reads the events directly instead of ignoring them.  The reason I bring it up is that the tablet works like a mouse and I am wondering if it is absorbing these commands directly and not allowing them to be passed through the ActiveX object. Like this
    dll-> WinAPI -> LabVIEW
    therefore the event is never generated.  That is why I wish I could speak with someone at NI that could explain that process better, but it seems like there is no one at NI who knows any high level issues.
    First this are not high level issues but lowest low level issues. Some of it certainly is more Windows related than LabVIEW so support from MS, as unlikely it is to get that, would be at its place. NI people are not there nor can't really help you debug your VB issues.
    Second you say it is a tablet and works like a mouse, then I'm wondering if Windows is not simply claiming it as a Human Interface Device itself and not really letting you control it yourself in your VB control.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Using Java Access bridge (Accessibility) with oracle forms 6.0 client

    I'm trying to use JAB (java Access bridge ) to capture events in oracle forms 6.0 client .
    I've a Jinitiator 1.1.8 and JRE version 1.4x
    I've configured JAB as per the installation guide . However the events don't surface in Java Monkey .
    Has anybody encountered similar issue ? what is the solution for the issue ??
    Also on one of the forums I read Jinitiator 1.3x and above is automatically recognised by Java Access bridge .
    For jinitiator version less than 1.3 manual configuration is required . however I haven;'t been able to find any on the oracle forms KB
    Also here is the excerpt from the link http://www.oracle.com/us/corporate/accessibility/faqs/index.html
    Q: Are there special steps for using Java-based applications with assistive technology?
    A: If the Oracle application is written in Java, such as JDeveloper or Oracle Forms (runtime), customers must first install the latest version of Sun's Java Access Bridge. The Java Access Bridge provides the integration with screen readers such as JAWS or SuperNova that support Java. You just download the Access Bridge and install it. Sun's AccessBridge 2.0x recognizes Oracle's JInitiator 1.3x and above so no manual configuration steps are necessary. The Access Bridge is available from: http://java.sun.com/products/accessbridge. At the time this document was written, Access Bridge 2.0.1 is the most current publicly available production release; Oracle recommends upgrading to this version. Sun's AccessBridge is bundled with Oracle Universal Installer (OUI) and can be found in the Java Runtime Engine (JRE). More information for configuring such products is in the respective product documentation, or on http://www.oracle.com/us/corporate/accessibility/products/index.html.
    Edited by: 974810 on 4 Dec, 2012 1:10 AM

    ODP.NET requires Oracle Client 9.2 or higher.
    You can find additional information about ODP.NET from the FAQ:
    http://www.oracle.com/technology/tech/windows/odpnet/faq.html
    and the ODP.NET homepage:
    http://www.oracle.com/technology/tech/windows/odpnet/index.html
    Hope that helps,
    Mark

  • How to embed excel in java bean area on oracle forms 9i?

    Hi,
    I am trying to embed excel in oracle forms 9i using java bean. I want to open excel sheet in the bean area not as seprate application. Means i donot want to excel running separately from forms on the machine.
    If any body knows the solution please reply.
    Best regrads,
    Shiraz

    Hi
    Is it possible to create a java bean, with a click event which populates data from database table to an excel sheet.
    The data(can be obtained in a string format with delimiters, but can anyone help me in exporting this into an excel sheet). and also to provide user to take prints of the data in the excel sheet.
    If Print of the JTable could be done(by settin printable as this), but this involves unwanted buttons to be printed, and entire table is not available in the spread sheet format.
    Thanks in Advance
    Deepa

  • 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

  • Using java.beans.EventHandler to create javafx.event.EventHandler instances

    One thing I do not like about the JavaFX EventHandler is all the anonymous classes that need to be created. This messes up the way the code looks and I heard that creating all these anonymous classes adds to the total number of classes that get loaded.
    In searching for a way around this I found java.beans.EventHandler's create method. This method (there are a few variations of it) its suppose to provide a one liner to create anonymous implementations of listener interfaces (like JavaFX's EventHandler). So I decided to try it out against some of the sample JavaFX code that is out there.
    I used.... http://docs.oracle.com/javafx/2.0/events/KeyboardExample.java.htm... as my test code.
    I replaced...
            private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                final EventHandler keyEventHandler = new EventHandler<KeyEvent>() {
                    @Override
                    public void handle(final KeyEvent keyEvent) {
                        if (keyEvent.getCode() == KeyCode.ENTER) {
                            setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                            keyEvent.consume();
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
            }with....
            private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                final EventHandler keyEventHandler = (EventHandler)java.beans.EventHandler.create(EventHandler.class, this, "handle", "");
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
    public void handle(final KeyEvent keyEvent) {
                if (keyEvent.getCode() == KeyCode.ENTER) {
                    setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                    keyEvent.consume();
            }It worked. The new code behaved just like the old code.
    One caveat though. The class count did in fact go up by about 20 classes. I ran multiple runs and this was true for all of them. But I only applied this technique on one anonymous class. It could be the case that the real savings in class count come after many instances of swapping out anonymous classes with this technique.
    From the javadoc
    "Also, using EventHandler in large applications in which the same interface is implemented many times can reduce the disk and memory footprint of the application.
    The reason that listeners created with EventHandler have such a small footprint is that the Proxy class, on which the EventHandler relies, shares implementations of identical interfaces. For example, if you use the EventHandler create methods to make all the ActionListeners in an application, all the action listeners will be instances of a single class (one created by the Proxy class). In general, listeners based on the Proxy class require one listener class to be created per listener type (interface), whereas the inner class approach requires one class to be created per listener (object that implements the interface)."
    Edited by: jmart on Apr 23, 2012 2:13 AM

    Well, the idea is that with Java 8 they can be rewritten to something like this:
    private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                EventHandler keyEventHandler = keyEvent => {
                        if (keyEvent.getCode() == KeyCode.ENTER) {
                            setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                            keyEvent.consume();
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
            }Basically what you are doing now is sacrificing performance (both in real performance and in a lot of extra garbage created) for a little bit of memory gain. Unless you have good reasons and measurements to back this up I think this would definitely qualify as premature optimization.
    I'm a heavy user of anonymous inner classes myself, having several hundreds of them now in my project and I have yet to run into problems. I often write code like the example below purely for readability and convience:
    Set<String> someSet = new HashSet<>() {{
      add("A");
      add("B");
    new HBox() {{
      getChildren.add(new VBox() {{
        getChildren.add(new Label("Hi"));
      getChildren.add(new VBox() {{
        getChildren.add(new Label("There"));
    }};

  • 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;

  • Error trying to register a Java event listener

    I'm trying to register a java event listener in 11g with the following piece of code:
    DECLARE
    b BOOLEAN := FALSE;
    BEGIN
    b := DBMS_XDB.createFolder('/public/resconfig');
    b := DBMS_XDB.createResource(
    '/public/resconfig/hr_event.xml',
    '<ResConfig xmlns="http://xmlns.oracle.com/xdb/XDBResConfig.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/xdb/XDBResConfig.xsd
    http://xmlns.oracle.com/xdb/XDBResConfig.xsd">
    <event-listeners default-language="Java">
    <listener>
    <description>Category application</description>
    <schema>HR</schema>
    <source>xdbproject.OpenOfficeEventHandler</source>
    <language>Java</language>
    <events>
    <Post-Create/>
    <Post-LinkIn/>
    </events>
    </listener>
    </event-listeners>
    <defaultChildConfig>
    <configuration>
    <path>/public/resconfig/hr_event.xml</path>
    </configuration>
    </defaultChildConfig>
    </ResConfig>');
    END;
    This results in the following error message
    ORA-31146: Ugyldig lytterkilde HR.xdbproject.OpenOfficeEventHandler
    ORA-06512: ved "XDB.DBMS_XDB", line 174
    ORA-06512: ved line 5
    which translates to Invalid listener source.
    My class is loaded in the HR schema, and implements the XDBRepositoryEventListener
    Does anybody have a suggestion to what I'm doing wrong, or how I can find out what makes my class invalid as a listener source?

    Check if it validates against the restrictions set in the XML Schema (Appendix A, Oracle XMLDB Developers Guide):
    XDBResConfig.xsd: XML Schema for Resource Configuration
    This section presents the Oracle XML DB supplied XML schema used to configure repository resources. This is accessible in Oracle XML DB Repository at path /sys/schemas/PUBLIC/xmlns.oracle.com/xdb/XDBResConfig.xsd.
    XDBResConfig.xsd
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xmlns.oracle.com/xdb/XDBResConfig.xsd"
            xmlns:xdb="http://xmlns.oracle.com/xdb"
            xmlns:rescfg="http://xmlns.oracle.com/xdb/XDBResConfig.xsd"
            elementFormDefault="qualified" xdb:schemaOwner="XDB" version="1.0" >
      <annotation>
        <documentation>
          This XML schema declares the schema of an XDB resource configuration,
          which includes default ACL, event listeners and user configuration.
          It lists all XDB repository events that will be supported.
          Future extension can be added to support user-defined events and
          XML events.
        </documentation>
      </annotation>
      <simpleType name="language">
        <restriction base="string">
          <enumeration value="Java" />
          <enumeration value="C" />
          <enumeration value="PL/SQL" />
        </restriction>
      </simpleType>
      <complexType name = "existsNode">
         <all>
           <element name="XPath" type = "string" minOccurs="1" maxOccurs="1" />
           <element name="namespace" type = "string" minOccurs="0" maxOccurs="1" />
         </all>
      </complexType>
      <!-- listener pre-condition element  -->
      <complexType name = "condition">
         <all>
           <element name="existsNode" type = "rescfg:existsNode" minOccurs="0" maxOccurs="1" />
         </all>
      </complexType>
      <complexType name = "events">
        <all>
          <element name="Render" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-Create" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-Create" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-Delete" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-Delete" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-Update" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-Update" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-Lock" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-Lock" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-Unlock" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-Unlock" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-LinkIn" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-LinkIn" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-LinkTo" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-LinkTo" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-UnlinkIn" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-UnlinkIn" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-UnlinkFrom" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-UnlinkFrom" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-CheckIn" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-CheckIn" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-CheckOut" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-CheckOut" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-UncheckOut" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-UncheckOut" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-VersionControl" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-VersionControl" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-Open" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-Open" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Pre-InconsistentUpdate" type="string" minOccurs="0" maxOccurs="1"/>
          <element name="Post-InconsistentUpdate" type="string" minOccurs="0" maxOccurs="1"/>
        </all>
      </complexType>
      <!-- event listener element  -->
      <complexType name = "event-listener">
        <all>
          <element name="description" type = "string" minOccurs="0" maxOccurs="1"/>
          <element name="schema" type = "string" minOccurs="0" maxOccurs="1"/>
          <element name="source" type = "string" minOccurs="1" maxOccurs="1"/>
          <element name="language" type = "rescfg:language" minOccurs="0" maxOccurs="1"/>
          <element name="pre-condition" type = "rescfg:condition" minOccurs="0" maxOccurs="1"/>
          <element name="events" type = "rescfg:events" minOccurs="0" maxOccurs="1"/>
        </all>
      </complexType>
      <complexType name="event-listeners">
        <sequence>
          <element name="listener" type = "rescfg:event-listener" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
        <attribute name = "default-schema" type = "string" xdb:baseProp="true" use="optional"/>
        <attribute name = "default-language" type = "rescfg:language" xdb:baseProp="true"
                   use="optional"/>
        <attribute name = "set-invoker" type = "boolean" xdb:baseProp="true" default="false" />
      </complexType>
      <complexType name="defaultPath">
        <all>
          <element name="pre-condition" type = "rescfg:condition" minOccurs="0" maxOccurs="1"/>
          <element name="path" type="string" minOccurs="0" maxOccurs="1" xdb:transient="generated"/>
          <element name = "resolvedpath" type = "string" minOccurs="1" maxOccurs="1"
                   xdb:baseProp="true" xdb:hidden="true"/>
          <element name = "oid" type = "hexBinary" minOccurs="1" maxOccurs="1" xdb:baseProp="true"
                   xdb:hidden="true"/>
        </all>
      </complexType>
      <complexType name="defaultACL">
        <sequence>
          <element name="ACL" type="rescfg:defaultPath" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
      </complexType>
      <complexType name = "defaultConfig">
        <sequence>
          <element name="configuration" type="rescfg:defaultPath" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
      </complexType>
      <simpleType name="link-type">
        <restriction base="string">
          <enumeration value="None"/>
          <enumeration value="Hard"/>
          <enumeration value="Weak"/>
          <enumeration value="Symbolic"/>
        </restriction>
      </simpleType>
      <simpleType name="path-format">
        <restriction base="string">
          <enumeration value="OID"/>
          <enumeration value="Named"/>
        </restriction>
      </simpleType>
      <simpleType name="link-metadata">
        <restriction base="string">
          <enumeration value="None"/>
          <enumeration value="Attributes"/>
          <enumeration value="All"/>
        </restriction>
      </simpleType>
      <simpleType name="unresolved-link">
        <restriction base="string">
          <enumeration value="Error"/>
          <enumeration value="SymLink"/>
          <enumeration value="Skip"/>
        </restriction>
      </simpleType>
      <simpleType name="conflict-rule">
        <restriction base="string">
          <enumeration value="Error"/>
          <enumeration value="Overwrite"/>
          <enumeration value="Syspath"/>
        </restriction>
      </simpleType>
       <simpleType name="section-type">
         <restriction base="string">
           <enumeration value="None"/>
           <enumeration value="Fragment"/>
           <enumeration value="Document"/>
         </restriction>
       </simpleType>
      <!-- XLinkConfig complex type -->
        <complexType name="xlink-config">
         <sequence>
          <element name="LinkType" type = "rescfg:link-type"/>
          <element name="PathFormat" type = "rescfg:path-format" minOccurs="0" default="OID"/>
          <element name="LinkMetadata" type = "rescfg:link-metadata" minOccurs="0" default="None"/>
         </sequence>
         <attribute name="UnresolvedLink" type = "rescfg:unresolved-link" default="Error"/>
        </complexType>
      <!-- XIncludeConfig element -->
        <complexType name="xinclude-config">
         <sequence>
          <element name="LinkType" type = "rescfg:link-type"/>
          <element name="PathFormat" type = "rescfg:path-format" minOccurs="0" default="OID"/>
          <element name="ConflictRule" type = "rescfg:conflict-rule" minOccurs="0" default="Error"/>
         </sequence>
         <attribute name="UnresolvedLink" type = "rescfg:unresolved-link" default="Error"/>
        </complexType>
      <!-- SectionConfig element -->
      <complexType name="section-config">
       <sequence>   
        <element name="Section" maxOccurs="unbounded">
          <complexType>
            <sequence>
             <element name="sectionPath" type="string"/>
             <element name="documentPath" type="string" minOccurs="0"/>
             <element name="namespace" type="string" minOccurs="0"/>
            </sequence>
            <attribute name="type" type="rescfg:section-type" default="None"/>
          </complexType>
        </element>
       </sequence>
      </complexType>
      <!-- ContentFormat element -->
      <simpleType name="content-format" >
        <restriction base="string">
          <enumeration value="text"/>
          <enumeration value="binary"/>
        </restriction>
       </simpleType>
      <!-- resource configuration element  -->
      <complexType name = "ResConfig">
        <all>
          <element name="defaultChildConfig" type="rescfg:defaultConfig" minOccurs="0"  maxOccurs="1"/>
          <element name="defaultChildACL" type="rescfg:defaultACL" minOccurs="0" maxOccurs="1"/>
          <element name="event-listeners" type = "rescfg:event-listeners" minOccurs="0" maxOccurs="1"/>
          <element name="XLinkConfig" type="rescfg:xlink-config" minOccurs="0" maxOccurs="1"/>
          <element name="XIncludeConfig" type="rescfg:xinclude-config" minOccurs="0" maxOccurs="1"/>
          <element name="SectionConfig" type="rescfg:section-config" minOccurs="0" maxOccurs="1"/>
          <element name="ContentFormat" type="rescfg:content-format" minOccurs="0" maxOccurs="1"/>
          <!-- application data -->
          <element name="applicationData" minOccurs="0" maxOccurs="1" >
             <complexType>
               <sequence>
                 <any namespace="##other" maxOccurs="unbounded" processContents="lax"/>
               </sequence>
             </complexType>
         </element>
        </all>
        <attribute name = "enable" type = "boolean" xdb:baseProp="true" default="true" />
        <attribute name = "copy-on-inconsistent-update" type = "boolean" use="optional" />
      </complexType>
      <element name="ResConfig" type="rescfg:ResConfig" xdb:defaultTable = "XDB$RESCONFIG" />
    </schema>
    acl.xsd: XML Schema for ACLs
    This section presents the Oracle Database supplied XML schema used to represent access control lists (ACLs).
    acl.xsd
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xmlns.oracle.com/xdb/acl.xsd" version="1.0"
            xmlns:xdb="http://xmlns.oracle.com/xdb"
            xmlns:xdbacl="http://xmlns.oracle.com/xdb/acl.xsd"
            elementFormDefault="qualified">
       <annotation>
         <documentation>
            This XML schema describes the structure of XDB ACL documents.
            Note : The "systemPrivileges" element below lists all supported
              system privileges and their aggregations.
              See dav.xsd for description of DAV privileges
            Note : The elements and attributes marked "hidden" are for
              internal use only.
         </documentation>
         <appinfo>
           <xdb:systemPrivileges>
            <xdbacl:all>
              <xdbacl:read-properties/>
              <xdbacl:read-contents/>
              <xdbacl:read-acl/>
              <xdbacl:update/>
              <xdbacl:link/>
              <xdbacl:unlink/>
              <xdbacl:unlink-from/>
              <xdbacl:write-acl-ref/>
              <xdbacl:update-acl/>
              <xdbacl:link-to/>
              <xdbacl:resolve/>
              <xdbacl:write-config/>
            </xdbacl:all>
           </xdb:systemPrivileges>
         </appinfo>
       </annotation>
      <!-- privilegeNameType (this is an emptycontent type) -->
      <complexType name = "privilegeNameType"/>
      <!-- privilegeName element
           All system and user privileges are in the substitutionGroup
           of this element.
        -->
      <element name = "privilegeName" type="xdbacl:privilegeNameType"
               xdb:defaultTable=""/>
      <!-- all system privileges in the XDB ACL namespace -->
      <element name = "read-properties" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "read-contents" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "read-acl" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "update" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "link" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "unlink" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "unlink-from" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "write-acl-ref" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "update-acl" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "link-to" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "resolve" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <element name = "all" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
      <!-- privilege element -->
      <element name = "privilege" xdb:defaultTable="">
        <complexType>
          <sequence>
            <any maxOccurs="unbounded" processContents="lax"/>
          </sequence>
        </complexType>
      </element>
      <!-- ace element -->
      <element name = "ace" xdb:defaultTable="">
        <complexType>
          <sequence>
            <element name = "grant" type = "boolean"/>
            <choice>
              <element name="invert" xdb:transient="generated">
                <complexType>
                  <sequence>
                    <element name="principal" type="string"
                             xdb:transient="generated" />
                  </sequence>
                </complexType>
              </element>
              <element name="principal" type="string" xdb:transient="generated"/>
            </choice>
            <element ref="xdbacl:privilege" minOccurs="1"/>
            <!-- "any" contain all app info for an ACE e.g.reason for creation -->
            <any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
            <!-- HIDDEN ELEMENTS -->
            <choice minOccurs="0">
              <element name = "principalID" type = "hexBinary"
                       xdb:baseProp="true" xdb:hidden="true"/>
              <element name = "principalString" type = "string"
                       xdb:baseProp="true" xdb:hidden="true"/>
            </choice>
            <element name = "flags" type = "unsignedInt" minOccurs="0"
                     xdb:baseProp="true" xdb:hidden="true"/>
          </sequence>
          <attribute name = "collection" type = "boolean"
                     xdb:transient="generated" use="optional"/>
          <attribute name = "principalFormat"
                     xdb:transient="generated" use="optional">
            <simpleType>
              <restriction base="string">
                <enumeration value="ShortName"/>
                <enumeration value="DistinguishedName"/>
                <enumeration value="GUID"/>
                <enumeration value="XSName"/>
              </restriction>   
            </simpleType>
          </attribute>
          <attribute name = "start_date" type = "dateTime" use = "optional"/>
          <attribute name = "end_date" type = "dateTime" use = "optional"/>    
        </complexType>
      </element>
      <!-- acl element -->
      <complexType name="inheritanceType">
        <attribute name="type" type="string" use="required"/>
        <attribute name="href" type="string" use="required"/>
      </complexType>
      <complexType name="aclType">
       <sequence>
        <element name = "schemaURL" type = "string" minOccurs="0"
                 xdb:transient="generated"/>
        <element name = "elementName" type = "string" minOccurs="0"
                 xdb:transient="generated"/>
        <element name = "security-class" type = "QName" minOccurs="0"/>
        <choice minOccurs="0">
          <element name="extends-from" type="xdbacl:inheritanceType"/>
          <element name="constrained-with" type="xdbacl:inheritanceType"/>
        </choice>
        <element ref = "xdbacl:ace" minOccurs="1" maxOccurs = "unbounded"/>
        <!-- this "any" contains all application specific info for an ACL,
             e.g., reason for creation  -->
        <any minOccurs="0" maxOccurs="unbounded" namespace="##other" />
        <!-- HIDDEN ELEMENTS -->
        <element name = "schemaOID" type = "hexBinary" minOccurs="0"
                 xdb:baseProp="true" xdb:hidden="true"/>
        <element name = "elementNum" type = "unsignedInt" minOccurs="0"
                 xdb:baseProp="true" xdb:hidden="true"/>
       </sequence>
       <attribute name = "shared" type = "boolean" default="true"/>
       <attribute name = "description" type = "string"/>
      </complexType>
      <complexType name="rule-based-acl">
        <complexContent>
          <extension base="xdbacl:aclType">
            <sequence>
              <element name = "param" minOccurs="0" maxOccurs="unbounded">
                <complexType>
                  <simpleContent>
                    <extension base="string">
                      <attribute name = "name" type = "string" use = "required"/>
                    </extension>
                  </simpleContent>
                </complexType>
              </element>
            </sequence>
          </extension>
        </complexContent>
      </complexType>
      <element name = "acl" type="xdbacl:aclType" xdb:defaultTable = "XDB$ACL"/>
      <element name = "write-config" type="xdbacl:privilegeNameType"
               substitutionGroup="xdbacl:privilegeName" xdb:defaultTable=""/>
    </schema>Message was edited by:
    Marco Gralike

  • How to make view Java Bean as .ocx file.

    Hi All,
    I want to use a visual Java Bean in Visual basic. So that I can modify all the bean properties as modify properties in a ocx file.
    I used ActiveX Com bridge downloaded from Sun's site. But the packager
    makes a .tlb file .
    This file can only be added as a reference in visual basic but not as a ActiveX control. Is there any way out to do that???
    Thanks & regards.
    Nimesh

    The packager creates a registry file and a tlb file.
    After registering this .reg file, java bean can be used as an ActiveX control.
    From within Visal Basic, select the "Tools" menu and "Custom Controls" item and add the Bean control that was generated.
    Avinash.

  • "Java-Bean: True" missing after being packed in jar file

    Hi All
    X86, Windows XP Professional, J2SDK 1.4.2
    I complied a section of code ", which is from << Thinking In Java>>(3rd).
    Created a manifest file "BangBean.tmp"
    <<
    Name: bangbean/BangBean.class
    Java-Bean: True
    >>
    And then packed class files into "BangBean.jar" with command
    "jar cfm BangBean.jar Bang BangBean.tmp bangbean".
    It's puzzling that "Java-Bean: Ture" was missing in the "BangBean.jar/META-INF/MENIFEST.MF" .
    <<
    Manifest-Version: 1.0
    Created-By: 1.4.2 (Sun Microsystems Inc.)
    Name: bangbean/BangBean.class
    >>
    What's more, after altering the"BangBean.tmp" into this
    <<
    Java-Bean: True
    Name: bangbean/BangBean.class
    >>
    and had a another try.
    I got a jar file with such MENIFEST.MF.
    <<
    Manifest-Version: 1.0
    Created-By: 1.4.2 (Sun Microsystems Inc.)
    Java-Bean: True
    Name: bangbean/BangBean.class
    >>
    This jar file worked well in BDK's beanbox.
    I've test it with JSDK 1.5.0, the same thing happened.
    And I didn't encounter such problem in other bean programs.
    I've searched " 'Java-Bean: True' missing " with google, but didn't get proper answers.
    Is there anybody who can give a prompt about why this happend?
    Thanks a lot for your help!
    code
    //: bangbean:BangBean.java
    // A graphical Bean.
    package bangbean;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import com.bruceeckel.swing.*;
    public class
    BangBean extends JPanel implements Serializable {
    private int xm, ym;
    private int cSize = 20; // Circle size
    private String text = "Bang!";
    private int fontSize = 48;
    private Color tColor = Color.RED;
    private ActionListener actionListener;
    public BangBean() {
    addMouseListener(new ML());
    addMouseMotionListener(new MML());
    public int getCircleSize() { return cSize; }
    public void setCircleSize(int newSize) {
    cSize = newSize;
    public String getBangText() { return text; }
    public void setBangText(String newText) {
    text = newText;
    public int getFontSize() { return fontSize; }
    public void setFontSize(int newSize) {
    fontSize = newSize;
    public Color getTextColor() { return tColor; }
    public void setTextColor(Color newColor) {
    tColor = newColor;
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    g.setColor(Color.BLACK);
    g.drawOval(xm - cSize/2, ym - cSize/2, cSize, cSize);
    // This is a unicast listener, which is
    // the simplest form of listener management:
    public void addActionListener(ActionListener l)
    throws TooManyListenersException {
    if(actionListener != null)
    throw new TooManyListenersException();
    actionListener = l;
    public void removeActionListener(ActionListener l) {
    actionListener = null;
    class ML extends MouseAdapter {
    public void mousePressed(MouseEvent e) {
    Graphics g = getGraphics();
    g.setColor(tColor);
    g.setFont(
    new Font("TimesRoman", Font.BOLD, fontSize));
    int width = g.getFontMetrics().stringWidth(text);
    g.drawString(text, (getSize().width - width) /2,
    getSize().height/2);
    g.dispose();
    // Call the listener's method:
    if(actionListener != null)
    actionListener.actionPerformed(
    new ActionEvent(BangBean.this,
    ActionEvent.ACTION_PERFORMED, null));
    class MML extends MouseMotionAdapter {
    public void mouseMoved(MouseEvent e) {
    xm = e.getX();
    ym = e.getY();
    repaint();
    public Dimension getPreferredSize() {
    return new Dimension(200, 200);
    } ///:~
    ************************************************

    Since you didn't use code-formatting tags ([ code ] and [ /code ] without the spaces) it's kinda hard to look at it. But I'm sure it DID execute much more than just the return statement - maybe you're not closing a file or db connection, or maybe you're seeing a cached page, so it actually isn't executing ANYTHING on the server (is your browser set to never check for newer pages so it (almost) always returns from cache, for example?)

  • Reading Forms Key Mappings from java bean - how ?

    I want to be able to invoke key trigger code in a Forms 10g run-time from a java bean (extends BeanWrapper) either by:
    a) using inherited method calls passing the KeyEvent retrieved from my listener, or
    b) dispatching a custom event from the bean with a parameter value which identifies the key trigger to process (not the key code & modifier string).
    On a), I've not been able to identify any method in the BeanWrapper hierarchy tree that might help me do this, and samples like (http://forms.pjc.bean.over-blog.com/categorie-465294.html) seem to imply that no such method exists.
    In terms of b), the oracle.forms.engine.KeyMapTable class seems to be what I want (seems to translate the KeyEvent into a FormAction/string using server settings), but getting a hold of this object through (oracle.forms.engine.Main)getHandler().getApplet() doesn't seem possible.
    How are others invoking eg: key-crerec from a Forms 10g bean component in a way which is sensitive to server key mappings ?
    Thanks in advance for your help.

    I have no experience with KeyEvents in Forms, but if the KeyMapTable class really is the solution, can't you just instantiate one yourself.
    Looking at the constructor it only needs a single argument, the oracle.forms.engine.Runform class. You should be able to get a handle on it with:
    IHandler hander = getHandler();
    if (handler instanceof UICommon) {
        UICommon u = (UICommon)handler;
        // u.getDispatcher() should get oracle.forms.engine.Runform
    }Not sure if it will work, but you can give it a try.
    I love pushing the PJC and Oracle Forms applet to its limits. Not really sure if Oracle intended the PJC framework to do stuff like this, but it sure would have helped if they have JavaDoc about the oracle.forms.* classes

  • Is it possible to trigger action in backing bean on page unload event?

    Hi,
    There is a RichPopup in my page which has a Listener to save data or not by user choice "Data change detected, do you want to save those changes?"
    I've tried with the javascript event 'window.onbeforeunload', but this way must be fit with a Servlet function which I am not allowed to use.
    The attibute 'onunload' in the tag '<af:document>' seems useless. Even there is few description or example in the 'Tag Reference'.
    So, is it possible to trigger action in backing bean on page unload event? Thanks in advance for helping.
    Viva

    Hi Frank
    Thanks for helping, I've tried in your way. My codes are like below:
    Page codes:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" clientComponent="true" title="viva test">
          <af:resource type="javascript">
            if (!window.addEventListener) {
                // alert('window.addEventListener is not supported in IE8. Override it!');
                window.addEventListener = function (type, listener, useCapture) {
                    window.attachEvent('on' + type, function() {listener(event)});
            window.addEventListener('beforeunload', function (){performUnloadEvent()}, false);
            function performUnloadEvent() {
              var eventSource = AdfPage.PAGE.findComponentByAbsoluteId('d1');
              //var x and y are dummy variables obviously neeed to keep the page
              //alive for as long it takes to send the custom event to the server
              var x = AdfCustomEvent.queue(eventSource, 'handleOnUnload', {args:'noargs'}, false);
              var y = 0;
          </af:resource>
          <af:serverListener type="handleOnUnload" method="#{vivaTestBean.testOnUnload}"/>
          <!--
          <af:form id="f1">
            <af:commandButton text="Unload" id="cb1" action="unload"/>
          </af:form>
          -->
        </af:document>
      </f:view>
    </jsp:root>The backing bean codes:
    public class VivaTestBean {
        public VivaTestBean() {
        public void testOnUnload(ClientEvent clientEvent) {
            System.out.println("Thanks God");
    }The first way which triggers a 'unload' event by clicking a button DO WORKS. :)
    But when I changed the triggered way by changing the <af:document> to clientComponent as what you did, the 'onbeforeunload' event won't come out when I refreshed or closed the page.
    That doesn't make sence, since I think the two ways to trigger a 'unload' event are the same.
    Edited by: 841766 on 2011-3-7 上午1:13

  • CQL on complex java bean

    Hello,
    Is there a known issue of CQL not able to process a complex java bean structure? Simple java bean works just fine, but when I have bean nested in another bean, CQL can not process it.
    Any pointer is greatly appreciated.
    Thanks,
    Brandon

    Hi,
    I am using the latest 11.1.1.3. Bellow is the error.
    <May 25, 2010 12:38:00 PM PDT> <Warning> <Ede> <BEA-000000> <Exception for 'com.event.Subscriber@2bd2877' raised by listener = com.oracle.cep.processor.cql.impl.CQLEventReceiver@299f722
    com.bea.wlevs.ede.api.EventProcessingException: Internal error processing event [com.event.Subscriber@2bd2877] = Failed to set property [agreement] of event type [Subscriber]. Cause = invalid object com.event.agreement@2bd2873 is used for object attribute value
         at com.oracle.cep.processor.cql.impl.CQLEventReceiver.sendToEngine(CQLEventReceiver.java:389)
         at com.oracle.cep.processor.cql.impl.CQLEventReceiver.onInsertEvent(CQLEventReceiver.java:248)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEventToListener(EventSenderImpl.java:360)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEvent(EventSenderImpl.java:331)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventstore.recplay.RecordPlaySendEventInterceptor.sendInsertEvent(RecordPlaySendEventInterceptor.java:160)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventinspector.EventInspectInterceptor.sendInsertEvent(EventInspectInterceptor.java:133)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.monitor.internal.MonitorSendEventInterceptor.sendInsertEvent(MonitorSendEventInterceptor.java:480)
         at com.bea.wlevs.channel.impl.ChannelImpl.onInsertEvent(ChannelImpl.java:439)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEventToListener(EventSenderImpl.java:360)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEvent(EventSenderImpl.java:331)
         at com.bea.wlevs.ede.impl.EventSourceEventSenderImpl.sendInsertEvent(EventSourceEventSenderImpl.java:86)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventstore.recplay.RecordPlaySendEventInterceptor.sendInsertEvent(RecordPlaySendEventInterceptor.java:160)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventinspector.EventInspectInterceptor.sendInsertEvent(EventInspectInterceptor.java:133)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.monitor.internal.MonitorSendEventInterceptor.sendInsertEvent(MonitorSendEventInterceptor.java:480)
         at com.bea.wlevs.adapters.jms.InboundJmsAdapter.onMessage(InboundJmsAdapter.java:187)
         at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:544)
         at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
         at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
         at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
         at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
         at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:59)
         at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:983)
         at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
         at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
         at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:39)
         at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: com.bea.wlevs.ede.api.EventPropertyException: Failed to set property [agreement] of event type [Subscriber]. Cause = invalid object com.event.agreement@2bd2873 is used for object attribute value
         at com.oracle.cep.processor.cql.impl.TupleValueUtils.raiseEventPropertyException(TupleValueUtils.java:153)
         at com.oracle.cep.processor.cql.impl.TupleValueUtils.projectEvent(TupleValueUtils.java:90)
         at com.oracle.cep.processor.cql.impl.TupleValueUtils.compareAndProjectEvent(TupleValueUtils.java:48)
         at com.oracle.cep.processor.cql.impl.CQLEventReceiver.sendToEngine(CQLEventReceiver.java:337)
         at com.oracle.cep.processor.cql.impl.CQLEventReceiver.onInsertEvent(CQLEventReceiver.java:249)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEventToListener(EventSenderImpl.java:360)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEvent(EventSenderImpl.java:331)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventstore.recplay.RecordPlaySendEventInterceptor.sendInsertEvent(RecordPlaySendEventInterceptor.java:160)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventinspector.EventInspectInterceptor.sendInsertEvent(EventInspectInterceptor.java:133)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.monitor.internal.MonitorSendEventInterceptor.sendInsertEvent(MonitorSendEventInterceptor.java:480)
         at com.bea.wlevs.channel.impl.ChannelImpl.onInsertEvent(ChannelImpl.java:439)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEventToListener(EventSenderImpl.java:360)
         at com.bea.wlevs.processor.impl.EventSenderImpl.sendInsertEvent(EventSenderImpl.java:331)
         at com.bea.wlevs.ede.impl.EventSourceEventSenderImpl.sendInsertEvent(EventSourceEventSenderImpl.java:86)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventstore.recplay.RecordPlaySendEventInterceptor.sendInsertEvent(RecordPlaySendEventInterceptor.java:160)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.eventinspector.EventInspectInterceptor.sendInsertEvent(EventInspectInterceptor.java:133)
         at com.bea.wlevs.ede.spi.AbstractSendEventInterceptor.sendInsertEvent(AbstractSendEventInterceptor.java:79)
         at com.bea.wlevs.monitor.internal.MonitorSendEventInterceptor.sendInsertEvent(MonitorSendEventInterceptor.java:480)
         at com.bea.wlevs.adapters.jms.InboundJmsAdapter.onMessage(InboundJmsAdapter.java:187)
         at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:544)
         at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
         at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
         at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
         at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
         at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:59)
         at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:983)
         at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
         at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
         at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:39)
         at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

  • Newbie consuming bean from VB6 COM

    Hi - I'm completely new to Beans and am trying to call a Java method from VB6 as 'proof of concept'.
    My java code has one method that returns a string; it compiles OK to a .class file; I can create a .jar using a manifest file containing "Java-Bean: True"; and I can use the activex packager to create a .tlb file.
    When I try to instantiate my class from VB6 using early binding I get "automation error - the specified module could not be found", and late binding using CreateObject just gives me "activex component cannot create object"
    Does anyone have ideas to what the problem is ??
    Thanks, Andrew.

    you need to compile your bean with the ActiveX packager (packager.exe) to a DLL. then you must register the dll (e.g. with regsvr32.exe), then you must reference the component (DLL) in visual basic, and then you can use it:
    Private Sub Form_Load()
        Dim value
        Dim java As Object
        Set java = CreateObject("JavaTestBean.Bean.1") 'create bean object
        java.setValue (3)         'call method setValue() of bean
        value = java.getValue()   'call method getValue() of bean
        MsgBox "Value: " & value  'print calculated value
        Set java = Nothing
    End Sub
    see also http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html

  • How to deploy the wrapped Java Bean on PowerBuilder

    Using the JavaBeans Bridge for ActiveX Packager, I could generate the .tbl and .reg files for my Java Bean. Since I am a 100% Java guy and don't have much knowledge of PowerBuilder, I don't know how to deploy this on PB. When I try to register an OLE, PB looks for the files with an extension .ocx but not .tbl. Please let me know how I can see my wrapped up Java Bean on PowerBuilder or on VB.
    Thanks a lot in advance.

    I found it, I have to update the system registry with the .reg file and then the java bean automatically gets listed in the controls list in PB.

Maybe you are looking for

  • "attempting to copy to the disk C:\ failed. the file name was invalid or...

    "attempting to copy to the disk C:\ failed. the file name was invalid or too long." This was the message that I keep getting after trying to "add folder to library" of multiple tracks from an external hard drive. it only happens after a certain perio

  • Record count is double in the Fact tables when compared to Cube data!

    Hello BW Gurus, I have 2 question to be answered! 1. I have a cube which consist of 3 years of data. Due to some bad data in it, I have dropped the cube data completely from fact and dim tables and did an init. from ODS. the load failed due to "No SI

  • IPhone 5 wifi stopped working last night

    It's worked fine over the last couple of months but last night I went to download a song and couldn't get onto my wifi. I've tried to connect to multiple different networks, some with security and some without but it hasn't worked for any of them. I'

  • Displaying large PDFs on iPad

    We are trying to use an iPad (4th gen) to display large PDFs. As part of the inspection process during the construction of a large building, I converted the CAD drawings into PDFs, and I want to download them to my iPad to have during the walk around

  • Windows 8.1 (not RT) installation on Surface RT?

    Hello all,  i'm trying to find an answer to a very simple answer but somehow i can't... is it possible to install Windows 8.1 pro on MS Surface RT? I have 8.1RT version installed but I want it as a work machine and since 8.1RT is not supporting joini