Issue with progress indicator in oracle forms
Thread moved from Forms
Hi all,i have developed a new custom form,I have 3 windows in my form.When i am opening first window and closing,this works fine but when i opening second window and try to close it Progress indicator pops up.There's nothing much of a coding part in my button which brings up the 2nd window
When-button-pressed
SHOW_WINDOW('POINSPECT');
GO_BLOCK('POINSPECT');I have searched the forums and Google but it brought up nothing.I have changed the pre-form trigger and in app-custom body.
Can anyone suggest me where i am doing wrong.
Any help is appreciated,
Thanks in advance!!
Hi Prakash,
Do not use Data Binding tab to bind the Drop down,
Select Specify Item Values
There in binding tab specify binding and there are few more options to specify Item Text and Item Value.
Please find the below screenshot for the same.
Thanks & regards,
Rajkamal.
Similar Messages
-
Issue regarding Progress Indicator on table row selection
Hi Team,
I have overridden onSelectionListener on a table. On click of any record in the table I am performing some operation which takes few seconds to execute. So, I have to show a processing bar on click of any records in the table till the execution completes. I have added a .gif image as the progress Indicator and referring this in the client attribute of the output text in the columns in the table.
--Code added for the output text in table column
<af:column sortProperty="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.name}"
sortable="false" headerText="#{emqacerts_uiBundle.TAG_NUMBER}" id="c9"
filterable="true" align="center"
inlineStyle="#{row.sn_status eq 'PRINT'?'background-color:#c4ff94;' : row.sn_status eq 'DRAFT'? 'background-color:#ffefa3;':'background-color:#ffffff;'}">
<af:inputText value="#{row.bindings.TagNumber.inputValue}"
label="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.label}"
required="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.mandatory}"
columns="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.displayWidth}"
maximumLength="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.precision}"
shortDesc="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.tooltip}"
id="it6" clientComponent="true">
<f:validator binding="#{row.bindings.TagNumber.validator}"/>
<af:clientAttribute name="loadingIndicatorId"
value="#{backing_Pages_MainPage.loadingIndicatorId}"/>
<af:clientListener method="showWhenBusy" type="click"/>
</af:inputText>
</af:column>--Code in the backing bean
public void setLoadingBox(RichPanelBox loadingBox) {
this.loadingBox = loadingBox;
public RichPanelBox getLoadingBox() {
return loadingBox;
public String getLoadingIndicatorId() {
return getLoadingBox().getClientId(FacesContext.getCurrentInstance());
}--Code in the jsff page for the image
<af:panelBox text="#{emqacerts_uiBundle.PROCESSINGPLEASEWAIT}" id="pb10" clientComponent="true"
binding="#{backing_Pages_MainPage.loadingBox}" inlineStyle="display:none;"
titleHalign="center" background="dark" showDisclosure="false" ramp="highlight">
<af:panelGroupLayout id="pgl5" layout="horizontal" halign="center">
<af:spacer width="60" height="10" id="s1"/>
<af:image source="/images/progress.gif" id="i1"/>
</af:panelGroupLayout>
</af:panelBox>--JavaScript
<af:resource type="javascript">
//Global variable to hold the component ref.
var loadingIndicatorComponent;
function showWhenBusy(event) {
//get the dialog or other component we want to show and hide
var componentId = event.getSource().getProperty('loadingIndicatorId');
loadingIndicatorComponent = AdfPage.PAGE.findComponent(componentId);
if (loadingIndicatorComponent != null) {
AdfPage.PAGE.addBusyStateListener(loadingIndicatorComponent, handleBusyStateCallback);
event.preventUserInput();
else {
AdfLogger.LOGGER.logMessage(AdfLogger.SEVERE, "Requested indicator compoenent not found");
function handleBusyStateCallback(event) {
if (loadingIndicatorComponent != null) {
// Check is this is a dialog as
// this needs different treatment
var isDialog = (loadingIndicatorComponent.getComponentType() == "oracle.adf.RichPopup");
if (event.isBusy()) {
if (isDialog) {
loadingIndicatorComponent.show();
else {
loadingIndicatorComponentId = AdfAgent.AGENT.getElementById(loadingIndicatorComponent.getClientId());
loadingIndicatorComponentId.style.display = "inherit";
else {
if (isDialog) {
loadingIndicatorComponent.hide();
else {
loadingIndicatorComponentId = AdfAgent.AGENT.getElementById(loadingIndicatorComponent.getClientId());
loadingIndicatorComponentId.style.display = "none";
AdfPage.PAGE.removeBusyStateListener(loadingIndicatorComponent, handleBusyState);
</af:resource>My problem is, if I click on any record in the table for first time, progress bar is not displayed. But from second click of any record, it starts displaying.
If anyone has any idea on this then please let me know what the issue is.
Thanks in advance,
KavithaHi John,
Thanks for your quick reply. I tried using af|statusIndicator component. But this doesnt disable the components on the page while the server is busy.
Is there any way to disable the page/make the page read only when the processing is happening ?
Thanks in advance,
Kavitha -
For Update Query with Wait Clause from ORACLE Forms
Hi
We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
We have checked the following properties in the database Block
*1) Locking Mode is set to Automatic*
*2) Update Changed Columns only is set to YES*
*3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.Why have you started another thread on the same thing?
FOR UPDATE cursor is causing Blocking/ Dead Locking issues
Just use one thread to avoid confusion.
The fact that nobody has answered on the other thread for a couple of days could be to do with it being the weekend and most people are not at work.
Either be patient or, if it's more "urgent" than that, raise a SR/Tar with Oracle metalink. -
Can't get past gray screen with progress indicator... Help
I can't turn on my Macbook. It starts but won't go past the gray screen with the progress indicator (spinning circle).
I have tried:
1. turning off, removing battery, holding start for 5+ seconds, replacing battery and then turning on.
2. Holding command + option + R + P while staring up, waited for 3+ chimes.
3. holding Shift down while starting up
none of these things are working.
I've been on hold with apple service/support for almost an hour now.
I have an assignment on the computer that is due by midnight.
HELP!
I'm not very computer savvy and this is my first mac.
Any ideas folks??
Thanks.
Macbook Mac OS X (10.4.7)You've done all the standard procedures. If you have any peripherals attached, disconnect them.
This describes resetting the PMU:
http://docs.info.apple.com/article.html?artnum=303319
Did you have the AC disconnected when you did it? I don't have any other ideas.
These are the startup key options:
http://docs.info.apple.com/article.html?artnum=303124
Edit: If you have the install disc stuck in it anyway, can you get the hardware test to work? (Reboot while pressing the D key.) -
Problem with List Item in oracle forms
Hello Experts,
I am new in oracle forms and i am using oracle forms 11g with weblogic 10.3.5 at windows 7.
I have 3 database tables say(tbl_city,tbl_state,tbl_address).
tbl_city
C_ID
C_name
S_ID
0
None
0
1
XYZ
1
2
AS
2
3
AXD
2
tbl_state
ID
s_ID
S_Name
0
None
1
XY
2
ASD
tbl_address
A_ID
A_Street
S_ID
C_ID
1
ABC
1
1
Now I have made an oracle form having data block tbl_address with base table name tbl_address. In the form there are two list: one(list_state) for State_Name & State_ID and another(list_city) for City Name & C_ID display.
Here I want when I set State_name to ASD then List item list_city should be populated with the values having State_NAME=ASD not of State_Name=XY or None.I have tried it to make but not succeeded.I have made a procedure to populate list_city list item as:
-- here item_nm-->List item Name, sel_val & sel_val2 for selecting C_ID and C_NAME, tablNm---->tbl_CITY, whr for where condition, mtch--->selected value of list_State(list item in form)
PROCEDURE list_item(block_nm varchar2,item_nm varchar2,sel_val varchar2,sel_val2 varchar2,tablNm varchar2,whr varchar2,mtch varchar2) IS
group_id RecordGroup;
group_name varchar2(10) :='abc';
status NUMBER;
query1 varchar2(350);
item_name varchar2(20);
match varchar2(50);
BEGIN
match:=mtch;
item_name:=block_nm||'.'||item_nm;
group_id := find_group(group_name);
if not id_null(group_id) then
delete_group(group_id);
end if;
--if whr='' then
-- match:='0';
-- end if;
query1:='select '|| sel_val || ',TO_CHAR('|| sel_val2 || ') from '|| tablNm ||' where '||whr||' = '||mtch;
message(query1);
group_id := Create_Group_From_Query(group_name,query1);
/* Select statement must have two column*/
status := Populate_Group(group_id);
Populate_List(item_name,group_id);
exception
when others then
message('error');
END;
I am not able to guess what trigger in oracle forms should be used to populate list item(list_city). Please help by giving useful suggestion.
Thank You
regards
aaditya979801 wrote:
If I use LOV in place of List Item,Then I have to populate a LOV at run time.How could I maintain a record group n attach to LOV at run time?
On my previous post I have mentioned record group as follows:
select * from tbl_state where s_id=:tbl_address.s_id;
If :tbl_adress.s_id chaned during the time of run, then output values of list_city (LOV) is also changed. -
Issue with dns service in Oracle 6.4
Hi. I have tried to do everything like here setting hostname,domainname and static IP address but it did not help me and i still have issue with resolving DNS names.
[root@node1 etc]# ping 192.168.226.128
PING 192.168.226.128 (192.168.226.128) 56(84) bytes of data.
64 bytes from 192.168.226.128: icmp_seq=1 ttl=64 time=0.049 ms
64 bytes from 192.168.226.128: icmp_seq=2 ttl=64 time=0.053 ms
64 bytes from 192.168.226.128: icmp_seq=3 ttl=64 time=0.068 ms
^C
--- 192.168.226.128 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2320ms
rtt min/avg/max/mdev = 0.049/0.056/0.068/0.011 ms
[root@node1 etc]# nslookup 192.168.226.128
Server: 192.168.226.2
Address: 192.168.226.2#53
** server can't find 128.226.168.192.in-addr.arpa.: NXDOMAIN
[root@node1 etc]# nslookup node1.node.com
Server: 192.168.226.2
Address: 192.168.226.2#53
Non-authoritative answer:
*** Can't find node1.node.com: No answer
[root@node1 etc]# nslookup node1
Server: 192.168.226.2
Address: 192.168.226.2#53
Non-authoritative answer:
*** Can't find node1: No answer
[root@node1 etc]# nslookup node.com
Server: 192.168.226.2
Address: 192.168.226.2#53
Non-authoritative answer:
*** Can't find node.com: No answer
Meanwhile:
[root@node1 etc]# nslookup oracle.com
Server: 192.168.226.2
Address: 192.168.226.2#53
Non-authoritative answer:
Name: oracle.com
Address: 137.254.120.50
[root@node1 etc]#
my resolv.conf file is:
[root@node1 etc]# cat /etc/resolv.conf
# Generated by NetworkManager
domain localdomain
search localdomain node.com
nameserver 192.168.226.2
[root@node1 etc]#
and
[root@node1 etc]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.226.128 node1.node.com node1
[root@node1 etc]#
[root@node1 etc]# hostname -a
node1
[root@node1 etc]# hostname -d
node.com
[root@node1 etc]# hostname
node1.node.com
DNS configuration RGhost — файлообменник
[root@node1 etc]# rpm -q bind
package bind is not installed
but:
[root@node1 etc]# rpm -q bind-utils
bind-utils-9.8.2-0.17.rc1.0.2.el6.x86_64
and:
[root@node1 etc]# ps -ef | grep -i bind
rpc 1947 1 0 Dec21 ? 00:00:00 rpcbind
nobody 2831 1 0 Dec21 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --local=// --domain-needed --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --bind-interfaces --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override --dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default.hostsfile --addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts
root 8237 19846 0 04:18 pts/2 00:00:00 grep -i bind
so i can not understand why dns is not able to resolve ip or whole name for mentioned hostname?As I understand it..
nslookup does a Name Server Lookup - which means asking the DNS to resolve a hostname to an IP address. Which it only can do if it has that hostname/IP mapping.
In your case, that hostname/IP mapping only exists in /etc/hosts - not in the DNS. Thus the DNS cannot resolve it. -
Issue with multiple digital signatues in form
Hello all-
I'm having an issue with a form that has multiple digital signatures. The form additionally has a listbox in which the user can select recipients to email the form to. My objective is to be able to send a form to various users by email to sign digitally. After extending the features for Reader, I inserted a standard Livecycle digital signature by clicking on one of the digital signature fields. However, after inserting the digital signature, I can't perform any other actions (email the form by selecting recipients from the listbox, clicking a different digital signature field for signature insertion, etc.) It is as if the digital signature instertion made an uneditable snapshot of the form, which I do not want to do. What can I do to rectify this process?
Will upload the form if necessary.
Thank you and happy holidays.
masber2000Mr. Kumar,
The desired workflow is for
1) Firefighter 1 to complete the top portion of the Agreement
section, sign in the Firefighter 1 signature field (which locks the top
portion of the Agreement Section), then select Firefighter 2 from the
e-mail drop down list and e-mail the PDF form to Firefighter 2;
2) Firefighter 2 opens the e-mail and the PDF attachment,
completes the second portion of the Agreement Section, sign in the
Firefighter 2 signature field (which locks the bottom portion of the
Agreement Section), select Lieutenant 1 from the e-mail drop down list
and e-mail the PDF form to Lieutenant 1;
3) Lieutenant 1 opens the e-mail and the PDF attachment, checks
the approved box, signs the Lieutenant 1 signature field, select
Lieutenant 2 from the e-mail drop down list and e-mail the PDF form to
Lieutenant 2;
4) Step three continues through Lieutenant 2, Battalion Chief 1
and Battalion Chief 2
5) Battalion Chief 2 sends the fully completed form back to
Firefighter 1 who copies the completed form to Firefighter 2
Note: if any of the officers disapprove the agreement the disapproved
form is immediately sent back to Firefighter 1
Jim Frazier, Deputy Chief
Villages Public Safety Department
3035 Morse Boulevard
The Villages, FL 32163
352-205-8280
Honor in Service -
Urgent :- Issue with deploying application in Oracle Application server
Hello All,
Hope all of you are doing good ! I am facing an issue relating to deploying applications using the Enterprise manager. When i deploy the war file using Deploy WAR file option in the OEM, i get the following error -
Failed to deploy web application "gCube". Failed to deploy web application "gCube". . The configuration files for this OracleAS 10G instance are inconsistent with the
configuration stored in the repository. In order to protect the repository,
no further configuration or deployment operations are allowed until the problem with the configuration on the filesystem is resolved. This condition arises when a prior operation was unsuccessful. The exception associated with this failed operation is:
{0}
. Please also check the logs located at
ORACLE_HOME/dcm/logs to determine why DCM was unsuccessful in updating
the configuration files on disk. Some possible causes are:
* permissions on files
* file contention issues on Windows NT
* internal Oracle error
After resolving the problem that prevented DCM from updating the configuration
files, you may use the dcmctl resyncInstance command to resolve the problem.
Alternatively, you can stop and then restart the active dcmctl or EMD
process and resyncInstance will automatically be performed.
Root Cause: invalid stream header
Resolution: . invalid stream header
Please could you throw some light on this issue and also provide a resolution to fix this issue at the earliest ?
Your help in this , will be greatly appreciated.
Thanks and Regards,
Ramanan.Hello All,
Could anyone assist me with a fix for the problem ?
Would appreciate it greatly.
Thanks. -
Issue with archiving (opentext) of adobe forms
Hi ,
We have an issue with archiving (open text) of adobe forms. When unfinished processes are restarted using Tcode /OTEI/PF_RESTART empty forms without data are archived. We are checking these forms using Tcode J6NY. PDF form is stored but data entered while processing the forms in portal is missing.
Any suggestion or help is highly appreciated.
Regards,
KishoreHi Prakash,
Do not use Data Binding tab to bind the Drop down,
Select Specify Item Values
There in binding tab specify binding and there are few more options to specify Item Text and Item Value.
Please find the below screenshot for the same.
Thanks & regards,
Rajkamal. -
Attach Forms With Comm Port in Oracle Forms
I am trying to make connection of Oracle forms Builder with my device using comm port but i dnt know the complete procedure to attach the comm with oracle forms also i have no idea to convert asquii data to normal form.Please any one help me to attach comm port with my oracle forms and also convert asqui code which is showing on hyper terminal into normal data.Also I am using oracle forms 6i
Make a java component (PJC) and use a rxtx library (http://rxtx.qbang.org/wiki/index.php/Examples) ...
I have made a PJC to use a RS232 port from oracle forms for Hypercom POS terminal..
Here is my code (in short i will post a component on PJC site (here I can't post a complete code because of 30000 char limit ;) )..
If you look in method "public void init(IHandler handler) " I make a download of rxtxSerial.dll from my forms server and then I call System.loadLibrary("rxtxSerial");"
In other way you must put the dll in windows/system32 path.. This dll is native library for rs232 communication.
If you look at the method "public void doTransaction" you can see the initialization of comm port...
With inputStream and OutputStream you read and write datas to/from your rs232 port..
p.s: the code is not complete but you can see how I made the rs232 communication (also the code is not final ;) )
====================================================
public class PosTerminalPjc extends VBean {
private static final long serialVersionUID = -8814623494538014849L;
Properties res = new Properties();
SerialPort serialPort;
OutputStream os;
InputStream is;
CommPortIdentifier portId;
Enumeration portList;
IHandler mHandler;
Random randomGenerator = new Random();
char STX = 2;
char ETX = 3;
char EOT = 4;
char ACK = 6;
char NAK = 15;
char FS = 28;
private static final ID COMPORT = ID.registerProperty("COMPORT"); // serial port (COM1,COM2,COM3,...)
private static final ID AMOUNT = ID.registerProperty("AMOUNT"); // amount of the transaction (12)
private static final ID TRANSACTIONTYPE = ID.registerProperty("TRANSACTIONTYPE"); // SALE, REFUND
private static final ID EXECUTE = ID.registerProperty("EXECUTE"); // invoke doTransaction();
//Output parameters to form
private static final ID TRANSACTIONPROCESSED = ID.registerProperty("TRANSACTIONPROCESSED");
private static final ID TRANSACTIONFLAG = ID.registerProperty("TRANSACTIONFLAG");
private static final ID TRANSACTIONNUMBER = ID.registerProperty("TRANSACTIONNUMBER");
private static final ID BATCHNUMBER = ID.registerProperty("BATCHNUMBER");
private static final ID TRANSACTIONDATE = ID.registerProperty("TRANSACTIONDATE");
private static final ID TRANSACTIONTIME = ID.registerProperty("TRANSACTIONTIME");
private static final ID TRANSACTIONAMOUNT = ID.registerProperty("TRANSACTIONAMOUNT");
private static final ID CARDDATASOURCE = ID.registerProperty("CARDDATASOURCE");
private static final ID NUMBERCUSTOMERCARD = ID.registerProperty("NUMBERCUSTOMERCARD");
private static final ID EXPIRATIONDATE = ID.registerProperty("EXPIRATIONDATE");
private static final ID TERMINALID = ID.registerProperty("TERMINALID");
private static final ID MERCHANTID = ID.registerProperty("MERCHANTID");
private static final ID COMPANYNAME = ID.registerProperty("COMPANYNAME");
private static final ID SEQUENTIALNUMBER = ID.registerProperty("SEQUENTIALNUMBER");
private static final ID ERRORDESC = ID.registerProperty("ERRORDESC");
//Events
private static final ID EVT_OK = ID.registerProperty("EVT_OK"); //custom event if all ok
private static final ID EVT_ERR = ID.registerProperty("EVT_ERR"); //custom event if error occured
// state machine variables
long l_timeout;
long l_wait_for = 5000; // pos terminal wait for command (5 seconds)
long l_wait_for_transaction = 62000 * 2; // pos terminal timeout
long l_second = 1000; // one second
byte b_retry = 0;
String dataValue = "";
byte[] readBuffer = new byte[2000]; //2000 bytes buffer to read rs232 stream
String comPort = ""; // local variable to store com port name
// (COM1,COM2,...)
String transactionType = "SALE"; // type of transaction to be executed (SALE
// or REFUND) default SALE
String amount = "0"; // default amount value is set to 0
//output paramerers
String transactionProcessed = "";
String transactionFlag = "";
String transactionNumber = "";
String batchNumber = "";
String transactionDate = "";
String transactionTime = "";
String transactionAmount = "";
String cardDataSource = "";
String numberCustomerCard = "";
String expirationDate = "";
String terminalId = "";
String merchandId = "";
String companyName = "";
String sequentialNumber ="";
String errorDescription;
public PosTerminalPjc() {
super();
System.out.println("============================");
System.out.println("== State machine POS v1.0 ==");
System.out.println("== Peter Valencic (c) ==");
System.out.println("== 03.04.2012 ==");
System.out.println("============================");
System.out.println("java.library.path: "+System.getProperty("java.library.path"));
try {
res.load(this.getClass().getResourceAsStream("/res/language.properties")); // load language file
} catch (Exception ex) {
System.err.println("Err loading language.properties file: "
+ ex.toString());
public void init(IHandler handler)
super.init(handler);
this.mHandler = handler;
System.out.println("init handler ok");
System.out.println("code base: "+handler.getCodeBase());
//load dll from codeBase URL
try
String mylibName = "rxtxSerial.dll";
String URLpath = "http://dekani:7777/forms/java/";
System.out.println("URL: "+ URLpath + mylibName);
URL libUrl = new URL(URLpath+mylibName);
System.out.println("libUrlgetFile: " + libUrl.getFile());
File file = new File(mylibName);
System.out.println(file);
if (!file.exists())
file.createNewFile();
URLConnection urlc = libUrl.openConnection();
InputStream in = urlc.getInputStream();
FileOutputStream out = new FileOutputStream(file);
byte[] buffer = new byte[1048];
int read;
while ((read = in.read(buffer)) != -1){
out.write(buffer, 0, read); // write
out.close();
in.close();
System.loadLibrary("rxtxSerial");
catch(Exception exc)
System.err.println("Exception SystemLoadLibrary: " + exc.toString());
this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_lib"));
private void doTransaction() throws Exception {
String sequentialNumber = ""+getRandomInteger(1000,9000,randomGenerator);
String phase = null; // initial null value for state machine phase
long l_ack_timeout = 0; //initial value for acknowledge timeout
// com port check
if (getComPort().trim().equalsIgnoreCase("")) {
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_com_invalid"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_com_invalid"));
dispatchCustomEvent(ce);
return;
// transaction type chek
System.out.println(this.getTransactionType());
if (!getTransactionType().equalsIgnoreCase("REFUND")
& !getTransactionType().equalsIgnoreCase("SALE")
& !getTransactionType().equalsIgnoreCase("TICKET")
& !getTransactionType().equalsIgnoreCase("VOID")
this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_tran_invalid_type"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_tran_invalid_type"));
dispatchCustomEvent(ce);
return;
portList = portId.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
System.out.println(portId.getName());
if (portId.getName().equalsIgnoreCase(this.getComPort())) {
System.out.println("Port is used : "
+ portId.isCurrentlyOwned());
serialPort = (SerialPort) portId.open("ComDriver", 2000);
serialPort.setSerialPortParams(9600, SerialPort.DATABITS_7,
SerialPort.STOPBITS_1, SerialPort.PARITY_EVEN);
serialPort.notifyOnDataAvailable(true);
serialPort.notifyOnOutputEmpty(true);
os = serialPort.getOutputStream();
is = serialPort.getInputStream();
break;
if (portId == null) {
this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_com_not_found"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_com_not_found"));
dispatchCustomEvent(ce);
return;
else if (portId.getName().equalsIgnoreCase(this.getComPort()) == false)
this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_com_not_found"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_com_not_found"));
dispatchCustomEvent(ce);
return;
// state machine infinite loop
while (true)
// SEND DATA TO POS TERMINAL
if (phase == null)
System.out.println("start phase");
byte[] req = null;
//verify transaction type to be SALE or REFUND
//if REFUND then transaction number must be specified
if (getTransactionType().equalsIgnoreCase("SALE")) {
System.out.println("--> SALE send message to the pos terminal");
System.out.println("--> amount: " + amount);
req = protocolStream("000000"+sequentialNumber+"01100" + FS + amount + FS
+ FS + "+0" + FS + "978" + FS + FS + FS + FS + FS
+ FS + FS + ETX);
else if (getTransactionType().equalsIgnoreCase("REFUND")) {
System.out.println("--> REFUND send message to the pos terminal");
System.out.println("--> amount: " + amount);
System.out.println("--> transaction number: " + getTransactionNumber());
req = protocolStream("000000123405100" + getTransactionNumber() + FS + amount
+ FS + FS + "+0" + FS + "978" + FS + FS + FS + FS
+ FS + FS + FS + ETX);
else if (getTransactionType().equalsIgnoreCase("VOID")) {
System.out.println("--> VOID transaction");
System.out.println("--> amount: " + amount);
System.out.println("--> transaction number: " + getTransactionNumber());
req = protocolStream("000000123410100" + getTransactionNumber() + FS + FS + FS + "+0" + FS + "978" + FS + FS + FS + FS
+ FS + FS + FS + ETX);
else if (getTransactionType().equalsIgnoreCase("TICKET")) {
System.out.println("--> TICKET duplicate");
req = protocolStream("000000123413100" + getTransactionNumber() + FS + FS + FS + "+0" + FS + "978" + FS + FS + FS + FS
+ FS + FS + FS + ETX);
else {
//nothing ;)
os.write(req);
os.flush();
l_ack_timeout = System.currentTimeMillis() + 1500;
//wait for half second
Thread.sleep(500);
l_timeout = System.currentTimeMillis() + l_wait_for; //add some time for timeout
phase = "TO_POS_ACK";
System.out.println("phase: " + phase);
}//phase null
//CHECK IF THE TIMEOUT OCCURED
if (phase.equalsIgnoreCase("TO_POS_ACK") & (l_timeout < System.currentTimeMillis()) & (b_retry < 4))
b_retry += 1;
System.out.println("TIMEOUT: " + b_retry);
l_timeout = System.currentTimeMillis() + l_wait_for;
if (b_retry >= 4) {
System.out.println("Timeout occured");
closePort();
this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_timeout"));
break;
//CHECK FOR THE ACKNOWLEDGE (FIRST RESPONSE FROM POS TERMINAL)
if (phase.equalsIgnoreCase("TO_POS_ACK") &
(l_ack_timeout < System.currentTimeMillis())) {
try {
int numBytes = 0;
dataValue = "";
while ((numBytes = is.read(readBuffer)) > 0) {
dataValue += new String(readBuffer, 0, numBytes, "ASCII");
if (dataValue.getBytes().length > 0) {
System.out.println("->first byte: " +
dataValue.getBytes()[0]);
System.out.println("total length: " +
dataValue.getBytes().length);
//check for ack byte
if (dataValue.getBytes()[0] == 6) {
System.out.println(
"<--ACKNOWLEDGE received from pos terminal");
phase = "WAIT_FOR_TRANSACTION";
l_timeout = System.currentTimeMillis() + l_wait_for_transaction;
System.out.println("-> wait for transaction response");
} catch (IOException ev) {
//WAIT FOR TIMEOUT ON MESSAGE (watch dog timer)
if (phase.equalsIgnoreCase("WAIT_FOR_TRANSACTION") &
(l_timeout < System.currentTimeMillis())) {
System.out.println(
"Error receiving response from pos terminal!!!");
closePort();
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_response_error"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_response_error"));
dispatchCustomEvent(ce);
break;
//WAIT FOR SOME DATA TO COME FROM POS TERMINAL OVER RS232
if (phase.equalsIgnoreCase("WAIT_FOR_TRANSACTION")) {
try {
int numBytes = 0;
dataValue = "";
Thread.sleep(500);
while ((numBytes = is.read(readBuffer)) > 0) {
dataValue += new String(readBuffer, 0, numBytes, "ASCII");
if (dataValue.getBytes().length > 0) {
System.out.println("->first byte: " +
dataValue.getBytes()[0] + "|" +
dataValue.getBytes()[1]);
System.out.println("->ascii: " + dataValue);
System.out.println("total length: " +
dataValue.getBytes().length);
if (dataValue.indexOf("PREKINIL UPORABNIK") != -1) {
System.out.println(
"Uporabnik je prekinil povezavo!");
closePort();
//transaction cancelled by user s_user_cancel
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_user_cancel"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_user_cancel"));
dispatchCustomEvent(ce);
break;
if (dataValue.indexOf("NAPACEN VNOS") != -1) {
System.out.println("Napačen vnos");
closePort();
//invalid user entry
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_user_invalid_entry"));
if (this.mHandler != null)
CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
this.setErrorDescription(res.getProperty("s_user_invalid_entry"));
dispatchCustomEvent(ce);
break;
if (dataValue.indexOf("PROSIM POCAKAJ") != -1) {
System.out.println("<-- PROSIM POCAKAJ");
continue;
//preberemo podatke iz stringe terminala
if (dataValue.indexOf("SPREJETO") != -1) {
closePort();
System.out.println("<-- TRANSAKCIJA SPREJETA");
System.out.println(dataValue);
StringTokenizer st = new StringTokenizer(dataValue, "\034" );
String dv = st.nextToken();
sequentialNumber = dv.substring(6,10);
transactionProcessed = dv.substring(1, 3);
transactionFlag = dv.substring(13,15);
transactionNumber = dv.substring(15,21);
batchNumber = dv.substring(21,25);
transactionDate = dv.substring(25,31);
transactionTime = dv.substring(31,37);
transactionAmount = st.nextToken();
st.nextToken(); //Amount exponent
st.nextToken(); //Amount currency
cardDataSource = st.nextToken();
numberCustomerCard = st.nextToken();
expirationDate = st.nextToken();
st.nextToken(); // authorization code
terminalId = st.nextToken();
merchandId = st.nextToken();
companyName = st.nextToken();
System.out.println("================");
System.out.println(transactionProcessed);
System.out.println(transactionFlag);
System.out.println(transactionNumber);
System.out.println(batchNumber);
System.out.println(transactionDate);
System.out.println(transactionTime);
System.out.println(transactionAmount);
System.out.println(cardDataSource);
System.out.println(numberCustomerCard);
System.out.println(expirationDate);
System.out.println(terminalId);
System.out.println(merchandId);
System.out.println(companyName);
if (this.mHandler != null)
System.out.println("dispatch custom event");
CustomEvent ce = new CustomEvent(this.mHandler, EVT_OK);
dispatchCustomEvent(ce);
return;
} catch (IOException ev) {
System.err.println("Exception sm: " + ev.toString());
System.out.print('*');
Thread.sleep(200);
}//end state machine loop
* protocolStream prepare the stream to be send over RS232 to POS terminal
* with LRC cheksum control
* @param data
* @return byte[]
private byte[] protocolStream(String data) {
char STX = (char) 0x02;
String tmp = "" + STX + STX + data + "" + getLRC(data);
System.out.println("PStream: " + tmp);
for (int i = 0; i < tmp.getBytes().length; i++) {
System.out.print(tmp.getBytes() + ":");
return tmp.getBytes();
* close port and stream
private void closePort()
try {
serialPort.close();
is.close();
os.close();
} catch (Exception ee) {
* Longitudinal Redundancy Check (LRC)
* @param packet
* @return String
private String getLRC(String packet) {
char[] splitPacket = packet.toCharArray();
char lrc = 0x00;
for (int x = 0; x < splitPacket.length; x++) {
lrc = (char) (lrc ^ splitPacket[x]);
return "" + (char) lrc;
private String paddingString(String s, int n, char c, boolean paddingLeft) {
if (s == null) {
return s;
int add = n - s.length(); // may overflow int size... should not be a
if (add <= 0) {
return s;
StringBuffer str = new StringBuffer(s);
char[] ch = new char[add];
Arrays.fill(ch, c);
if (paddingLeft) {
str.insert(0, ch);
} else {
str.append(ch);
return str.toString();
public boolean setProperty(ID id, Object value)
if (id.toString().equalsIgnoreCase("COMPORT")) {
setComPort((String)value);
System.out.println("RS232 com port: " + getComPort());
return false;
if (id.toString().equalsIgnoreCase("AMOUNT")) {
this.setAmount((String)value);
System.out.println("Amount value: " + getAmount());
return false;
if (id.toString().equalsIgnoreCase("TRANSACTIONTYPE")) {
this.setTransactionType((String)value);
System.out.println("Transaction Type value: " + this.getTransactionType());
return false;
if (id.toString().equalsIgnoreCase("EXECUTE")) {
System.out.println("Invoke pos terminal");
try
doTransaction();
catch(Exception ex)
System.err.println("Execute Exception>> " + ex.toString());
this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_gen_exception"));
return false;
return false;
* Display error message inside oracle form
* @param title
* @param exceptionString
private void showError(String title, String exceptionString) {
JOptionPane.showMessageDialog(this, exceptionString, title, 0);
Edited by: peterv6i.blogspot.com on May 8, 2012 10:18 AM
Edited by: peterv6i.blogspot.com on May 8, 2012 10:20 AM
Edited by: peterv6i.blogspot.com on May 8, 2012 10:21 AM -
Performance issue with Crystal when upgrading Oracle to 11g
Dear,
I am facing performance issue in crystal report and oracle 11g as below:
In ther report server, I have created a ODBC for connect to another Oracle 11g server. also in report server I have created and published a folder to content all of my crystal report. These report can connect to oracle 11g server via ODBC.
and I have a tomcat server to run my application in my application I refer to report folder in report server.
This way can work with SQL server and oracle 9 or 10g but it facing performance issue in oracle 11g.
please let me know the root cause.
Notes: report server, tomcate server are win 32bit, but oracle is in win 64bit, and i have upgraded DataDirect connect ODBC version 6.1 but the issue can not resolve.
Please help me to solve it.
Thanks so much,
AnhHi Anh,
Use a third party ODBC test tool now. SQL Plus will be using the Native Oracle client so you can't compare performance.
Download our old tool called SQLCON: https://smpdl.sap-ag.de/~sapidp/012002523100006252882008E/sqlcon32.zip
Connect and then click on the SQL tab and paste in the SQL from the report and time that test.
I believe the issue is because the Oracle client is 64 bit, you should install the 32 bit Oracle Client. If using the 64 bit client then the client must thunk ( convert 64 bit data to 32 bit data format ) which is going to take more time.
If you can use OLE DB or using the Oracle Server driver ( native driver ) should be faster. ODBC puts another layer on top of the Oracle client so it too takes time to communicate between the layers.
Thank you
Don -
Issue with using Dropdown in Adobe forms
Hi Gurus,
I am facing an issue with dropdown values after binding with a field in a table,
The first value in the dropdown is getting replaced by the selected value in dropdown in interactive adobe form.
Has any one come across this issue. Please guide me.
Regards,
Prakash.Hi Prakash,
Do not use Data Binding tab to bind the Drop down,
Select Specify Item Values
There in binding tab specify binding and there are few more options to specify Item Text and Item Value.
Please find the below screenshot for the same.
Thanks & regards,
Rajkamal. -
Performance Issue with PAY_BALANCE_VALUES_V View in Oracle R12
Dear all ,
We have recently upgraded from 11i(11.5.10.2) to R12(12.1.3). We are facing one Issue with slow performance of the queries where PAY_BALANCE_VALUES_V is used. We have so many reports & logic in Payroll which uses this View.
In 11i this works fine, however in R12 it takes very long time. There are no configuration changes we have done from 11i to R12.
Is there any way to optimize the performance or alternate way to retrieve the Balances Data in Payroll ?
Any heads up would be highly Appreciated.
Thanks,
RaziHi Razi,
The balance related performance issue is written in the following note.
Note:1494344.1 UK Payslip Generation - Self Service Program Takes Much Time To Complete (Performance Issue)
This issue was fixed in HR_PF.B RUP6 or patch:14376786. Did you apply this patch? If not, I suggest you apply it.
Also, HR_PF.B RUP6 has some balance related performance issues.
If you already have applied HR_PF.B RUP6, I suggest you log a SR with SQL trace.
Thanks,
Hideki -
Issues with loadjava utility on oracle database 10.2.0.4.0
Hi all
Hoping if this is a known issue, am approaching you here .. We have an oracle database in 10.2.0.4.0 version. This database functionality of Websphere Process Server, a product from IBM. In the course we are expected to load a JAR file for a one schema and it fails for some reason with ORA - 07445 errors. I happen to set out SGA_MAX_SIZE and SGA_TARGET at 1024 MB and JAVA_POOL_SIZE at 768MB to allow this loadjava command to run successfully. I also happen to set the LD_LIBRARY_PATH as $ORACLE_HOME/lib on this solaris 10 machine. Below is the command and the error message we are receiving. Please do advice us if this is a known issue or guide us to any information which might help us resolve this issue while we continue searching for a solution.. Many thanks in advance.
Regards!
Sarat
loadjava -user BPCDB/[email protected]:1521:WPSDB -resolve /opt/IBMProc/WebSphere/ProcServer/lib/bpcodbutil.jar -thin -schema BPCDB
Error while testing for existence of dbms_java.handleMd5
No more data to read from socket
Error while testing for existence of "BPCDB".JAVA$CLASS$MD5$TABLE
OALL8 is in an inconsistent state
Error while testing for existence of "BPCDB".JAVA$CLASS$MD5$TABLE
OALL8 is in an inconsistent state
Error while creating "BPCDB".JAVA$CLASS$MD5$TABLE
No more data to read from socket
Error while getting old MD5 of META-INF/MANIFEST.MF
Io exception: Broken pipe
Error while testing for existence of "BPCDB".CREATE$JAVA$LOB$TABLE
Closed Connection
Error while testing for existence of "BPCDB".CREATE$JAVA$LOB$TABLE
Closed Connection
Error while creating "BPCDB".CREATE$JAVA$LOB$TABLE
Closed Connection
Error while getLoadLOB BPCDB
Closed Connection
Error while deleting MD5 of META-INF/MANIFEST.MF
Closed Connection
Error while getting old MD5 of com/ibm/bpe/observer/dbutil/TimestampUtil
Closed Connection
Error while processing com/ibm/bpe/observer/dbutil/TimestampUtil
Exception java.lang.NullPointerException
Error while deleting MD5 of META-INF/MANIFEST.MF
Closed Connection
Error while getShortFromLongnameStmt
Closed Connection
Error while processing class BPCDB.com/ibm/bpe/observer/dbutil/TimestampUtil
Exception java.lang.NullPointerException
Error while getShortFromLongnameStmt
Closed Connection
Exception in thread "main" java.lang.NullPointerException
at oracle.aurora.server.tools.loadjava.ClientSchemaObject.getShortname(C
lientSchemaObject.java:65)
at oracle.aurora.server.tools.loadjava.ClientSchemaObject.status(ClientS
chemaObject.java:91)
at oracle.aurora.server.tools.loadjava.SchemaObject.failure(SchemaObject
.java:799)
at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:85
1)
at oracle.aurora.server.tools.loadjava.LoadJava.command(LoadJava.java:25
1)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.jav
a:103)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.ja
va:28)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ORA-07445 is an untrapped exception, an error, in Oracle's own code.
Open an SR at metalink and update an RDA along with your description of what happened. -
Issue with IN parameter of Oracle Procedure returning two RefCursors...
Hi all,
I'm having a nightmare with an Oracle procedure that takes one input parameter and returns two RefCursors as outputs. I recently got help in this forum getting a procedure to work that took no inputs but returned two refcursors and that's still working fine. So, for my current issue I have a procedure defined as follows:
PROCEDURE getQueueInfo(domainKey char, importQueues OUT ODPNet.refcur, exportQueues OUT ODPNet.refcur) IS
BEGIN
OPEN importQueues FOR SELECT
source_key, source_applid,
import_status(source_key) as status,
time_added, time_processed
FROM wm_import_source_header
WHERE source_id = domainKey
ORDER BY source_key DESC;
OPEN exportQueues FOR SELECT
h.source_key, d.source_applid,
export_status(h.source_key) as status,
d.source_wire_code, d.destination_wire_code, h.time_added,
h.time_transmitted
FROM wm_export_source_header h, wm_export_source_data d
WHERE h.source_key = d.source_key
and d.source_id = domainKey
ORDER BY h.source_key DESC;
END getQueueInfo;This is defined within a package called ODPNet as with my previous procedure and all works fine (I can execute within Oracle SQL Developer and it returns the expected results). Within my .NET application my code is as follows:
try
using (OracleConnection conn = new OracleConnection(connString))
using (OracleCommand comm = new OracleCommand())
comm.CommandText = "ODPNet.getQueueInfo";
comm.CommandType = CommandType.StoredProcedure;
comm.Connection = conn;
OracleParameter domainKey = new OracleParameter();
OracleParameter importQueues = new OracleParameter();
OracleParameter exportQueues = new OracleParameter();
domainKey.OracleDbType = OracleDbType.Char;
importQueues.OracleDbType = OracleDbType.RefCursor;
exportQueues.OracleDbType = OracleDbType.RefCursor;
domainKey.Value = "UKBD72";
domainKey.Direction = ParameterDirection.Input;
importQueues.Direction = ParameterDirection.Output;
exportQueues.Direction = ParameterDirection.Output;
comm.Parameters.Add(domainKey);
comm.Parameters.Add(importQueues);
comm.Parameters.Add(exportQueues);
conn.Open();
comm.ExecuteNonQuery();
OracleDataReader dr1 = ((OracleRefCursor)importQueues.Value).GetDataReader();
OracleDataReader dr2 = ((OracleRefCursor)exportQueues.Value).GetDataReader();
if (dr1.HasRows)
while (dr1.Read())
result6 += dr1["source_applid"].ToString() + "<br>";
else
result6 += "No Rows";
if (dr2.HasRows)
while (dr2.Read())
result7 += dr2["source_applid"].ToString() + "<br>";
else
result7 += "No Rows";
catch (Exception ex)
result6 = ex.ToString();
}The value I want to submit as the IN parameter of the procedure is "UKBD72". but I'm really not sure how to apply this and then return my two refcursors into separate datareaders (except for the input parameter stuff the code above is exactly what I did with the other procedure that returned two ref cursors and still works fine). When I run this code I get no errors, I just get told that each DataReader has no rows returned, which shouldn't be right.
Any help with this would be hugely appreciated.
Cheers,
SebSorry folks, after staring at this over and over, eventually going to sleep and coming back to it with some fresh eyes I realised I was just being a complete idiot - I was feeding the procedure different data in the .NET app than I was when testing in Oracle SQL Developer. Low and behold once I gave it the right data it worked!
Silly me...
Maybe you are looking for
-
2 External Monitors for MacBook Pro
Hey folks, i've got a new 13" Macbook Pro and a 24" ACD hooked up to it. I want to add another display aswell but there are so many options for usb --> dvi and i'm not sure which one would be best. Some of the ones i've been looking at are: IO GEAR h
-
Routine in Infopackage - Extraction
Hi All, I want to know ; How to write Routine in the Infopackage Extraction? I know that we can write Routine in Infopackage extraction. PLease let me know the steps. Regards, Macwan James.
-
Removing spaces in Image Slider
Hi all. I'm new to muse, website design, and HTML so I'm an uber noob and have been just googling everying I can't figure out. My current issue is that I've worked out how to a put a sliding image gallery but I can't figure out how to remove the spac
-
Lion asking for password when I drag an item to trash after and update
I have a Macbook Pro, I upgraded to Lion 3 weeks ago. Yesterday it had an update that took about 1.5 hours. Now, when I drag something in the trash, it asks for my computer password. I don't want to give that to the other person sharing this compu
-
WDS and WPA with 2x Express and 1 x Extreme - barbed wire in the *** easier
Frankly I am disgusted at the near impossibility of getting this to work after 5 hours of playing, resetting and stuffing around. Apple need to pull their fingers out and realise that "we make em simple so you don't need docs" is not going to cut it