SQL & PL/SQL :: How To Use A Java Class File Into Oracle Code

May 16, 2010

I am using Developer 10g R2. I have a form with two fields named input_value and output_value and a button named ok. I have a java class named Factorial which return the factorial of the input value. Now i want to use this class into pl/sql in ok button.

View 4 Replies


ADVERTISEMENT

Forms :: Java Class Import In Oracle?

Sep 22, 2013

when I import java class from oracle forms (import java class ->> FFileChooser) appeared FFileChooser package but i don't know how use it how use OPEN_DIALOG or other function .

View 2 Replies View Related

Forms :: Import From Java Class Into Oracle?

Apr 12, 2010

I need to add one validation in one form. The form is not getting run locally because of some imported java classes which was already there. From application server it works fine. When i run locally it gives ORA_JAVA.EXCEPTION_THROWN. Actually some trigger calls a procedure from this imported java class. Some path is specified in JNI.NEW_OBJECT(). That patg may not be in local system. If those files are included in our oracle home directory

View 4 Replies View Related

SQL & PL/SQL :: Invoking Java Class From Oracle Server?

Jun 7, 2013

I need to invoke a JavaMail code from oracle server. Conditions are :

On insertion of a row in a table a TRIGGER is to be run. This trigger would invoke a java code, that shoots an email, with desired credentials and login.

The code to send email, is based on JavaMail API, and is compiled on JVM version, 1.6.

The javaMail code can be loaded in oracle server using:

loadjava -user scott@TESTDB SendMailSSL.class

Another code doscmd.class is written and loaded in oracle, that is compiled in java 1.5. It is intended to call the SendMailSSL.class

import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;

[code].....

Is there a way to invoke SendMailSSL.class, without upgrading the oracle Java version

View 3 Replies View Related

JVM :: How To Extract Java Class Objects From Oracle Database

Jun 26, 2013

How to Pick / Extract the java class files from the database.? We have not maintained the latest codes in the oracle application server where java class code is residing.

All the Java Classes are available only in database. So we need to pick the latest java class code from production environment. In TOAD we tried but all class objects are listing at the left side but we are unable to take the code. So how can we take the latest codes(java classes) from the Production Database as a backup. 

View 1 Replies View Related

Oracle 11g - Java Virtual Machine Could Not Find Main Class Program Will Exit

Jul 26, 2013

In my Organization I am trying to install oracle ODTwithODAC112030 but one Error showing that is java virtual machine could not find main class program will Exit. 

Server Configuration Dell power Edge r510 Windows 2003 64 bit serv PAck 2 Citrix Presentation server 4.5 .

View 1 Replies View Related

JDeveloper, Java & XML :: Using PL/SQL Function To Execute Java Class?

May 20, 2013

