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
ADVERTISEMENT
May 22, 2012
I am trying to invoke program from my local Windows machine (exactly java executor, which is in my environment on c:javajdkinjava) using database package with Java stored procedure.
Everything is fired by SQLPLUS script, this script invokes package with Java stored procedure (jar loaded into Oracle) and that procedure is trying to invoke runtime process (syntax:
c:javajdkinjava -cp
and here ara my classes and main jar) using my local java executor. I added all permissions using dbms_java.grant_permisions (execution forced me to give permissions java.io.FilePermission to <<ALL_FILES>> for execute), moreover I added to my database user JAVASYSPRIV and JAVAUSERPRIV role. Unfortunately, beside this I am still getting error:
C:javajdkinjava not found (Note that lookup with PATH isn't done due to the oracle executable being setuid.)
View 8 Replies
View Related
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
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
View Related
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
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
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
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
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
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
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
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
Dec 17, 2012
I want to create a DB job on APEX Server-1, when runs every 30 mins and on finding records, invokes an API available on another APEX Server-2 passing the parameters from Server-1. How do I achieve this ?
View 3 Replies
View Related
Oct 21, 2011
I'm trying to call a simple batch file from dbms_scheduler, the job created successfully but I it doesn't invoke the batch file I've created.
This is the contents of my batch file :
EXEC hr.load_employees
And this is the job attempting to invoke it :
begin
dbms_scheduler.create_job
(job_name => 'EMP_HIST',
job_type => 'EXECUTABLE',
job_action => 'C:sql_scriptsemployees_load.sql > nul',
start_date => SYSDATE,
-- repeat_interval => 'FREQ=DAILY;BYHOUR=23', -- Every night at 23:00.
repeat_interval => 'FREQ=SECONDLY; INTERVAL=2', -- Every Minute
enabled => true,
comments => 'Copy the emp table to history');
end;
/
View 7 Replies
View Related
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
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
Jul 23, 2010
Actually in our environment , sysadmins are upgrading java versions on Unix (HP & Solaris) Machines and they have asked the query whether oracle database uses Java or not?
If it uses then all the databases need to be shut down for their planned activities and if not no need to shutdown the databases.
View 17 Replies
View Related
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
Jul 30, 2012
Which is the best driver for java to Oracle database connection ?
View 1 Replies
View Related
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
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
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
Jan 11, 2012
I need to find out the exact DML statement which invoked a particular trigger inside a trigger body.
View 7 Replies
View Related
Jul 9, 2013
I am getting error message while installing oracle database gateway 11.2 on linux el6 64 bit machine
Error in invoking target 'install of makefile dg4mqs.mk'...if we ignore the error and continue...after installation we can see missing executable files .
View 5 Replies
View Related
May 27, 2008
How to display row value of each class as a column value
IDNAMECLASSHOURSSCHOOLNAME
1AllenMaths12school1
2SamMaths12school1
4PamMaths10school1
3SamComp10school1
9SmithComp15school1
7SmithPhy20school1
5PamPhy12school1
[code]....
I wanted output like below for School1
NamemathsCompPhyAccountsBusiness
Allen120000
Sam1210000
Pam10012150
Smith01520120
Adams000030
I wanted output like below for School2
NameCompAccountsBusiness
Anthony2000
Chris102020
I wanted output like below for School3
NamemathsAccounts
Angelo2015
Robert1515
how to write a single query, Also i may add /delete school/class anytime. Query should support mesans everything dynamically should get the data.Even stored procedure will work for me.
View 3 Replies
View Related
Aug 24, 2008
I'm modifying a package which contains a function with different parameters (say cno, gno, pname etc) need to be passed though it and that function is called by the cursor later in the program. I need to create a cursor (select statement) for every class (a program set)...i.e. multiple select statements for a program set with different values. The parameters needed to be passed correspond to same columns in different tables...so do i have to refer those tables everytime i'm passing the parameters using a select statement? The Program accepts the parameters as an array (list of parameters) and returns a cursor and the program handles one program set (class) at a time. That parameter list will be in a loop..i.e. it will be repeated for every certain combination (say cno - pname combination). So ... How should i proceed and create a select statement with different parameters declared in the function of type string making it dynamic and returning them using ref cursor?
View 1 Replies
View Related
Jun 2, 2010
My technical environment is: Win xp, dev9i AS vers9.0.2, Jinit vers1.3.1.9, OracleDB9i.
I created a sound,java file using Oracle9i JDeveloper, I compile it and the result is:
" Compiling...
D:Dev9ijdevWorkspaceWorkspace5soundsrcoracleformsfdSound.java
Successful compilation: 0 errors, 0 warnings."
I deploy sound.java to sound,jar and the deployed process is completed Successfully. I also executed all the configuration steps required to use this class from "Orale9i form builder" and it's ok
The problem is:
When I tried to import "sound" class from "Oracle9i form builder" by clicking
Program----> Import Java Class-----> Oracle.forms.fd.sound
Then an error has occurred:
Importing Class oracle.forms.fd.Sound...
Exception occurred: java.lang.NoClassDefFoundError: oracle/forms/ui/VBean
View 8 Replies
View Related
Sep 24, 2013
I need to filter ticket prices according to the class; i.e.
CASE WHEN booking_class = 'Economy' THEN economy_saver ELSE 0 END AS ECONOMY_SAVER THEN economy_basic ELSE 0 END AS ECONOMY_BASIC THEN economy_basic_plus ELSE 0 END AS ECONOMY_BASIC_PLUSEND, CASE WHEN booking_class = 'Business' THEN business ELSE 0 END AS BUSINESS THEN business_flexible ELSE 0 END AS BUSINESS_FLEXIBLEEND.
..The objective is to show only the prices that belong to the selected class. I am not sure if my sql is correct at this point.
View 7 Replies
View Related
Jun 27, 2013
I would like to update an XML element without using the function APPENDCHILDXML or INSERTCHILDXML because they are not available in Oracle 10GR1.
In my database, Oracle XDB is not installed.
The following query fail with the following error : ORA-00904: "INSERTCHILDXML" : identificateur non valide
update scl_profile
set profile_data =
insertChildXML(profile_data,'/exportImportMarcheCriteria','colonnesExport',
XMLType('<colonnesExport>ENTETE_GESTIONNAIRES_AUTORISES</colonnesExport>'))
where profile_xmltype =
'fr.mipih.marches.marche.criteres.ExportImportMarcheCriteria'
and profile_type =
'eMagh2.MRGS.AccesMarche.ListeMarche.Export.OptionsExportImport';
[code]........
If i try to use the package DBMS_XMLDOM, i have the following error :
ORA-06550: Ligne 3, colonne 11 :
PLS-00201: l'identificateur 'DBMS_XMLDOM.DOMDOCUMENT' doit etre declare
ORA-06550: Ligne 3, colonne 11 :
PL/SQL: Item ignored
I think it's because ORACLE XDB component is not installed in my database.
View 1 Replies
View Related
Jul 18, 2012
When working with SQL Server it's possible to execute several sql statements in one command of the DataAdapter in ADO.Net Now I try the same thing with an oracle database and recieve error ORA-00911: invalid character.
When remove ;character from query it again gives error- ORA-00933: SQL command not properly ended.
My query is like this-
update activity set activityname='Route Survey' where activityid=1;
SELECT * FROM activity where activityid=1
View 4 Replies
View Related