Using SendMailJPKG from PLSQL
Hello everbody,
I am trying to use the SendMailJPKG.
Everything runs fine when I call the Procedure like this:
v_ErrorStatus := SendMailJPkg.SendMail(
SMTPServerName => v_SMTPServerName,
Sender => v_Sender,
Recipient => p_Recipient,
CcRecipient => v_CcRecipient,
BccRecipient => v_BccRecipient,
Subject => v_Subject,
Body => v_Body,
ErrorMessage => v_ErrorMessage,
Attachments => SendMailJPkg.ATTACHMENTS_LIST('/transfer/75309.pdf','/transfer/73971.pdf','/transfer/73977.pdf')
But when I replace the last line with:
Attachments => SendMailJPkg.ATTACHMENTS_LIST(v_list)
I get a numeric or value error.
I've tested all types for variable v_list including Vachar2, table of varchar2(4000) or SendMailJPkg.ATTACHMENTS_LIST itself
but got no success.
I have also tested a Varchar2 which contains -exactly- the same string as in my first approach (including all quotes).
Can anybody help me?
Thanks in advance,
Roland
HEllo i need help in this problem too, if anybody has another package's version i 'll aprecciate if you send me the code
thanks
Similar Messages
-
Multiple attachment using SendMailJPKG from PLSQL
Hi,
I am able to send single attachment using SendMailJPKG.sendmail routine by providing the parameter as
sendmailjpkg.attachments_list('/test/mail.pdf')
Is it possible to send multiple attachments if so what is the syntax for the same.
Kindly help.
RegardsHEllo i need help in this problem too, if anybody has another package's version i 'll aprecciate if you send me the code
thanks -
How to retrieve data from plsql table in BI publisher Data template
Hi All,
I have created a data template for XML publisher report. In data template i m getting data from plsql table. for that i have created one package with pipelined function. I am able to run that sql from sql developer .But if i run the concurrent program then i got error like "java.sql.SQLSyntaxErrorException: ORA-00904: "XXXXX": invalid identifier".
I have used the same parameters in Data template and concurrent program....
please clarify me what needs to be done....
thanks in advance....
Regards,
DossHi Alex ,
i am using pipelined function and get the data from cursor and load it into plsql table (nested table). and i use the below in my data template to fetch the data:
<sqlStatement name="Q1">
<![CDATA[select * from table(PO_SPEND_RPT_PKG.generate_report(P_ORG_ID,P_SOB_ID,P_ORG_NAME,P_PERIOD_NAME,P_CLOSE_STATUS,P_E_PCARD_NEED,P_REPORT_TYPE))]]>
</sqlStatement>
if i run the above in sql developer i can get the result....from apps if i run i got the error "java.sql.SQLSyntaxErrorException: ORA-00904: "P_ORG_ID": invalid identifier"
Edited by: kalidoss on Sep 14, 2012 4:32 AM -
Can't create WS from PLSQL package (Jdeveloper 11g 4) (Exception occured)
Hello,
I'am using JDeveloper 11g preview 4.
On database i have a package with 2 procedures.
When I like to create a WS from database package I get the Exception:
java.lang.ClassCastException: oracle.jdeveloper.webservices.model.plsql.PLSQLPortType
at oracle.jdeveloper.webservices.model.generator.AddToDeploymentProfiles.getJarFiles(AddToDeploymentProfiles.java:592)
at oracle.jdeveloper.webservices.model.generator.AddToDeploymentProfiles.action(AddToDeploymentProfiles.java:292)
at oracle.jdeveloper.webservices.model.generator.GeneratorAction.run(GeneratorAction.java:147)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:525)
at java.awt.Dialog$2.run(Dialog.java:553)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:551)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:361)
at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:222)
at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:194)
at oracle.jdeveloper.webservices.model.Model.saveEditSync(Model.java:242)
at oracle.jdevimpl.webservices.wizard.jaxrpc.PLSQLWizard.runWizard(PLSQLWizard.java:366)
at oracle.jdevimpl.webservices.wizard.jaxrpc.PLSQLWizard.runWizard(PLSQLWizard.java:137)
at oracle.jdevimpl.webservices.WebServicesAddin.fastCreatePlSqlService(WebServicesAddin.java:1503)
at oracle.jdevimpl.webservices.WebServicesAddin.handleEvent(WebServicesAddin.java:870)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:513)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:843)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:486)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:1104)
at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:578)
at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:475)
at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:422)
at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:283)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1043)
at java.awt.Component.processMouseEvent(Component.java:5501)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5266)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3968)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception from Jdeveloper console
Validating XML...
Validating C:\Generali\WsGenerali\public_html\WEB-INF\web.xml
Validate XML: 0 errors, 0 warnings.
Aug 13, 2008 1:20:20 PM oracle.javatools.logging.LogUtils log
WARNING: Exception in task oracle.jdeveloper.webservices.model.generator.FixLocationAttribute$1@1fa522d on model oracle.jdevimpl.webservices.wsdl.WSDLXmlModel@129271e; txn name=null
java.lang.NullPointerException
at oracle.jdeveloper.webservices.model.generator.FixLocationAttribute$1.performTask(FixLocationAttribute.java:72)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:172)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:103)
at oracle.jdeveloper.webservices.model.generator.FixLocationAttribute.action(FixLocationAttribute.java:51)
at oracle.jdeveloper.webservices.model.generator.GeneratorAction.run(GeneratorAction.java:147)
at java.lang.Thread.run(Thread.java:595)
Aug 13, 2008 1:20:20 PM oracle.j2ee.xml.XMLMessages warningException
WARNING: Exception Encountered
Aug 13, 2008 1:20:20 PM oracle.j2ee.xml.XMLMessages warningException
WARNING: Exception Encountered
Aug 13, 2008 1:20:20 PM oracle.j2ee.xml.XMLMessages warningException
my procedures are:
type r_sifrant is record
( id number,
nadrejeni_id number,
opis varchar2(100),
privzeto varchar2(1)
type r_cursor is ref cursor return r_sifrant;
function f_sel_sifrant(p_naziv in varchar2) return r_cursor;
procedure gen_polica(p_username in varchar2, p_polica_xml in clob, p_stevilka_police out number);
Here I have posted a video of generating ws from plsql package (screen capture):
http://shrani.si/f/x/P6/m5GSF8c/in2.avi
Thank you for any help
best regards
Peterv
Message was edited by:
user651799Hello,
I'am using JDeveloper 11g preview 4.
On database i have a package with 2 procedures.
When I like to create a WS from database package I get the Exception:
java.lang.ClassCastException: oracle.jdeveloper.webservices.model.plsql.PLSQLPortType
at oracle.jdeveloper.webservices.model.generator.AddToDeploymentProfiles.getJarFiles(AddToDeploymentProfiles.java:592)
at oracle.jdeveloper.webservices.model.generator.AddToDeploymentProfiles.action(AddToDeploymentProfiles.java:292)
at oracle.jdeveloper.webservices.model.generator.GeneratorAction.run(GeneratorAction.java:147)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:525)
at java.awt.Dialog$2.run(Dialog.java:553)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:551)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:361)
at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:222)
at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:194)
at oracle.jdeveloper.webservices.model.Model.saveEditSync(Model.java:242)
at oracle.jdevimpl.webservices.wizard.jaxrpc.PLSQLWizard.runWizard(PLSQLWizard.java:366)
at oracle.jdevimpl.webservices.wizard.jaxrpc.PLSQLWizard.runWizard(PLSQLWizard.java:137)
at oracle.jdevimpl.webservices.WebServicesAddin.fastCreatePlSqlService(WebServicesAddin.java:1503)
at oracle.jdevimpl.webservices.WebServicesAddin.handleEvent(WebServicesAddin.java:870)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:513)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:843)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:486)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:1104)
at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:578)
at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:475)
at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:422)
at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:283)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1043)
at java.awt.Component.processMouseEvent(Component.java:5501)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5266)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3968)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception from Jdeveloper console
Validating XML...
Validating C:\Generali\WsGenerali\public_html\WEB-INF\web.xml
Validate XML: 0 errors, 0 warnings.
Aug 13, 2008 1:20:20 PM oracle.javatools.logging.LogUtils log
WARNING: Exception in task oracle.jdeveloper.webservices.model.generator.FixLocationAttribute$1@1fa522d on model oracle.jdevimpl.webservices.wsdl.WSDLXmlModel@129271e; txn name=null
java.lang.NullPointerException
at oracle.jdeveloper.webservices.model.generator.FixLocationAttribute$1.performTask(FixLocationAttribute.java:72)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:172)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:103)
at oracle.jdeveloper.webservices.model.generator.FixLocationAttribute.action(FixLocationAttribute.java:51)
at oracle.jdeveloper.webservices.model.generator.GeneratorAction.run(GeneratorAction.java:147)
at java.lang.Thread.run(Thread.java:595)
Aug 13, 2008 1:20:20 PM oracle.j2ee.xml.XMLMessages warningException
WARNING: Exception Encountered
Aug 13, 2008 1:20:20 PM oracle.j2ee.xml.XMLMessages warningException
WARNING: Exception Encountered
Aug 13, 2008 1:20:20 PM oracle.j2ee.xml.XMLMessages warningException
my procedures are:
type r_sifrant is record
( id number,
nadrejeni_id number,
opis varchar2(100),
privzeto varchar2(1)
type r_cursor is ref cursor return r_sifrant;
function f_sel_sifrant(p_naziv in varchar2) return r_cursor;
procedure gen_polica(p_username in varchar2, p_polica_xml in clob, p_stevilka_police out number);
Here I have posted a video of generating ws from plsql package (screen capture):
http://shrani.si/f/x/P6/m5GSF8c/in2.avi
Thank you for any help
best regards
Peterv
Message was edited by:
user651799 -
Select data from plsql collections
Hi All,
I am not a developer but working as a DBA, so not very much familiar with pl/sql, still gone through with documentation and could come up with some solution of my problem. I need some expert advice here.
Problem : I am writing down some kind of plsql program for monitoring of some special batch job, I know we have lot of other option to do the same including db/grid control ..etc but for some
reason i have to do this using plsql only.
Requirement : my requirement is to select data from table in plsql and then should have ability to query it again and again. I would not prefer to go to table rather than directly from plsql..
I wrote down below code for sample, bulk collect data into collection type and can print using for loop.
Declare
type ts is table of v$session%rowtype index by pls_integer;
tsess ts;
begin
select * bulk collect into tsess from v$session ;
for i in 1..tsess.count loop
dbms_output.put_line(tsess(i).terminal);
end loop;
end;
But, is there any way same collection ( tsess in above example ) can be queried using select statement like 'select * from table ( Tsess ) ' I have searched on net and found this can be done using creating type at database level. But my problem is I can not create any object in database as being it is a production one.
I was looking for if is there any way same can be accomplished ... like cast / multiset .. however, I could not get it through.
your help would be appreciated !!
Regards,I don't think you need to use arrays here, only SQL, have a look at subquery factors and report back if that is insufficient...
Edited by: BrendanP on 12-Feb-2012 03:07 to add an example:
I gather that you want to 'requery' data that you have already got from the database purely to be able to use SQL functionality such as ORDER BY in multiple ways. Here is how you can do this in the original SQL for one particular example, where you want to query v$sql ordering by CPU time and by disk reads separately (I tested this but the output won't look good here, so omitting it):
WITH v AS (
SELECT
Substr (sql_text,1,500) sql_text,
cpu_time/1000000 cpu_seconds,
disk_reads,
buffer_gets,
executions,
CASE WHEN rows_processed != 0 THEN Round( buffer_gets / Nvl (Replace (rows_processed, 0, 1) ,1)) END Buffer_gets_rows_proc,
Round (buffer_gets / Nvl (Replace (executions, 0, 1), 1)) Buffer_gets_executions,
elapsed_time / 1000000 elapsed_second,
module
FROM v$sql s)
SELECT
'CPU' order_by,
cpu_seconds order_val,
sql_text,
cpu_seconds,
disk_reads,
buffer_gets,
executions,
buffer_gets_rows_proc,
buffer_gets_executions,
elapsed_second,
module
FROM v
UNION
SELECT
'Disk reads',
disk_reads,
sql_text,
cpu_seconds,
disk_reads,
buffer_gets,
executions,
buffer_gets_rows_proc,
buffer_gets_executions,
elapsed_second,
module
FROM v
ORDER BY order_by, order_val DESC -
Sending Email from PLSql Oracle 8.0.6
Has anyone got any ideas or achieved this: Sending Email from PLSql for Oracle version 8.0.6 using the limited technology support in this version, i.e. UTL_SMTP & UTL_TCP are not supported.
Any help will be greatly appreciated.Sending Email from PLSql for Oracle version 8.0.6 using the limited technology
support in this version, i.e. UTL_SMTP & UTL_TCP are not supported.That's because they use Java and Java doesn't work with versions older than 8i. Does 8.0 support external procedures (I went straight from 7.3.4 to 8.1.6)? If so you might be able to cobble together some C to interface with smtp on the OS. Otherwise I think you're looking at writing some client-side application to do this.
Cheers, APC -
Hi,
I have a requirement of calling BI webservices from Plsql stored procedure. I generated all my wsdl java classes and loaded them into the database. However, when I tried to call one of my java class using stored procedure, it is giving me"ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError".
*Cause: A Java exception or error was signaled and could not be
resolved by the Java code.
*Action: Modify Java code, if this behavior is not intended.
But all my dependency classes are present in database as java class objects and are valid. Can some one help me out of this?Stiphane,
You can look in USER_ERRORS to see if there's anything more specific reported by the compiler. But, it could also be the case that everything's OK (oddly enough). I loaded the JavaMail API in an 8.1.6 database and also got bytecode verifier errors, but it ran fine. Here are the errors I got when loading Sun's activation.jar, which ended up not being a problem:
ORA-29552: verification warning: at offset 12 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):12 by a throw at offset 18 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):18 by a throw at offset 30 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):30 by a throw
Hope this helps,
-Dan
http://www.compuware.com/products/devpartner/db/oracle_debug.htm
Debug PL/SQL and Java in the Oracle Database -
Calling perl script from PLSQL
Hi All,
I have created Java stored procedure and oracle function to execute the os commnad, this works fine for calling batch scripts but when i used same function to call perl script,
like how we call in batch script
perl <script name> the sql gets hanged.
Is it possible to call perl like this?
or is their any other way to call from plsql
Thanks ChandraAre you able to run that perl script at DOS command line?
Did you call the perl script directly from the java proc or you put the perl command line in a DOS .BAT scirpt and called that from the java proc? -
How to consume Web Service with Password digest from PLSQL
We have Oracle 10g (10.2.0.3.0) 64 bit. We have a situation where we need to consume web service whose security header looks like as follow,
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-50">
<wsse:Username>weblogic</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">d2enK45chjBPVvvukbYU6OX56kI=</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">YAhEtLJfp4lzycLd3hZYjQ==</wsse:Nonce>
<wsu:Created>2013-01-22T06:28:38.897Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
Here we need passowrd digest, Nonce and Timestamp.
How to create password digest from PLSQL? or if any other alternatives available please response soon.I do not see why it will not be possible to do digest authentication with a web server using PL/SQL.
As for the digest password - the web server supplies a token (a nonce) which you need to use for creating the hashed authentication token (the digest password). The URL I posted explains this authentication process.
As for the technical how-to in PL/SQL - as I mentioned, never had to do this (only dealt with Basic and NTLM authentication thus far). But as other auth methods (such as Microsoft's NTLM) can be implemented, I do not see why digest authentication could not.
Suggest you spend some time googling for technical articles/sample code on the subject - and try to find specific PL/SQL related sample code too. -
Is it possible to call a java function from plsql?
I have a plsql script which loads data in to a table. One of the fields is a notes field. I would like to use advance offerings of java to manipulate the data before inserting. Is there away I can pass the data to a java function and have it return the manipulated data?
Thanks
AaronYou can use java stored procedure to call java function from plsql.
1. Create a java class with a static function(which will be called from plsql).
2. Compile and load the class into database using LOADJAVA command.
3. Create a wrapper stored procedure or function in plsql which calls the above java function.
4. Access this plsql procedure like normal database procedure. This will invoke underlying java function in which you can do all the processing and return result.
Refer this url for help on implementing above steps :
http://otn.oracle.com/tech/java/jsp/pdf/developing_o8i_apps_with_plsql_and_java_twp.pdf
Samples on java stored procedure :
http://otn.oracle.com/sample_code/tech/java/jsp/oracle9ijsp.html
Chandar -
Rest based webservices from plsql procedures/packages
Guyz.
Please let me know How to create Rest based webservices in jdeveloper tool from plsql procedures/packages.
Im very much in need
Thanks,Hi User ,
Welcome to OTN !!
You can refer to these links and figure out -
http://docs.oracle.com/cd/E16162_01/user.1112/e17455/dev_web_services.htm#CHDJIFAE
http://theblasfrompas.blogspot.com/2011/03/developing-restful-web-services-from.html
Also for calling pl/sql packages from Java , use soemthing like this - http://www.coderanch.com/t/302171/JDBC/databases/execute-PL-SQL-program-Java -
Replace Words in PDF From PLSQL
Hi All,
This is Naveen, I need a solution for replace words in a PDF file from PLSQL. Actually my files are in file server from there i need to pick file and replace words and show to user as a output file.
Example :
Lets Take Product Attachments,In there
Bill No :&&BILLNO
Customer No :&&CUSTNO
etc.
Instead of &&BILLNO we need to replace 123
&&CusomerNo as 345
Because in my company each product have different type of template so i need this.
Any of one can guide me on this.
Application:Oracle AppsFirst, this is the wrong forum for this question. This is for discussions about SQL Developer Data Modeler.
2nd. Looks like you should convert your PDF files to Word documents and use a simple mail merge type function (or macro?) to populate the variables. Look up mail merge in the Word help. There is a way to connect to an Oracle db to pull the data from a table but I am afraid it has been too long since I did that to remember the details. Ask this question on the right forum and you should find better help. -
How to upload and download any file from plsql through weblogic server
hi all,
how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
Thanks and Regards,
MSORAhi bala ,
for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
bye
vamshi -
Unable to truncate table from plsql
i want to collect stats as my query runs.
i cannot do it from plsql
declare
-- Local variables here
i integer;
begin
-- Test statements here
SET AUTOTRACE ON;
truncate table plan_table;
end;how do i do it.Hi,
TRUNCATE TABLE is not a PL/SQL command; it's a SQL command.
To run a purely SQL command in PL/SQL, use EXECUTE IMMEDIATE.
SET AUTOTRACE isn't a PL/SQL command either; it's a SQL*Plus command, and I don't know of any way to run it except from the SQL*Plus command prompt.
I think this is what you need to do:
SET AUTOTRACE ON;
declare
-- Local variables here
i integer;
begin
-- Test statements here
EXECUTE IMMEDIATE 'truncate table plan_table';
end; -
Execetu script file from plsql
Is possible execute statements saved in file from plsql block?
I have file c:\xxx.sql and I want execute it from plsql block. c:\xxx.sql contains DDL and DML statements.
I need something like
begin
execute c:\xxx.sql;
end;
thank you for helpThank you for reply. Maybe you can help with my problem. I have website and data are in server in mysql database, which I can connect only from localhost. I need get data to oracle database resides on my pc.
I try create this procedure to get data:
utl_http.request('http://........../make_ddl_and_dml_script_for_oracle.php'); --run script, which create script ora.sql on server for oracle
utl_http.request_pieces()--"download" file and save it to my pc
run ora.sql to create or refresh data in my pc
I know that I can solve it using java, but exist any solution???
thank you
Maybe you are looking for
-
HP Laserjet 4100 will not print in Snow Leopard
Since I've installed Snow Leopard, I have not been able to print with my HP Laserjet 4100. My set-up: new 24" iMac, many hard drives and more. Two devices: HP Color Laserjet 5550 and HP Officejet J5750 are connected to the iMac through a USB Hub. Alt
-
Can multiple users access the account and use services on different computers?
?
-
How to get the default data in emp,dept tables
Hi all i inserted some date into emp,dept tables. after that i want to default records what is containing at the time of instaling in oracle. what script can i run to get that data. Regards GB rao
-
how can i uninstall quicktime on the add and remove page it will not work i think there are files missing. please help.
-
Updating Outlook Calendar with appointment
Hey Guys!! I am trying to update outlook calendar with appointments. I did some research and could send the .vcs file as an attachment to the email. But the user has to open the email and double click the attachment and save it to add the appointment