i`m trying to use pl/sql function to execute java class. I created 2 tables with around 100 values and java class with simple functionality. I need to create function to loop through my table1 and get with each iteration one value from table and pass that value as parameter to java class.

table1 is something like this:

ID NAME
1 name1
2 name2
3 name3
. .
. .
100 name100

table2 is empty with same columns as table1 ( table2 is for data obtained from java returns ) I created in sql+ java class.

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "myClass" AS
import java.io.*;
import java.util.*
public class myClass {
public static String fun(String strName)

[code]....

Then i wanna make a pl/sql function for:

1)For i = 1 Obtain first value from table1 (column name) and pass it throught java class then return value and save it in table2 with the same id as id from table1

2) change i=1 to i=2 and do that same

3) end if i=101

View 1 Replies View Related

Server Utilities :: Can't Read Bad File From Java Code

Apr 25, 2012

We are using sqlldr query to load data into a table. This is handled in a java code. We are uploading an xls file which gets converted into csv and then the sqlloader call works, which in turn creates a bad and log file for error messages.

But I am not able to locate the bad file(in filesystem) within java code.

Below piece of used.

File file =new File(destfilePath);
if(file.exists()){
FileReader fr = new FileReader(file);
LineNumberReader lnr = new LineNumberReader(fr);
linenumber=0;

[code]....

The above code is able to locate CSV ,but not the bad file(whereas both files created in same path).

View 1 Replies View Related

JVM :: Download Jar / Java Class From Database

Mar 28, 2013

I have database 10.2.0.3 with one procedure that calls some java class loaded in database. Unfortunately I don't have source code of that java class or whole jar that was loaded into database.I would like to download it from database and try to decompile it.

how can I download some java classes from database? Everything I know is only the name of some java class that is used in one PL/SQL procedure (CREATE OR REPLACE PROCEDURE ..... AS LANGUAGE JAVA).

View 1 Replies View Related

Forms :: Calling Java Class Files From PLSQL?

Jun 19, 2007

I have imported a java class file that inturn gets content from a webservice. One of the functions on that imported class file is as follows ...

Funtion getcontent(A1 JOBJECT,A2 JOBJECT, A3 String) return JOBJECT ....

In my PLSQL package ...How do I invoke this class file ?

So far I have done this ...

Declare
abc ORA_JAVA.JOBJECT;
xyz ORA_JAVA.JOBJECT;
xxx VARCHAR2(25);
value ORA_JAVA.JOBJECT;
BEGIN

[code]...

I am getting an error saying the object type is wrong .... I would like to know how to assign a hardcoded value to the JOBJECT just to test before I continue.

View 20 Replies View Related

Forms :: Adding Image Manipulating Java Class?

Jul 13, 2012

Our system stores images on the unix filesystem. We scan full page images.

Our image specs are:

black and white: tiff, group4 compression, 300dpi. so files are about 40-80k compressed

photograpshs/gray scale: jpeg/jpeg compression 256 gray scale. Some images can be 2megs...but most of them are about 400-700k

We build a demo with forms10G/application server 1 year ago and performance was really bad. Took about 10-15 seconds to generate a report with 1 image of it...compared to about 1-2 secs using forms 6i. We just installed weblogic 11G (10.3.5) with forms 11gr2. I'm guessing performance will still be an issue but we will still be testing it.

Our users currently use nfs to access images on the unix server. So that would not changed.

- read_image from filesystem (c: unc path //server/images/.../1.jpeg)

- zoom in, zoom out (having vertical/hori scroll bars to move around...or best would be panning)

- save_image on filesystem

- fit to window/cancas

- always keeping aspect ratio

nice to have options, but not needed at this time

- save in blobs

- editing capabilities (mostly just select an area to delete, like black borders...some speckles here and there)

View 1 Replies View Related

Reports & Discoverer :: Java Class For BarCode Failed To Initialize While Running At Web?

Aug 27, 2011

<jsp:useBean id="BC" scope="page"class="oracle.apps.barcode.util.BarCodeConstants" />
<jsp:useBean id="BM" scope="page" class="oracle.apps.barcode.BarCodeMaker" />

This code makes me unlucky while run that jsp report on web and comes up with orror no out put for the job.RegEdit REPORTS_CLASSPATH set to my oraclebarcode.jar with others jar files.

At Report builder web layout works fine [With Barcode generation] but not through Report server.

View 5 Replies View Related

XML File Generation From Oracle Java Procedure

Dec 6, 2011

I have written a Java class which generate and place the XML file in a particular location. This the java class is loaded into Oracle using the loadjava command. When I call the sql java procedure java classn will be called and the XML file is generating.

But my problem is with xml header i.e in the header it is getting as

<?xml version = '1.0' encoding = 'UTF-8'?>

Where as I am generating the xml file from by just java call instead from Oracle the header is as follows

<?xml version="1.0" encoding="UTF-8" ?>

I am thinking that this could be reason with different jar using Oracle side.

View 3 Replies View Related

JDeveloper, Java & XML :: Read Some Values From XML Code

Sep 3, 2013

I would like to read some values from XML code, I try to do some test sql query but not successfully.The values what I need from xml are:

<currency>EUR</currency>
<amount>64.93</amount>

And there is a one example of xml:

CREATE TABLE "XML_TAB"
("ID" NUMBER(10,0),
"FILENAME" VARCHAR2(100 BYTE),
"XML" "XMLTYPE"
)
[code]..

how to write sql which get me a needed values?

View 13 Replies View Related

JDeveloper, Java & XML :: Convert Complete Oracle Database In Single XML File

Dec 14, 2010

Inspiration of a java program that converts a oracle database to one single XML document?

View 1 Replies View Related

Performance Tuning :: Avoiding Bind Variable From Sql In Java Code?

Jun 15, 2010

We are on oracle 10.2.0.4 on Solaris 10 and have a perf. issue with a bind variable using query. The query is in java application. I want to test its performance when the query doesn't use bind variable and instead uses the passed value as literal. How can it be done?

As example lets say the query is:

SQL> variable vn varchar2(20);
SQL> EXEC :vn :='ADAMS';

PL/SQL procedure successfully completed.

SQL> select * from emp where ename=:vn;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7876 ADAMS CLERK 7788 12-JAN-83 1100 20

1 row selected.

SQL> EXEC :vn :='KING';

PL/SQL procedure successfully completed.

SQL> select * from emp where ename=:vn;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7839 KING PRESIDENT 17-NOV-81 5000 10

1 row selected.

But the statements will be taken as similar statements by oracle (due to :vn). Now I want oracle to take it as literal and the change for this has to be done in java code in my actual scenario which has a different query (but conceptually it uses bind variable and I want it to use passed value as literal). How can it be done?

View 9 Replies View Related

JDeveloper, Java & XML :: Load Huge XML File With Hundreds Of Records Into Oracle Table?

Jun 29, 2011

I need to load (using SQL Loader) an huge XML file, with several hundreds of records into an Oracle Table.The XML file schema is pretty simple, and it's anything like this:

<dataroot>
<record>
<companyname>LimitSoft S.A.</companyname>
<address>Street Number 1</address>

[code]...

I'm trying to use the help included in this link [URL]...

When they refer to schema[URL].... what should I use?? I do not need to use the Oracle website to register anything, right?

View 4 Replies View Related

JDeveloper, Java & XML :: Select Records From Table Where XML Code Complies With Requirement

Dec 7, 2010

I got table with column of XML codes like this:

select xmltype ('<parameters xmlns="http://datalan.sk/webreporting/params/v1_0">
<parameter name="result"><value>success</value></parameter>
<parameter name="showBirthday"><value>false</value></parameter>
<parameter name="_wrCommand"><value>clearCacheBefore</value></parameter>
</parameters>'
) val
from dual;

And I need to select records from table where xml code complies with requirement:

name="result" equals success.
name="result"><value>success</value>

View 25 Replies View Related

JDeveloper, Java & XML :: Add New Field To Cater GL Account Code Into Employee Self Service Page?

May 23, 2012

I would like to add another filed into the Employee Self Service page (OAF) Expense claim portion.Basically the field would require to grab an existing GL account code based on the element link setup from expense element.

The main point to add this additional field is to capture the expenses type and displaying its GL account code based on element link account code setup.

View 1 Replies View Related

Installation :: Oracle 11g - After Select System Class - Installer Just Closes Out?

Apr 16, 2013

Having trouble installing Oracle 11g. After I select system class, the installer just closes out. I have re-download the software from the Oracle and made sure both files were unzipped into the same folder correctly. Searching around this forum found same problems, none of the solutions have worked so far. Tried setup -jreLoc (Location of Java), tried using it with different versions of java. If it tries to start the installer it gives an error about not being able to locate java runtime.

Specs: Windows 7 Ultimate x64
8GB Memory
930GB Free (on drive i want to install oracle on)

Files Download:
win64_11gR2_database_1of2.zip
win64_11gR2_database_2of2.zip

View 11 Replies View Related

JDeveloper, Java & XML :: Using Java.lang.Math In Oracle / ORA-31011 / Parsing Failed

Apr 26, 2013

I am trying to execute an xslt (for XML transformation) using xmltype.transform function.

I can't paste XSLT code here, but below is similar what I am doing.

[URL]

I have used a reference of random() method of java.lang.Math in xslt file, and it's giving me below error.

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00607: Invalid reference: 'random'.

I doubt, it's because of "Math" class, which is not present in Oracle, how to load standard java classes.

View 1 Replies View Related

JDeveloper, Java & XML :: Calling Java Stored Procedure From Oracle

Jun 20, 2011

I am writing a java stored procedure in my package. In the java procedure I want to issue a query to be fired on the user table from which I am calling the java procedure.

Some thing like following:

I am logged in to USER1 and my package is inside USER1. From this package I am calling the Java Stored Procedure. In java procedure I want to make a jdbc connection to USER2. The details of USER2(password, hostname,portno) are stored in a table called 'connection_details' and this table is in the USER1.

My problem is how can I issue the

SELECT details FROM CONNECTION_DETAILS for USER2

so that i can get the details..?

Do i need to first make jdbc connection to USER1 and then execute the above query for which i need similar details of USER1. How can i obtain the details of USER1 here.

I am thinking if I am already in USER1 then do I need to make the jdbc connection to USER1 and then execute the query?

View 1 Replies View Related

JDeveloper, Java & XML :: Best Driver For Java To Oracle Database Connection

Jul 30, 2012

Which is the best driver for java to Oracle database connection ?

View 1 Replies View Related

JDeveloper, Java & XML :: How To Pass Any Array From Java To Oracle

Feb 4, 2005

Here is a problem. I have to pass an array e.g ('Account','Marketing',Computer' ) from java to Oracle 9i.

Would I be able to do in Oracle, if yes then how ?

View 11 Replies View Related

JDeveloper, Java & XML :: Native Java In Oracle Versus PL/SQL?

Aug 26, 2011

we can you java code natively with Oracle. But I didn't get how to decide when to use native java in oracle and when to use pl/sql.

View 5 Replies View Related

JDeveloper, Java & XML :: Create XML File From XSD File?

Dec 14, 2010

get me an example where i create a XML file from a xsd file?

View 1 Replies View Related

JDeveloper, Java & XML :: Connection Between Java And Oracle

Nov 26, 2012

I Program with Java . when we connect oracle by program ,

Get the following error :

'No suitable driver found for jdbc:orcl:thin:@localhost:1521 '

View 3 Replies View Related

Precompilers, OCI & OCCI :: How To Compile Code To SO File

Nov 19, 2010

I wrote the below C code and I don't How can compile to so file

/* Include standard IO. */
#include <stdio.h>
#include <string.h>
#include <sqlca.h>
#include <stdlib.h>
[code].......

View 3 Replies View Related

SQL & PL/SQL :: Hard Code Bad File Names For External Table

Apr 7, 2011

I have question on the following, that gets defined for the bad file and the log file

BADFILE 'bad_%a_%p.bad'
LOGFILE 'log_%a_%p.log'

What does the %a and % p indicate? Also if I wanted to get the value of %p and %a into a variable how would I do it? I want to be able to append %p and %a to the below variable, but unsure how to achieve it..

l_badfile := file_nm || '.bad' ;

View 3 Replies View Related

SQL & PL/SQL :: Write A Dynamically Changing Filename - Code Not Producing Any File?

Jul 19, 2011

I tried to write a dynamically changing filename and file type so that i can dump some data. But the code I wrote is not producing any file at all even though it compiles with no errors. I run this code at XE database which comes free from the oracle website. I did all the directory settings. No problem with it because I can produce file with different codes. The code is as following:

CREATE OR REPLACE PROCEDURE dump_csv_file IS

TYPE number_array IS VARRAY(10000) OF NUMBER;
TYPE string_array IS VARRAY(10000) OF VARCHAR2(100);
TYPE date_array IS VARRAY(10000) OF DATE;
TYPE v_file_array IS VARRAY(10000) OF UTL_FILE.FILE_TYPE;

[code]...

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved