Help : Unable to use Java Beans in Oracle forms 6i
Hi ,
I have been trying to run few sample code to understand how to use Java beans in oracle forms 6i .But have been largely unsuccessfull.
It will be great if somebody can provide me with some simple form( and java code )which uses java beans concept to give some data to the java program and receive some data from it . Pls inform me about the settings that need to be done.
If you guys know it then pls take the pains of writing a simple form and java code.
i hope somebody will respond because your reply is very necesary for me to proceed.
U can email me the code > [email protected]
Thanks in advance.
Thanks for your reply Francois.
Actually i am not facing problem understanding the programming technique.
I think the problem at my end is more of a cofiguration one.I am using forms version 6i
on oracle 8.
Every time i set the imlementation class property of the bean area it gives an error 13010 which translates to that "the class being mentioned is not extending the IView class".
The class i have written extends VBean so i am not sure why this error is occuring.
I think if oracle (correctly) finds the java class to use then i will be able to proceed.
Pls reply.
If you have some code that is working fine then pls send it to me.And also inform is some environment variables have to be set for its use.
Similar Messages
-
How to use Java Beans in Oracle Forms 11g at 64 bit windows7
Hello Experts,
I am using Oracle forms 11.1.2.2.0 with weblogic 10.3.6 generic at windows 7 64 bit.
My java version is jdk1.7.0_51.
Now I have a htmlbutton.jar (which is for bean item in oracle form and this jar file works well for oracle forms 11g 32 bit windows 7 environment).
I have takken steps:
1:-Put jar file in home\java folder.
2:-add this jar file into archive in formsweb.cfg.
3:-Add this this jar file(which is in my home- java folder) in form_class path in registry.
Now when I try to locate this jar file in my oracle form.There is no such jar file.what are the steps to use this jar file in oracle forms bean item.
Please told me what is wrong here.
thank you
regards
aaditya.It is unclear where you are having a problem. Is your issue at runtime (when the form runs in the browser) or when working in the Builder on the form?
Also be aware that you will need to sign your jar and include some new manifest entries. Refer to the Java 7u51 documentation and blogs that discuss the changes.
https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html -
How to use Java Script in Oracle Forms 10g
Hello,
Appreciate if anyone could help me using Java Script in Oracle Forms 10g?
Thanks
GMThank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
Example:
WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
Regards
GM -
Hey need help reading images using java bean
Hey everyone,
I will like to read some images from a directory using Java and display it on a JSP page, how do I accomplish this,
thanks
KTWhat happen is, I have to display 52 card depending on string concatenation, I have a java file that takes two elements from an array, depending on the two strings concatenation I want to display an image on a jsp page, any ideas on how to accomplish this?
-
How to use java programe in oracle form
Hello Expert,
My Config is : -
Forms [32 Bit] Version 11.1.1.3.0 (Production)
Jdeveloper - 10.1.3
I want to use the java programe in form builder. I create the one java class in Jdeveloper -
package demo;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
public class get_info{
public static void main(String[] args){
ch_add();
public static void ch_add()
InetAddress ip;
try {
ip = InetAddress.getLocalHost();
/*System.out.println("Current IP address : " + ip.getHostAddress()); */
NetworkInterface network = NetworkInterface.getByInetAddress(ip);
byte[] mac = network.getHardwareAddress();
/*System.out.print("Current MAC address : "); */
StringBuilder sb = new StringBuilder();
for (int i = 0; i < mac.length; i++)
sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
System.out.println(sb.toString());
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (SocketException e){
e.printStackTrace();
and this into Formweb.cfg and default.env and also add into Form_class_path. After that i import this java into forms.
Code genertated -
PACKAGE BODY get_info IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
END;
-- Method: main ([Ljava/lang/String;)V
PROCEDURE main(
a0 ORA_JAVA.JARRAY) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
END;
-- Method: ch_add ()V
PROCEDURE ch_add IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
END;
-- Method: wait (J)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_LONG_ARG(args, a0);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
END;
-- Method: wait ()V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
END;
-- Method: wait (JI)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER,
a1 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_LONG_ARG(args, a0);
JNI.ADD_INT_ARG(args, a1);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
END;
-- Method: equals (Ljava/lang/Object;)Z
FUNCTION equals(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
END;
-- Method: toString ()Ljava/lang/String;
FUNCTION toString(
obj ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
BEGIN
args := NULL;
RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
END;
-- Method: hashCode ()I
FUNCTION hashCode(
obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
BEGIN
args := NULL;
RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
END;
-- Method: getClass ()Ljava/lang/Class;
FUNCTION getClass(
obj ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
END;
-- Method: notify ()V
PROCEDURE notify(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
END;
-- Method: notifyAll ()V
PROCEDURE notifyAll(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
END;
BEGIN
NULL;
END;
Now i want to call the o/p of Java programe in oracle text item. Please help me. It's very urgent. I am not good in Java.Sir i use java importer.
PACKAGE BODY get_info IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
END;
-- Method: main ([Ljava/lang/String;)V
PROCEDURE main(
a0 ORA_JAVA.JARRAY) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
END;
-- Method: ch_add ()V
PROCEDURE ch_add IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
END;
-- Method: wait (J)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_LONG_ARG(args, a0);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
END;
-- Method: wait ()V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
END;
-- Method: wait (JI)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER,
a1 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_LONG_ARG(args, a0);
JNI.ADD_INT_ARG(args, a1);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
END;
-- Method: equals (Ljava/lang/Object;)Z
FUNCTION equals(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
END;
-- Method: toString ()Ljava/lang/String;
FUNCTION toString(
obj ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
BEGIN
args := NULL;
RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
END;
-- Method: hashCode ()I
FUNCTION hashCode(
obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
BEGIN
args := NULL;
RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
END;
-- Method: getClass ()Ljava/lang/Class;
FUNCTION getClass(
obj ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
END;
-- Method: notify ()V
PROCEDURE notify(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
END;
-- Method: notifyAll ()V
PROCEDURE notifyAll(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
END;
BEGIN
NULL;
END;
I read both document which is given by you.
Basicaly i don't know how to call java program in form builder.
I wrote this code on When-button-pressed
DECLARE
jo ora_java.jobject;
rv varchar2(1500);
ex ora_java.jobject;
BEGIN
jo := get_info.new;
rv:=get_info.ch_add(jo );
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message (' Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR );
message('');
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
END;
No error comes and no output comes. I want the client MAC ID. please guide me where i need to change the code. -
Hi ,
Can somebody provide me document that help me to use java beans from scratch using oracle.
Regards
NitinCheck the following link:
J2EE and Internet Applications - Oracle Application Server Documentation
http://download.oracle.com/docs/cd/B25221_04/web.htm
Under "Oracle Containers for J2EE (OC4J)", click on "Enterprise JavaBeans Developer's Guide". -
How to deploy java bean in Oracle Applications?
There is a Oracle Applications Forms FNDMNMNU.fmb which calls a Java Bean to show TreeView.
The Bean Area uses the implementation class of AppletAdapter.class. Do you know that we have to use the same AppletAdapter class so that we can connect to Oracle database?
In the form of FNDMNMNU.fmb, the java bean is called like this.
fndaplt.applet_init('FND_MENUS.TREE_VIEWER',
'FS',
'oracle.apps.fnd.functionSecurity.client.FunctionTreeViewer',
l_list_id);
Do you know what 'FS' means ?
Thank you very much in advance!
It is my first time to use Java Bean in Oracle Applications!HI srini ,
my application version 12.0.4 and database is 10.2.0.4
and i want to restrict the No of users
exp i have have 500 users and i want restrict to 100 only
how can i do that please explain
Thanks,
Sudheer -
Java beans in oracle developer suite 10g
Hello every body.
I'm a newbie in oracle. I want to use java beans in my forms. Using some examples I could write a form for login. The entered user name and password could be check in java class and then java class shows a message that says "login failed" or "login is successful". It is ok I think. But there is a problem.
The first time I type the user name and password, it seem that java class doesn't recognize it or maybe cash the before username and password. So the first time that I change the u and p the java class shows the result of before user. In java class I just have a simple if clause to check u and p.
In fact the sequence of execution of my program is like this:
Correct username and password ---> login failed
Correct username and password ---> login is successful
Correct username and password ---> login is successful
Correct username and password ---> login is successful
Wrong username and password ---> login is successful
Wrong username and password ---> login failed
Wrong username and password ---> login failed
Wrong username and password ---> login failed
Correct username and password ---> login failed
Correct username and password ---> login is successful
Correct username and password ---> login is successful
what can I do? should I clear the cash? where is it's cash? Any solution is really really appreciated.Can you send me the .fmb & the .java,.class or the .jar file for login bean.
I will try in my pc and let u know the problem. -
Error while importing java class into oracle forms 10g
Hi
I have generated a web service client using jdeveloper 10g. It consists of complex type methods. I am trying to import the class files using java importer in oracle form 10g. I am able import all of them successfully except one. That one is the main method. Please see the error and suggest me how to overcome this error.
Exception occurred: java.lang.NoClassDefFoundError: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
Thanks in advanceDo you see oracle/jdeveloper listed in "Import Java Classes" when you try to import?
If not, make sure you add C:\DevSuiteHome_1\jdev\lib\jdev.jar to FORMS_BUILDER_CLASSPATH in registry
Also excetion indicates: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
If you typing it - type: oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub -
Need help for traping imported java bean exception
hi everyone
i have imported a java bean into my forms 9i using java importer utility which tries to rename a file on a give path(bean works fine when executed through sql client).
i have problem when called from when button pressed trigger, it throws me an ("FRM-40735 and ORA-105101 NON ORACLE EXCEPTION") error.
i have imported java.lang.exception class and constructed an exception handler to trap java exception in the trigger
as
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
--check for ORA-105101
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
ex:= ORA_JAVA.LAST_EXCEPTION;
message('Java Exception --: '||BIException.toString(ex));
ORA_JAVA.CLEAR_EXCEPTION;
WHEN OTHERS THEN
message('error :'||SQLERRM);
when i imported java.lang.exception i did not find any wrapper pl/sql function or procedure declared to read or get the error messages except for the functions named "new" ,my exception handler failed.
so i tried with BIException which also fails to trap the error i have no idea about BIException and its usage with in forms ,Please do help me out with this issue ASAP.
thanks in advance
Rgds
yashHi,
don't understand what the BIException is supposed to do in your code, can you try
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message('Exception: '||Exception_.toString(ex));
where Exception_ is the imported java.lang.Exception package.
Frank -
Search in form by using java bean or PJC.
hi all
i am confused because i do not know java bean to much,is it possible to create a search button with one text item in java bean to display all records
example:
if i enter dept 10 then it display all records related to dept 10?
is it possible?
if yes please cany anyone send me a demo?
here is my email add.
[email protected]
sarahhi
Francois thanks for the link and its very useful and i am studying the codes and also i downloaded demos and run them its working fine and its very very nice.
i like java and trying to learn and its very useful.
why i want to use java bean because one of my friend her name is sheela she wants me to do it but i am failed i did not do it in java bean
so i thought lets try on the forum may be someone help u.
so i posted a thread over here.
thanks Francois.
u r appreciated.once again thanks.
sarah -
Use Java Bean or Java Importer
I have created my java class to validate a user against LDAP and now I would like to use that class in my own 9i login form. In order to pass the class variable values to the form is it better to create a java bean or use the Java Importer? Which is better for performance?
Mike,
Java Beans added to Forms are downloaded to teh client as part of the application startup. The jar files get permanently cached on teh client until they are renewed on the server. For your original request, the funtionality already exists in a Forms9i demo
http://otn.oracle.com/sample_code/products/forms/files/Forms9iOID_DEMO.zip
Viewlet:
http://otn.oracle.com/sample_code/products/forms/demo/9i/forms_services_demos/sso_oid_integration/viewlet/forms_integration_oid/OID90_viewlet.html
To authenticate
<Java Importer class package>.authenticateUser(<obj ORA_JAVA.JOBJECT>,user_dn VARCHAR2,password VARCHAR2) RETURN BOOLEAN;
Frank -
Hi Guys,
I am calling java bean from oracle Forms6i (implementation
class property set to bean class). This java bean in turn
calling some JNI methods written in C. The application server
(Forms6i) is hanging at the point of calling the JNI method.
Is oracle Forms6i supports all java functionality (JNI here)
and if so how to solve the problem ?
Any pointers or tips in this regard is highly appreciated ?
Thanks & Regards
Chandra MohanTo call Java from forms:
look at the technical documents on Java integration at
http://otn.oracle.com/products/forms
and also look at the Javabeans and PJC samples in the sample
code section of Forms on OTN.
Creating a random number using a java class is an excelent
example of how to use Java with forms. -
Value cannot refresh using Java bean
When I use java bean to get a value. It suppose to refresh and show new value but it doesn't. So any code can help to resolve this issue.
here is my code
(Testing.jsp)
<html>
<head>
<title>Page 3</title>
<link rel=stylesheet type="text/css" href="auction.css">
</head>
<table class="mainBox" width="200">
<tr><td class="boxTitle" >
Testing number 3
</td></tr>
<tr><td>
<span class="headline">
<jsp:useBean id="testing2" class="com.jsp.newsys.testing.Testing2" scope="request">
<jsp:setProperty name="testing2" property="user" value="Hello World"/>
<jsp:getProperty name="testing2" property="user2"/>
</jsp:useBean>
</span>
</td></tr>
</table>
</html>
The bean file which is Testing2.java
package com.jsp.newsys.testing;
import java.beans.*;
import java.util.*;
public class Testing2 extends Object implements java.io.Serializable {
private String user;
private String test;
public Testing2() {
public void setUser(String user)
test="";
if (user.equals("Hello World"))
test="Hi dqwqwd";
public String getUser2()
return this.test;
I need to restart my tomcat everytime then only the value will refresh. Please help.
Message was edited by:
wesleygch
Message was edited by:
wesleygch
Message was edited by:
wesleygchYour bean maybe have misspelling error
look at test and test2 on the jsp file. But I couldn't find any bean property test2 in your bean. Maybe you should try
${testing2.test} instead of ${testing2.test2}
I am a new bie also....:-) -
How to use java source in Oracle when select by sqlplus.
How to use java source in Oracle when select by sqlplus.
I can create java source in Oracle
import java.util.*;
import java.sql.*;
import java.util.Date;
public class TimeDate
public static void main(String[] args)
public String setDate(int i){
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(new Date((long)i*1000));
System.out.println("Dateline: "
+ calendar.get(Calendar.HOUR_OF_DAY) + ":"
+ calendar.get(Calendar.MINUTE) + ":"
+ calendar.get(Calendar.SECOND) + "-"
+ calendar.get(Calendar.YEAR) + "/"
+ (calendar.get(Calendar.MONTH) + 1) + "/"
+ calendar.get(Calendar.DATE));
String n = calendar.get(Calendar.YEAR) + "/" + (calendar.get(Calendar.MONTH) + 1) + "/" + calendar.get(Calendar.DATE);
System.out.print(n);
return n;
I have table name TEST
ID DATE_IN
1 942685200
2 952448400
When I write jsp I use method setDate in class TimeDate
The result is
ID DATE_IN
1 1999/11/16
2 2003/7/25
Thanks you very much.It is unclear where you are having a problem. Is your issue at runtime (when the form runs in the browser) or when working in the Builder on the form?
Also be aware that you will need to sign your jar and include some new manifest entries. Refer to the Java 7u51 documentation and blogs that discuss the changes.
https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html
Maybe you are looking for
-
Missing "itunes.msi", can't uninstall or reinstall to update
I can't update to itunes10.5 because I am missing the "itunes.msi" file. I am not able to uninstall nor re-install itunes. Furthermore, I can't locate the file anywhere on my system. How do I fix this?
-
I want to upgrade my Hard Drive to 1TB and more. What is the maximun Hard Drive I can install for a MacBook Pro 2009 Yesterday, I tried a SEAGATE SSHD but my screen was always a showing a QUESTION MARK (?). It's not the cable because when I put back
-
File Adapter: Run OS command unix after processing message
Hi, in file adapter configuaration, after processing message, I've configured the channel that it has to call an unix script. The sintax in configuration is: sh /XS0/usr/sap/XS0/DVEBMGS01/work/TEST_FILE_XI/OUT/rename_lib_contabili.sh <variable>. I tr
-
5230 - Loading sounds Via Computer
The instruction manual for my Nuron 5230 said I could hook the USB to the computer and access the phone as a mass storage device. If I have ringtone files that I've downloaded, which folder do I put them in when the Windows Explorer window comes up?
-
I can't fix - or dump - Reader 8.1.2
I had Adobe Reader for a while and had been receiving constant notifications that there were updates I needed to download so I finally did. Ugh! Problem after problem after that. Not sure what corrupted the files, but I couldn't print and kept get