About importing oracle.forms.properties ...
Dear all,
I do have some problems when importing these:
package oracle.forms.demos;
import oracle.forms.properties.ID;
import oracle.forms.handler.IHandler;
import oracle.forms.ui.CustomEvent;
import oracle.forms.ui.VBean;
Here are the problems' details:
\cmp\FDialogPJC.java:5: package oracle.forms.properties does not exist
import oracle.forms.properties.ID;
^
\cmp\FDialogPJC.java:6: package oracle.forms.handler does not exist
import oracle.forms.handler.IHandler;
^
\cmp\FDialogPJC.java:7: package oracle.forms.ui does not exist
import oracle.forms.ui.CustomEvent;
^
\cmp\FDialogPJC.java:8: package oracle.forms.ui does not exist
import oracle.forms.ui.VBean;
^
\cmp\FDialogPJC.java:10: cannot resolve symbol
symbol : class VBean
location: class oracle.forms.demos.FDialogPJC
public class FDialogPJC extends VBean
^
\cmp\FDialogPJC.java:13: cannot resolve symbol
symbol : class IHandler
location: class oracle.forms.demos.FDialogPJC
private IHandler mHandler;
^
\cmp\FDialogPJC.java:14: cannot resolve symbol
symbol : class ID
location: class oracle.forms.demos.FDialogPJC
private static final ID SHOWFILEDIALOG = ID.registerProperty("showfile
dialog");
^
\cmp\FDialogPJC.java:15: cannot resolve symbol
symbol : class ID
location: class oracle.forms.demos.FDialogPJC
private static final ID FILENAME = ID.registerProperty("filevalu
e");
^
\cmp\FDialogPJC.java:16: cannot resolve symbol
symbol : class ID
location: class oracle.forms.demos.FDialogPJC
private static final ID FILECHANGEEVENT = ID.registerProperty("filechan
geevent");
^
\cmp\FDialogPJC.java:34: cannot resolve symbol
symbol : class IHandler
location: class oracle.forms.demos.FDialogPJC
public void init(IHandler handler)
^
\cmp\FDialogPJC.java:40: cannot resolve symbol
symbol : class ID
location: class oracle.forms.demos.FDialogPJC
public boolean setProperty(ID pid, Object value)
^
\cmp\FDialogPJC.java:14: cannot resolve symbol
symbol : variable ID
location: class oracle.forms.demos.FDialogPJC
private static final ID SHOWFILEDIALOG = ID.registerProperty("showfile
dialog");
^
\cmp\FDialogPJC.java:15: cannot resolve symbol
symbol : variable ID
location: class oracle.forms.demos.FDialogPJC
private static final ID FILENAME = ID.registerProperty("filevalu
e");
^
\cmp\FDialogPJC.java:16: cannot resolve symbol
symbol : variable ID
location: class oracle.forms.demos.FDialogPJC
private static final ID FILECHANGEEVENT = ID.registerProperty("filechan
geevent");
^
\cmp\FDialogPJC.java:21: cannot resolve symbol
symbol : method getClass ()
location: class oracle.forms.demos.FDialogPJC
ClassLoader cl = getClass().getClassLoader();
^
Any other advice towards these?
Thks & Rgds,
Edward
Fnd the forms.jar file in the system. Make a note of the complete path For example if the forms.jar file is in C:\abcd\xyz\ , the path of this file is C:\abcd\xyz\forms.jar .
Open the server.xml file which you can find under C:\Sun\AppServer7\domains\domain1\server1\config and add the above PATH like this
server-classpath="C:\abcd\xyz\forms.jar;C:/Sun/AppServer7/lib/appserv-rt.jar ......
-Restart the Application Server and run your application
Hope this helps
Thanks
Srinivas
Similar Messages
-
Problem about using Oracle Form 6i to connect Oracle Database 10g express.
Sorry to interrupt all of you.
I have encountered a problem about using Oracle Form 6i to connect Oracle Database 10g express.
As I would like to
I use Oracle Net8 Easy Config to create a connection.
According to "tnsnames.ora", the paramater of connection is as follows;
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA = (SID = XE))
Unfortunately, when I use Oracle Net8 Easy Config to test the connection, an error message is prompted as follows:
Connecting....
The test did not succeed.
ORA-03106: fatal two-task communication protocol error
There may be an error in the fields entered
or the server may not be ready for a connection.
You can check the server and retry, or continue.
After I google it, I still have no idea how to solve the problem. I would like to ask, could anyone mind providing some hints or solution to address the issues.
Thanks for your assistance in advance.I don't believe the Net8 Easy Config (NEC) will create a compatible entry in the tnsnames.ora. I have Forms 6i running successfully against a 10g Express database, but I did not use the NEC - I created the entry myself. Here is the entry I use:
XE=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=<<servername or IP address>>)
(PORT=1521)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=XE)
)Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Importing oracle forms and reports into workbenches
Good day I am trying to understand the correct method of
Using workbenches how does one import oracle forms and reports.
Within my work group we think jsp and java are the technology being used.Hi Rajesh,
But i have not installed IAS at all. I have only Forms and Reports 10g and Oracle database installed. As you said it only save on IAS, but can we save it on local machine. Is there any other alternative.
Again my second issues is --> I want to remove Mail option and rename Cache option to PDF from Destype combo box which appears at run time.
Any idea how we can do this? -
Import oracle forms into portal
Can anyone please give me some pointers in importing forms created by orcale forms into portal?
There is no direct way to import your Oracle Forms into Oracle Portal, as the Forms within our Portletbuilder components are of a smaller, simpler functionality set than that provided within Oracle Forms.
What I would recommend is to invoke your Oracle Forms from Portal by integrating Forms with Oracle Single-Sign-On (SSO). Integration of Oracle Forms with Oracle SSO is described in Chapter 5 of the Oracle9iAS Forms Services Deployment Guide, available here on OTN:
http://otn.oracle.com/products/forms/pdf/B10170_01.pdf
Hope this helps.
Best Regards,
Harry -
Need to help about deploying oracle forms on AS
well i need help in deploying my webforms on the AS THAT is on redhat linux 2 help me with some material or links that provide me how to deploye my application on it
alos i need to know about complete help guide for the deploying of database on database server that is on linux and deploying forms on AS WHICH is also on linuxwe have an application in developer /2000 that we will be deploying on the internet using Oracle 9iAS. we also want to provide limited access to the application / information from PDA, cell phones, etc. Can I take advantage of existing code in developer/2000 that can be used with Oracle 9i wireless?
-
Question about import oracle dump size 20GB
I got the oracle dmp file size 20GB from client
export from LInux AS4 ( oracle database version 9R2 )
is it posible to import in to windows server 2003 running oracle 10gR2
please post your views on thisWhy notll, exp and imp are widely used for cross platforms enviournments. you go through with your imp and if you come up with something which needs to be sort out , then update the thread with your problems .
hare krishna
Alok -
Oracle Forms 11g / frmall.jar or frm90all.jar installation
I need to import Oracle.Forms.properties.ID in one of my JDeveloper application.
I am using JDeveloper 10.1.3.5. I need frmall.jar/frm90all.jar to make the above import statement work in JDeveloper if i am not mistaking.Basically i need to add either of the .jar in Jdeveloper.
For that I came accross Oracle Forms 11g. For Oracle Forms 11g I have installed wlserver_10.3. and i have ofm_pfrd_win_11.1.1.3.0_32_disk1_1of1\Disk1 with Oracle Fusion Middleware forms 11g setup. When I click on that setup getting a Oracle screen asking me for Oracle Middleware Home and Oracle Home Directory. My Oracle 11g db is installed in C:\new\Oracle11g.
And setting up ORACLE_HOME pointing t that directory. clicking on next on that screen is giving errors like Oracle Home location is not specified , The specified MiddleWare Home is not valid and Oracle.classicwsl.top could not be located etc.
Can Anyone help me solving this issue so I can use Oracle Forms ID in JDeveloper.?Let me tell you what exactly i am doing :
I have set the below environment variables:
Path=C:\new\Oracle11g\bin;D:\app\veeralakshmi_v01\product\11.1.0\client_1\bin;C:\Program Files\ZeroC\Ice-3.4.1\bin;C:\Program Files\Java\jdk1.5.0_16\bin;
ORACLE_HOME=C:\new\Oracle11g\BIN;
I have C:\Oracle\Middleware in this path i have folders and sub folders like C:\Oracle\Middleware\jrockit_160_17_R28.0.0-679
C:\Oracle\Middleware\oepe_11gR1PS2
C:\Oracle\Middleware\wlserver_10.3
C:\Oracle\Middleware\modules
C:\Oracle\Middleware\coherence_3.5
C:\Oracle\Middleware\jdk160_18
and other folders and files.
Now when i click on \\myshecsccm01\PackageSource\ofm_pfrd_win_11.1.1.3.0_32_disk1_1of1\Disk1\setup it takes me to Oracle 11g fm . On step 2 of 6
for Oracle Middleware Home :C:\Oracle\Middleware
and Oracle Home Directory: ORACLE_HOME
i m giving.
Here the Middleware folder contains the above folders/sub folders listings.
and clicking on next I am getting the below errors:
INST-07010: Validation of Oracle Home location failed. The location specified does not exist.
Enter a valid existing directory
INST-07100: The Oracle home provided does not contain Oracle Portal 11.1.1.2.0.
In order to patch your existing version please provide an Oracle home that contains the product mentioned above. If you choose to continue, only the oracle_common directory and any components that both products have in common will be patched.
INST-07293: Middleware home location specified does not have the required Oracle homes installed in it. The Oracle homes for the following components is not installed oracle.classicwls.top.
Provide a different Middleware home location or install the required Oracle Products and try the install again
So as per your suggestion My middleware folder is not empty.
what should I do?
And after doing all these installtions will i be able to get the frmall.jar file which i really required to use it for importing Oracle.forms.properties.ID?
Edited by: 874822 on Jul 25, 2011 9:40 PM -
JavaBean not working with Oracle Forms (URGENT)
I have written a Javabean program which I invoke from Oracle Forms. The program is designed to pass a parameter from the form to the bean and get a parameter back to the form from the Javabean. The bean is called on the when-button-pressed event of a form button. The problem is, the form doesnt seem to invoke the bean at all. There seems to be no communcation between the form and the bean at runtime on-click of the form button other that all the messages in the form procedure being displayed.
The event code for the button is,
Declare
setNewMsg varchar2(2000) := 'Hello World';
getData varchar2(2000);
BeanHdl Item;
Begin
BeanHdl := find_item('Block3.MYBEAN');
If NOT ID_NULL(BeanHdl) Then
Message('Before Set');
SET_CUSTOM_PROPERTY(BeanHdl,1,'setMessage',setNewMsg);
Message('Before Get');
getData := GET_CUSTOM_PROPERTY(BeanHdl,1,'getMessage');
SYNCHRONIZE;
Message(getData);
Message('After Get');
Message(' ');
Else
Message('The ID is null');
Message(' ');
End If;
END;
The javabean code is,
package oracle.forms.beans;
import java.awt.*;
import java.io.*;
import java.beans.*;
import oracle.forms.ui.*;
import oracle.forms.properties.*;
import oracle.forms.handler.*;
import oracle.ewt.lwAWT.*;
public class SimpleTestBean extends VBean {
public static final ID SETMESSAGE = ID.registerProperty("setMessage");
public static final ID GETMESSAGE = ID.registerProperty("getMessage");
private String msg = "";
public String newMessage() {
return msg;
public Object getProperty(ID id) {
try {
if (id == GETMESSAGE) {
return newMessage();
return super.getProperty(id);
catch (Exception e) {
e.printStackTrace();
return null;
public boolean setProperty(ID id, Object value) {
try {
if (id == SETMESSAGE) {
msg = (String) value;
return super.setProperty(id, value);
catch (Exception e) {
e.printStackTrace();
return false;
ThanksHi,
I have written a Javabean program which I invoke from Oracle Forms. The program is designed to pass a parameter from Oracle Form(Ver 6i) to the java bean and get a parameter back to the form. The Javabean is called on "When-Button-Pressed" event of a Form button. The problem is, Form doesn't seem to invoke the bean at all. There seems to be no communication between the Oracle Form and the Javabean at runtime.
On-click of the Form button though all test messages in the Form trigger are being displayed (Even message before and after the Set_Custom_Property & Get_Custome_Property). The only issue is the Form variable doesn't show the returned value from the bean. So the big question is - Whether the bean is invoked at all or not.
If YES then how to check it and if NO then how to communicate with the bean from Oracle Form. I am attaching the code of Javabean and trigger code.
Thanks & Regards
NOTE : All the ClassPath for the JavaBean has been set properly and the Form is also recognizing the Implementation Class for the Javabean.
The Trigger Code is,
--- This code is written on When-Button-Pressed trigger of Form button.
--- The form also contains the bean area "MYBEAN", which i have referred in the code.
Declare
setNewMsg varchar2(2000) := 'Hello World';
getData varchar2(2000);
BeanHdl Item;
Begin
BeanHdl := find_item('Block3.MYBEAN');
If NOT ID_NULL(BeanHdl) Then
Message('Before Set');
SET_CUSTOM_PROPERTY(BeanHdl,1,'setMessage',setNewMsg);
Message('Before Get');
getData := GET_CUSTOM_PROPERTY(BeanHdl,1,'getMessage');
SYNCHRONIZE;
Message(getData);
Message('After Get');
Message(' ');
Else
Message('The ID is null');
Message(' ');
End If;
END;
The Bean Code is,
package oracle.forms.beans;
import java.awt.*;
import java.io.*;
import java.beans.*;
import oracle.forms.ui.*;
import oracle.forms.properties.*;
import oracle.forms.handler.*;
import oracle.ewt.lwAWT.*;
public class SimpleTestBean extends VBean {
public static final ID SETMESSAGE = ID.registerProperty("setMessage");
public static final ID GETMESSAGE = ID.registerProperty("getMessage");
private String msg = "";
public String newMessage() {
return msg;
public Object getProperty(ID id) {
try {
if (id == GETMESSAGE) {
return newMessage();
return super.getProperty(id);
catch (Exception e) {
e.printStackTrace();
return null;
public boolean setProperty(ID id, Object value) {
try {
if (id == SETMESSAGE) {
msg = (String) value;
return super.setProperty(id, value);
catch (Exception e) {
e.printStackTrace();
return false;
------------------------------------------------------------------------------------------ -
Weight scale input into oracle forms developer 10g
Dear All Experts
it is request to you kindly guide me full code and description of
weight scale device input in oracle form show digits continuously in form 10g kindly proved me data device connect through port so plz help meMake a PJC (plugable java component) and look at RXTX library for java...
I have done a PJC to use a POS terminal over RS232 from oracle forms..
It's not complicated..
here is my example for POS terminal and RXTX library (JControl)
[code]
package in2.pos;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.swing.JOptionPane;
import oracle.forms.handler.IHandler;
import oracle.forms.properties.ID;
import oracle.forms.ui.CustomEvent;
import oracle.forms.ui.VBean;
import gnu.io.*;
* PosTerminalPjc, PJC component for Hypercom POS terminal data exchange
* @author Peter Valencic, [email protected]
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;
char STX = (char) 0x02;
char ETX = (char) 0x03;
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"); // 01-sale, 05-refund, 13
// ticket duplicate
private static final ID AMOUNTCURRENCY = ID
.registerProperty("AMOUNTCURRENCY"); // ISO currency code
private static final ID TRANSACTIONNUMBER = ID
.registerProperty("TRANSACTIONNUMBER"); // transaction number
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
String transactionNumber =""; //store a transaction number from POS trminal
String transactionProcessed;
String transactionFlag;
String transactionDate;
String transactionTime;
String transactionBatchNumber;
String terminalTid;
String terminalCard;
String errDesc;
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("============================");
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());
private void doTransaction() throws Exception {
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"));
return;
// transaction type chek
System.out.println(this.getTransactionType());
if (!getTransactionType().equalsIgnoreCase("REFUND")
& !getTransactionType().equalsIgnoreCase("SALE")) {
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_tran_invalid_type"));
return;
portList = portId.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
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.addEventListener(this);
serialPort.notifyOnDataAvailable(true);
serialPort.notifyOnOutputEmpty(true);
os = serialPort.getOutputStream();
is = serialPort.getInputStream();
break;
if (portId == null) {
throw new Exception(res.getProperty("s_com_not_found")
+ this.getComPort() + "\n");
// 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("000000123401100" + 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 {
// maybe VOID in the future..
os.write(req);
os.flush();
l_ack_timeout = System.currentTimeMillis() + 1500;
//wait for half second
try {
Thread.sleep(500);
} catch (Exception ee) {
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");
try {
serialPort.close();
is.close();
os.close();
} catch (Exception ee) {
//Timeout occured show error
//s_timeout
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;
} catch (IOException ev) {
//WAIT FOR TIMEOUT ON MESSAGE
if (phase.equalsIgnoreCase("WAIT_FOR_TRANSACTION") &
(l_timeout < System.currentTimeMillis())) {
System.out.println(
"Error receiving response from pos terminal!!!");
try {
serialPort.close();
is.close();
os.close();
} catch (Exception ee) {
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_response_error"));
break;
//WAIT FOR SOME DATA TO COME FROM POS TERMINAL OVER RS232
if (phase.equalsIgnoreCase("WAIT_FOR_TRANSACTION")) {
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] + "|" +
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!");
try {
serialPort.close();
is.close();
os.close();
} catch (Exception ee) {
//transaction cancelled by user s_user_cancel
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_user_cancel"));
break;
if (dataValue.indexOf("NAPACEN VNOS") != -1) {
System.out.println("Napačen vnos");
try {
serialPort.close();
is.close();
os.close();
} catch (Exception ee) {
//invalid user entry
this.showError(res.getProperty("s_dlg_err_title"),
res.getProperty("s_user_invalid_entry"));
break;
if (dataValue.indexOf("PROSIM POCAKAJ") != -1) {
System.out.println("<-- PROSIM POCAKAJ");
continue;
//preberemo podatke iz stringe terminala
if (dataValue.indexOf("SPREJETO") != -1) {
try {
serialPort.close();
is.close();
os.close();
} catch (Exception ee) {
System.out.println("<-- TRANSAKCIJA SPREJETA");
System.out.println(dataValue);
System.out.println("Prožimo event v formse");
this.transactionProcessed = dataValue.substring(1, 3); //podatek mora biti 10
this.transactionFlag = dataValue.substring(13, 15);
this.transactionNumber = dataValue.substring(16, 21);
System.out.println("transaction number: " + this.transactionNumber);
this.transactionDate = dataValue.substring(25, 31);
this.transactionTime = dataValue.substring(31, 37);
this.transactionBatchNumber = dataValue.substring(21, 25);
StringTokenizer st = new StringTokenizer(dataValue, "" + FS);
System.out.println(st.nextToken());
System.out.println(st.nextToken());
System.out.println(st.nextToken());
System.out.println(st.nextToken());
System.out.println(st.nextToken());
System.out.println(st.nextToken());
this.terminalTid = st.nextToken();
System.out.println(st.nextToken());
System.out.println(st.nextToken());
System.out.println(st.nextToken());
this.terminalCard = st.nextToken();
if (transactionProcessed.equalsIgnoreCase("10")) {
else
CustomEvent ce = new CustomEvent(mHandler,
EVT_ERR);
if (transactionProcessed.equalsIgnoreCase("00")) {
System.out.println(
"Error in the format of the request message");
this.errDesc = res.getProperty("s_tf_00");
} else if (transactionProcessed.equalsIgnoreCase(
"01")) {
System.out.println(
"Transaction accepted without authorization code");
this.errDesc = res.getProperty("s_tf_01");
} else if (transactionProcessed.equalsIgnoreCase(
"02")) {
System.out.println(
"Transaction accepted with authorization code");
this.errDesc = res.getProperty("s_tf_02");
} else if (transactionProcessed.equalsIgnoreCase(
"03")) {
System.out.println("Needs voice referall");
this.errDesc = res.getProperty("s_tf_03");
} else if (transactionProcessed.equalsIgnoreCase(
"04")) {
System.out.println("Transaction refused");
this.errDesc = res.getProperty("s_tf_04");
} else if (transactionProcessed.equalsIgnoreCase(
"05")) {
System.out.println(
"Needs manual card data entry");
this.errDesc = res.getProperty("s_tf_05");
} else if (transactionProcessed.equalsIgnoreCase(
"06")) {
System.out.println(
"Authorization call failure");
this.errDesc = res.getProperty("s_tf_06");
dispatchCustomEvent(ce);
return;
//če gre skozi potem je vse ok
CustomEvent ce = new CustomEvent(mHandler, EVT_OK);
dispatchCustomEvent(ce);
return;
} catch (IOException ev) {
//wait 200 ms
try {
Thread.sleep(200);
} catch (InterruptedException ex) {
ex.printStackTrace();
System.out.print('*');
}//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()[i] + ":");
// System.out.println("čeksum: " + chksm);
return tmp.getBytes();
* 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();
* Display error message inside oracle form
* @param title
* @param exceptionString
private void showError(String title, String exceptionString) {
JOptionPane.showMessageDialog(this, exceptionString, title, 0);
public String getComPort() {
return comPort;
public void setComPort(String comPort) {
this.comPort = comPort;
public String getTransactionType() {
return transactionType;
public void setTransactionType(String transactionType) {
this.transactionType = transactionType;
public String getAmount() {
return amount;
public void setAmount(String amount) {
this.amount = amount;
public String getTransactionNumber() {
return transactionNumber;
public void setTransactionNumber(String transactionNumber) {
this.transactionNumber = transactionNumber;
public static void main(String[] args) {
PosTerminalPjc pjc = new PosTerminalPjc();
pjc.setComPort("COM1");
pjc.setTransactionType("SALE");
pjc.setAmount("1000");
try
pjc.doTransaction();
catch(Exception ex)
System.err.println(ex.toString());
[/code] -
I need the oracle.forms api for javabeans development, but i am unable to find it.
I have the JDAPI api, thats not what i want.
( I have searched oracle.forms api & documentation on google but i am unable to find them.
the link : http://www.oracle.com/technology/documentation/oracle9i_arch_901.html
contains a lot of documentation files, but i am not sure these are the ones that i need.
some of the files there are over 200 mb. before dowloading such heavy files, i want to be sure that they are the ones i need!!!)
I want to use the following packages / classes :-
oracle.forms.handler.IHandler
oracle.forms.ui.*
oracle.forms.properties.ID
I want to find out more about the above mentioned packages, and i thought that javadocs / api would be the most comprehensive help that i can get.
I have downloaded a few javabeans that were close to my requirement, and was going through the java source codes, thats where i encountered these classes / packages.
I amd using forms 9i. and Jdeveloper 9iYou should ask the experts in the forms forum (Forms
Timo -
Show the print dialog when running a report from an Oracle form.
I would like to be able to print an Oracle report from an Oracle form but
in addition show the print dialog. My PL/SQL code is shown at the bottom of this post.
I have set the 'printjob' system parameter to 'YES' in the
report and I can bring up a print dialog using the reports runtime.
However, as soon as I run it from my form I lose this capability. Setting
'printjob' to 'YES' in the code has no apparent effect.
Many thanks,
Ben
-- Launch a report
DECLARE
v_pl_Id paramlist; -- parameter list
BEGIN
-- add the parameters to the list.
v_pl_id := CREATE_PARAMETER_LIST ('summary');
ADD_PARAMETER (v_pl_id, 'destype', text_parameter, 'PRINTER');
ADD_PARAMETER (v_pl_id, 'printjob', text_parameter, 'YES');
-- run the report
RUN_PRODUCT (
reports
, 'C:\Test Reports\Test.rep'
, synchronous
, runtime
, filesystem
, v_pl_id
, NULL
END;At 10g not 9i using a bean area on my canvas implementing the following class ...
import java.awt.Frame;
import java.awt.JobAttributes;
import java.awt.PrintJob;
import java.awt.Toolkit;
import javax.swing.JPanel;
import java.io.*;
import oracle.forms.ui.VBean;
public class Select_Printer extends VBean {
public Select_Printer()
super();
public String getPrinterName()
String PrinterName=null;
JobAttributes jobAttributes;
try{
jobAttributes = new JobAttributes();
jobAttributes.setDialog(JobAttributes.DialogType.NATIVE);
Frame dummyFrame = new Frame();
PrintJob pJobDialog = Toolkit.getDefaultToolkit().getPrintJob(
dummyFrame, "Printtest", jobAttributes, null);
PrinterName = jobAttributes.getPrinter();
} catch (Exception e) {
System.out.println("Printer error!");
return PrinterName;
public static void main(String[] args)
Select_Printer select_Printer = new Select_Printer();
System.out.println(select_Printer.getPrinterName() );
} -
Hi,
Can anyone give me the URL from where I can get the Documentation (information) about the Oracle Forms and Reports 6i (like It's new futures when compared to Developer 6.0 ).
Thanks in advance.
Srinivas ArigeAll of the good stuff is on OTN, in the Forms area:
http://otn.oracle.com/products/forms/content.html
Reports have their own area as well.
Regards,
Robin Zimmermann
Forms Product Management -
Hi,
I'm going to develop a Web Application, one of the requirements is to use a the Java Programming Language and Oracle Database Engine.
I have read a lot of OTN Documentation about the Oracle Forms Web capabilities, and I read about the collaboration between Oracle Forms and J2EE Applicatons.
Does anybody have a link (from a Third-Party Vendor different from Oracle) containing the pros and cons of Oracle Forms (Web enabled) and a really J2EE application?
Any comment is appreciated.
E SanchezRefer to http://otn.oracle.com/products/forms/htdocs/FormsJavaSOD.html
-
Oracle.forms.jdapi.JdapiStatusExcept
Hi,
Help me
I am trying link to Oracle Forms by JDeveloper ,
but i can't link , showing this Exception
Exception in thread "AWT-EventQueue-0" oracle.forms.jdapi.JdapiStatusException:
jniinitialize: Failed to create new forms context
okHello , I think its JDapi related error . i explain more details below.
import oracle.forms.jdapi.*;
public class JdapiSessionExample
public static void main(String[] args)
Jdapi.setFailSubclassLoad(true);
Jdapi.setFailLibraryLoad(true);
FormModule fmb = new FormModule("myform.fmb");
Jdapi.shutdown();
Exception
Exception in thread "main" oracle.forms.jdapi.JdapiStatusException: jniinitial
ize: Failed to create new forms context
at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
at oracle.forms.jdapi.FormModule.<init>(Unknown Source)
at JdapiSessionExample.main(JdapiSessionExample.java:16) -
Oracle.forms.view
hi
i went through a tutorial abt using java components in oracle forms.
can we use those packages in a java project.
i mean packages like
oracle.forms.view
oracle.forms.handler
oracle.forms.properties etc???
or is this packages are meant to be used only in forms developemnt IDEs.
help me out plz.hi
i went through a tutorial abt using java components in oracle forms.
can we use those packages in a java project.
i mean packages like
oracle.forms.view
oracle.forms.handler
oracle.forms.properties etc???
or is this packages are meant to be used only in forms developemnt IDEs.
help me out plz.
Maybe you are looking for
-
Err when installing Oracle on solaris (URGENT) please help
while installing 10g database on solaris i am finding the following error " ./runinstaller : line 56: /root/desktop/database/install/.oui: cannot execute binary file
-
Itunes sees my ipod but won't allow me to manage its contents
my fully-charged ipod is connected and itunes sees it, but everything on it is grayed out and can't be touched. i can even sync and have a new podcast move over to the ipod, but once it gets there it's grayed out and can't be touched. i can't play it
-
Using AppleScript with Toast to burn MP3 disc
I'm trying to get Toast to add all the subfolders of a chosen folder to a new MP3 Disc. The attached script works fine except it adds the source folder, then puts all the subfolders inside it. IE Disc layout becomes Source Folder ----> subfolder 1 --
-
i need to add three fields to this infotype. Can someone explain me how to do this? Does functional consultant does this r the ABAP er does this?
-
I SUDDENLY GET THE MESSAGE "WAITING FOR SYNC TO START" AND THEN SEVERAL MINUTES LATER A MESSAGE SAYING SYNC HAS FAILED BECAuSE IT DIDN'T START!