Kifani - only two instances of bean - dispatchCustomEvent fails

11.1.2.1 forms

I have a bean with the implementation defined in CardReader.CardReaderWrapper class.  When the form starts up you can see the init() method is called.  This action creates an instance - see red Objct1.  When I push the button and do the fbean.invoke method, it creates another instance, see red objct2, and the dispatchcustomevent() method fails.  Looks like I should have only one instance of the kifani not two?  It is a failure in the last line of code before the call to forms - dispatchCustomEvent (this);  IM so close...

The console log

init1 *.
1: m_handler = oracle.forms.handler.JavaContainer@171e233
Init2 *.
CardReaderWrapper Objct1 = CardReader.CardReaderWrapper [CardReaderWrapper1, 0, 0, 0 x 0, invalid, layout = java.awt.BorderLayout]

... <-snipped

CardReader.CardReaderWrapper parameter to ALL debugMode

... <-snipped

CardReader.CardReaderWrapper setting mGetATR to 0
Invoking getATR CardReader.CardReaderWrapper
9
CardReaderWrapper Objct2 = CardReader.CardReaderWrapper [CardReaderWrapper2, 2, 2, 373 x 79, layout = java.awt.BorderLayout]
dispatchMessage1 *.
2: m_handler = oracle.forms.handler.JavaContainer@171e233
dispatchMessage2 *.
dispatchMessage3 *.
java.lang.NullPointerException
at oracle.forms.ui.BeanManager.dispatchCustomEvent (unknown Source)
at oracle.forms.ui.VBean.dispatchCustomEvent (unknown Source)
at CardReader.CardReaderWrapper.dispatchMessage (CardReaderWrapper.java:73)
at CardReader.CardReaderWrapper.getATR (CardReaderWrapper.java:138)
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 oracle.forms.beans.MethodHelperPM.invokeMethod (unknown Source)
at oracle.forms.beans.MethodPM.setProperty (unknown Source)
at oracle.forms.ui.VBean.setBeanProperty (unknown Source)
at oracle.forms.ui.VBean.setProperty (unknown Source)
at oracle.forms.handler.ComponentItem.setCustomProperty (unknown Source)
at oracle.forms.handler.ComponentItem.onUpdate (unknown Source)
at oracle.forms.handler.JavaContainer.onUpdate (unknown Source)
at oracle.forms.handler.UICommon.onUpdate (unknown Source)
at oracle.forms.engine.Runform.onUpdateHandler (unknown Source)
at oracle.forms.engine.Runform.processMessage (unknown Source)
at oracle.forms.engine.Runform.processSet (unknown Source)
at oracle.forms.engine.Runform.onMessageReal (unknown Source)
at oracle.forms.engine.Runform.onMessage (unknown Source)
at oracle.forms.engine.Runform.processEventEnd (unknown Source)
at oracle.ewt.lwAWT.LWComponent.redispatchEvent (unknown Source)
at oracle.ewt.lwAWT.LWComponent.processEvent (unknown Source)
at java.awt.Component.dispatchEventImpl (unknown Source)
at java.awt.Container.dispatchEventImpl (unknown Source)
at java.awt.Component.dispatchEvent (unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent (unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent (unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent (unknown Source)
at java.awt.Container.dispatchEventImpl (unknown Source)
at java.awt.Window.dispatchEventImpl (unknown Source)
at java.awt.Component.dispatchEvent (unknown Source)
at java.awt.EventQueue.dispatchEventImpl (unknown Source)
at java.awt.EventQueue.access$ 500 (unknown Source)
in java.awt.EventQueue$ 3.run (unknown Source)
in java.awt.EventQueue$ 3.run (unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.ProtectionDomain$ JavaSecurityAccessImpl.doIntersectionPrivilege (unknown Source)
in java.security.ProtectionDomain$ JavaSecurityAccessImpl.doIntersectionPrivilege (unknown Source)
in java.awt.EventQueue$ 4.run (unknown Source)
in java.awt.EventQueue$ 4.run (unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.ProtectionDomain$ JavaSecurityAccessImpl.doIntersectionPrivilege (unknown Source)
at java.awt.EventQueue.dispatchEvent (unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters (unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter (unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy (unknown Source)
at java.awt.EventDispatchThread.pumpEvents (unknown Source)
at java.awt.EventDispatchThread.pumpEvents (unknown Source)
at java.awt.EventDispatchThread.run (unknown Source)

a time new form instance

FBean.Register_Bean('TEST.) CARD_READER_BEAN_AREA', 1, 'CardReader.CardReaderWrapper');

FBean.set_logging_mode('TEST.) CARD_READER_BEAN_AREA', 1, FBEAN. LOG_ALL);

When button pressed

fbean. Invoke('TEST.) CARD_READER_BEAN_AREA', 1, 'getATR');

When-custom-point-event

DECLARE
eventName varchar2 (30): =: system.custom_item_event;
eventValues ParamList;
number of eventValueType;
tempString varchar2 (100);
BEGIN
message ('Hello1'); take a break;
IF (eventName = "CARDINFO_EVENT") THEN
eventValues: = get_parameter_list(:system.custom_item_event_parameters);
get_parameter_attr (eventValues, 'CARDINFO_DATA', eventValueType tempString);
END IF;
message ("Hello2: ' |") tempString); take a break;

- Then do something with tempString...
-for example
-message ("payload has been: ' |") tempString);
: test. ATR: = tempString;
END;

package, card reader;

import java.util.List;

Javax.smartcardio import. *;

Import oracle.forms.ui.VBean;
Import oracle.forms.properties.ID;
Import oracle.forms.handler.IHandler;
Import oracle.forms.ui.CustomEvent;

SerializableAttribute public class CardReaderWrapper extends kifani {

Property registered under the name of the custom event
Call it what you want...
public static final ID CARDINFO_EVENT = ID.registerProperty ("CARDINFO_EVENT");

Property to set the name of the parameter that contains the payload
the event - for example your data
public static final ID CARDINFO_DATA = ID.registerProperty ("CARDINFO_DATA");

A reference to the Forms Manager associated with this component.
It is used to send custom form events
Private Shared IHandler m_handler;

public static String strOut = null; used in part of the code ATR

public CardReaderWrapper() {}
Super();
}

/**
* Method of the oracle.forms.ui.IView class and substitute of the kifani
* base class.  This life cycle method is called one time what forms creates a
the instance of the JavaBean.
*
< B > @param Manager < /b > a reference to the handler for the JavaBean class.
*/
{} public void init (Manager IHandler)
System.out.println ("* init1 *");
Super.init (Handler);
Manager = m_handler;
If (m_handler == null) {}
System.out.println ("1: m_handler is null"); }
else {}
System.out.println ("1: m_handler =" + m_handler) ;}
System.out.println ("* init2 *");
System.out.println ("CardReaderWrapper Objct1 =" + this);

}

/**
* Function to dispatch an event and the data payload
* Return to forms
* In this case, we use the pre-defined event and the IDs payload
*
@param payload < b > < /b > to return to the event data.
*/
Private Sub dispatchMessage (String payload) {}
try {}
System.out.println ("CardReaderWrapper Objct2 =" + this);
System.out.println ("* dispatchMessage1 *");

If (m_handler == null) {}
System.out.println ("2: m_handler is null"); }
else {}
System.out.println ("2: m_handler =" + m_handler) ;}

The CustomEvent = new CustomEvent (m_handler, CARDINFO_EVENT);
System.out.println ("* dispatchMessage2 *");
m_handler. SetProperty (CARDINFO_DATA, payload);
System.out.println ("* dispatchMessage3 *");
dispatchCustomEvent (this);
System.out.println ("* dispatchMessage4 *");
} catch (Exception e) {}
e.printStackTrace ();
}
}

Public Shared Sub main (String [] args) {}

CRW CardReaderWrapper = new CardReaderWrapper();
crw.getATR ();
}

the rest of your bean code follows
and calls the dispatchMethod() method, which precedes
to contact forms

public void getATR() {}

Plant of TerminalFactory = TerminalFactory.getDefault ();

CardTerminals cardTerminals = factory.terminals ();
The list < CardTerminal > cardTerminalList;

try {}

cardTerminalList = cardTerminals.list ();

for (CardTerminal cardTerminal: cardTerminalList) {}

If (cardTerminal.isCardPresent ()) {}
Card card;

try {}

map = cardTerminal.connect ("T = 0");

card.beginExclusive ();
} catch (CardException e) {}
strOut = ("8"); This card but with card error
System.out.println (strOut);
dispatchMessage (strOut);
continue;
}
ATR atr = card.getATR ();

Byte [] atrBytes = atr.getBytes ();
strOut = '0' + javax.xml.bind.DatatypeConverter.printHexBinary (atrBytes);
System.out.println (strOut);
System.out.println ("* main1 *");
card.endExclusive ();
System.out.println ("* main2 *");
Card.Disconnect (true);
System.out.println ("* main3 *");
dispatchMessage (strOut);
}
}

} catch (CardException e) {}
System.out.println("7"); no card reader not connected? ») ;
dispatchMessage("7");

}
If (strOut == null) {}
System.out.println("9");
dispatchMessage("9");
}
}
}

 
         

Tags: Oracle Development

Similar Questions

  • first instance LR 6 cc import goes well with the various cards, that one card does not work, usb HDD with only images, map 9571 photos 115GB, sometimes only 300 photos, then wait all night nothing, try the separate subfolders, only two (including su subfo

    trial LR 6 cc import goes well with different cards, that one card does not work, usb HDD with only images, map 9571 115GB, sometimes only 300 photos pics, then wait all night nothing, try separate subfolders, only two subfoldrs(including subfolder) done well, 175, and 125 peaks, other subfolders doesnot work, opendLR as administrator : no difference. I7 import about 60-70%. on the import of only about 300 visible pictures, the other empty square. solution?

    Hi willemm,

    first instance LR 6 cc import goes well with different cards, that one card does not work.

    Could you please develop the issue you are facing?

    What is the image format you import?

    USB HARD drive with only images, card 9571 115GB, sometimes only 300 photos pics

    I would not recommend to import gb 115 library at once.

    Kind regards

    Assani

  • What are the BCD entries to TWO instances of dual boot of Vista professional in TWO separate hard drives?

    What are the BCD entries to TWO instances of dual boot of Vista professional in TWO separate hard drives? -Dell Vostro 1710, my wife had to be returned to Dell, I installed its Vostro hard drive in my Dell Vostro 1710 SAME, but I don't get a menu starting double when I turn on my Vostro. (Both Vista Business operating systems are licensed separately).

    I would like to start his drive hard so that it looks like 'his' office on 'his' computer.

    Thanks for any advice.

    The easiest way is to use the DualBoot Pro.  He has the tools to write the necessary code automatically.  It is excellent for managing the tasks you want to do.

    However, you have a potential license problem.  Even if your Dell has the exact code in the BIOS to activate the copy of Windows on the hard drive of your wife, the computer is only allowed for an OEM copy.  If Dell is back after repairs then you should be OK once you have turned on the hard disk in his computer of your wife. You can delete the entry of additional start with DualBoot Pro menu,

  • Cannot open in only two JPEG files.

    I was not aware of this problem until recently, so I can't tell you when it failed.  I went to search for images in the file and now they won't open.

    I tried in the Gallery of photos, paint and PhotoShop CS2.  I get errors of each of them as written below.

    MS Photo Gallery: Photo Gallery can't open this photo or video.  This file format is not supported or you do not have the latest updates to the photo gallery.

    Paint: C:\Users| Owner | 2009 | 07. IMG_3618.jpg Paint cannot read this file.     Is not a Lea bitmap file, or its format is not currently supported.

    PSCS2: Could not complete your request because we find a unknown or invalid JPEG marker type.

    In his only two files that are July and August 2009, so the files were fine until recently, but it may have been several months since I looked inside.

    I have Vista Home Premium, I believe.

    Thanks in advance.

    Hi BWildAussie,

    ·         Are you able to open other.jpeg files in MS Paint or Windows Photo Gallery?

    ·         You did it of any material changes or software on the computer before this problem?

    ·         What is the file size of JPEG files?

    For now, I suggest you to copy two .jpeg files to another computer and check if you are able to open them.

    Please provide us with more information so that we can help you in a much better way.

    Concerning
    Joel S
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • two instances of Eclipse Simulator Blackberry launch

    Hello

    I recently installed the Java of Blackberry for Eclipse plugin and now I have to run two instances of the Blackberry Simulator to test my application... How can I do?

    Greetings.

    In order to provide an additional instance of the BB Simulator, navigate to your appropriate path of the Simulator installed with the plugin (in may case: "R:\Eclipse BB 1.3\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator").

    Inside this folder, create a .bat file (IE, sim1.bat) with the following:

    off @echo

    fledge.exe/app = Jvm.dll / Pocket = 9800/session for partner = Sim1/app-param = JvmAlxConfigFile:9800.xml/data-port = 0x4d44/data-port = 0x4d4e /pin = 0x2100000B/app-param = regVersion = 3 /app-param=regDestIP=127.0.0.1/app-param = regDestPort = / app-param 19781 = regSrcPort = 19783/app-param = DisableSyncServiceRecord/title = BlackBerry 9800-1 Simulator.

    To run the new Simulator, run the .bat file.

    You want to run your application in two Simulator, whenever you make any changes to your source code, you will need to run the default Simulator first.

    (I should mention that the previous worked only with the JDE 1.3... who has the 9800 for its default Simulator).

    I hope this be useful.

  • Two instances of Toolbox - how to eliminate a?

    The subject says it all.  Whenever I start my S10e Netbook, I get two Toolbox icons in the system tray.  They are not in the startup folder, so they must have launched via the registry? or elsewhere.  How can I get rid of one of them?

    Bill

    Never mind.

    Toolbox set in place a reminder that there is a newer version.  So I downloaded and installed, rebooted, and now there is only one instance of Toolbox running.  No idea why there were two before.

  • How to set up the grid to use two instance.

    Hi all
    I use oracle linux 5.4
    Openfiler 2.9
    11g R2 grid

    How to use two instance
    If my only one instance is stopped another should so be living.
    How to do this?
    Please help me thannks in advance.

    Nisha.

    Hello

    Read this white paper, this should explain most of your questions...

    Automatic management with Oracle RAC 11g Release 2 (PDF)
    http://www.Oracle.com/technetwork/database/clustering/overview/awm11gr2-130711.PDF

    Concerning
    Sebastian

  • I am not able to change the video quality for you tube. There are only two options 360 and Auto. Please help me.

    Hi I am experiencing strange problem for 15 to 20 days and I am not able to change the video quality for you tube. There are only two options 360 and Auto. Help me please if you can because I have a slow internet connection and I want to play video at 240, as it was before. Thanks in advance for your help.

    Could check you whether YouTube is to serve its HTML5 player or the player based on Flash? If you right click on the drive, short a context menu should appear. If the full Firefox context menu is displayed, press and release the ALT key to erase that. The last line of the menu short usually indicates which player he is.

    I'll assume HTML5 because...

    On Windows 7, Firefox should show a wide range of formats in the HTML5 player. However, if some of the features of media are disabled, preventing video MP4 decoding, then YouTube offers only 360 p (with WebM coding).

    If you have intentionally disabled Media Foundation and/or DirectShow in topic: config, then perhaps you would prefer to use the YouTube Flash Player? There are a few Add-ons that can force YouTube to serve you a Flash drive. Either of them will do, you don't need both:

  • Why web pages fill in only two-thirds of the window?

    Web sites are filled only two-thirds of the browser windows. The rest is a transparent section.

    I found the solution through the modules and extensions. The faulty extension or misconduct was the user Styles Manager. Instantly on allowing it, truncated web pages appeared again. Neutralizing him immediately withdrew the question. I am not sure if the style has been accidentally changed but no worries. It is not an indispensable extension.

    See the image below for what looked like the screen until I disabled the user Styles Manager

  • My USB to ethernet adapter works only if plugged into my MacBook Pro. I tried to use to start an expander USB (power strip), but this has not--a problem when you have only TWO USB ports ports! Any suggestions?

    My USB to ethernet adapter works only if plugged into my MacBook Pro.

    I tried to use to start an expander USB (power strip), but this has not--a problem when you have only TWO USB ports ports!

    Any suggestions?

    Juice what 'expander' did you use?

    What model of MacBook Pro?

    This is the Office Mac Pro forum. I asked that your post be moved to the MacBook Pro laptop forum.

  • I just took three photos with the iPhone 5.  Only two of the pictures now appear on my iMac.  What happened to the third picture?

    I just took three pictures with my iPhone, and only two of the photos were sent to my iMac.  What happened to the third picture?

    Sorry, but we cannot see you then you will need to provide us with information - not only an abstract problem

    Wigh no information my guess is the time and the third photos may not be synchronized with the time

    LN

  • I have an iMac (2015).  When I open Garageband, there are only two buttons on the control bar, play and stop.  No record button, rewind or ff.  Where are they and how can I make it appear?

    I have an iMac (2015). When I open Garageband, there are only two buttons on the control bar, play and stop. No record button, rewind or ff. Where are they and how can I make it appear?

    Try to enlarge the GarageBand window by dragging the corners of resizing.

    If she looks like this, your window is small:

    You can also try to click the double arrow at the end of the toolbar to reveal more options.

  • By clicking on an icon home re - opens a lot of tabs from a previous session, even if I closed with "Exit and save" with only two legs

    For the comm.

    I'm a little frustrated. I had a session with maybe 20 open tabs. I closed the browser by selecting just "Quit". Whenever a new start, all these tabs open again. So - I delete them all and let two tabs open. My home page and my email page say. Then I left and select "Save and Quit".

    I start again - and all is well. Only two tabs there. I support on ^ T to open another tab. Do something and get tired of deicide both to display my home page in this tab - so I click on the Home icon below the menu bar - and guess what - all those f * k 20. tablets reappear remember all these ugly sites I looked at weeks.

    Can you please clean this behavior?

    Thank you

    I do not see that in the post - so I will add here:

    Version 3.8.6 on Windoz 7.

    Check your list of home pages, Firefox can store many home pages.

    How to set the home page

  • Windows says FireFox must be updated but cannot be because the two instances are running, which is not true. It happens everytime I open FireFox

    Windows says FireFox must be updated but cannot be because the two instances are running, which is not true. It happens everytime I open FireFox

    This has happened

    Each time Firefox opened

    == June 28 2010

    Firefox 3.6.6 came out on 26/06/2010 to solve problems that some were plagued with the new crash protection feature introduced in Firefox 3.6.4. NOTE: Version 3.6.5 has been used for another product, so there is a "jump" in the version numbers.

    You need to update to the latest version, Firefox 3.6.6.

  • Only two home screens.

    Anyone know if you can add several screens at home in addition to using a different pitcher? The Turbo has only two.

    It is more drag an icon to the far right, and it creates a different homescreen for you. I stopped at 10, but it seems delete home screens that have no shortcuts icon.

    Just with the turbo Droid and I've now had it 10, do not know what is the limit.

    Hope this helps: 0)

Maybe you are looking for

  • I installed Firefox today but it does not open and the icon in the taskbar will not close and I can't uninstall it and the helper does not work either?

    I tried everything I know to uninstall the new version of Firefox. I also installed Aurora beta and it had the same behavior, and I managed to uninstall that. I can't open a browser ff to work on it with the help of a large part of your support infor

  • How can I remove the 'bookmarks' taking place in the bookmarks toolbar?

    I love the bookmarks toolbar, and I filled it with really useful bookmarks. Of course, I have still a long list of bookmarks that are accessible from the bookmarks menu, but those I love are in the bookmarks toolbar. Firefox 6a stolen space between t

  • Satellite A40: HARD drive no longer works

    I have a Toshiba Satellite A40 with a 40 GB hard drive that was supplied as standard.I have had absolutely no problems with it since buying it... so far. On September 19 I left my laptop (do nothing) for a while I had to rush. I went back to the 'blu

  • Dv2000 upgrade CPU

    I currently have a Hp pavilion dv2315nr with an AMD Turion (1.6 GHz, a nucleus). I'm moving to an AMD Turion x 2 (2.4 GHz, dual core). My question is if 1, the CPU I think is even compatible with my laptop and 2, if my current processor is even exten

  • Windows Update error Code 80070020

    Vista Home Premum SP2. I tried to install KB2563894 in Windows Update and get the code 80070020.  I followed all of the info on aid and searched the forums without help.  I contacted officials of 3 Ms.  2 says to reload Windows and 1 said just hide.