Error calling a procedure of h
HelloI get the following error when trying to call a procedure from h. I checked and all the settings are correctly transferred. Not sure why it's throwing error. Here is the error message.
oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in the call to 'AbcPositionDetails '.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any help is appreciated.
Thanks in advance
PK
PK,
The exception ' wrong number or types of arguments in the call to 'AbcPositionDetails' ' means that you pass incorrect parameters to procedure types or parameter argument is differrent.
for example, if the procedure definition is AbcPositionDetails (* x * in varchar2, varchar2 y ), you call in AM
As the appeal procedure (start AbcPositionDetails (* z * =>: 1, t =>: 2); end;)
To resolve this problem, you must call the procedure (start AbcPositionDetails * (x * =>: 1, => y : 2); end;)
that is the definition of the procedure does not change
(or) You can call it that (begin AbcPositionDetails (: 1: 2); end;)
Thank you
Kumar
Tags: Oracle Applications
Similar Questions
-
ORA-06508, procedure cannot call the procedure of package
I have a large stored procedure that calls a package (procedure) that manages a number of procedures to determine whether the process can continue or not. (It checks authorization of the student to enroll in a class). We have a web process calling the stored procedure, and that works fine. What does not work, is a call to the package. Oracle returned ORA-06508: PL? SQL: could not find program unit called.
I have included instructions for debugging, so I know that it is the specific call to a procedure in the package fails with ORA-06508. Thinking it's perhaps something in the package, I inserted a debug statement as the first line in the procedure called in the package. (Debugging instructions call a procedure inserts of rows in a table of debugging with independent validation).
When I log in the user account with sqlplus and run a test, everything works fine. But when the web process is running under the same user, the process fails to call the procedure of package and fails with ORA-06508.
It seems as if the web process runs with the rights of the appellant, or a role is not granted.
Can someone help me understand what the problem is?
offered hv, I appreciate your comments.
We solved the problem: remove the package that couldn't be cited, then re-create. That's all!
Apparently, something in the database was tangled upward. The server recently had problems with disk space, then it might have been related to that. But we'll never know for sure.
The stored procedure and packaging (procedures) which he called were owned by the same schema, and there is no mechanism that I can find to prevent one of the other appellant. But that was the case - Oracle threw the ORA-06508 exception when the stored procedure called the package procedure.
I replaced the stored procedure and package several times fine-tuning debugging code, but this has not fixed the problem.
Finally let it drop and then re-create the package, it's which solved the problem.
Regarding requests to view the code, there is no way that I could reproduce the problem, since the error that occurred was against the permissions and rules which packages run and the procedures of the Oracle. Thanks for all the tips and suggestions.
-
How to call the procedure on the page of the ofa
Hi all
I have a button.when I click this button need to call the procedure and should return the values.i tried with below code.am is error.i am passing two parameters to the procedure.please suggest me where I made a mistake in the code.
code in am
-------------
public String calprorate (String laseid, String billingid)
{
OADBTransaction oadbtransaction = (OADBTransaction) getTransaction ();
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl) getTransaction ();
String retValues;
System.out.println ("number:" + laseid);
StringBuffer str = new StringBuffer();
Str.Append ("BEGIN");
Str.Append (LEASE_PRORATE_PKG ".") LEASE_PRORATE_PROC1 (»);
Str.Append ("p_lease_id = >: 1");
Str.Append ("p_billing_id = >: 2");
Str.Append ("P_PRORATE = >: 3");
System.out.println ("params");
Str.Append (»); «) ;
Str.Append ("END");
System.out.println ("End");
OracleCallableStatement oraclecallablestatement =
(OracleCallableStatement) oadbtransaction.createCallableStatement (str.toString (), 1);
System.out.println ("Oracle");
try {}
oraclecallablestatement.setString(1,laseid);
oraclecallablestatement.setString(2,billingid);
oraclecallablestatement.setInt (1, Integer.parseInt (laseid));
oraclecallablestatement.setInt (2, Integer.parseInt (billingid));
System.out.println ("param");
oraclecallablestatement.registerOutParameter (3, Types.VARCHAR);
System.out.println("3");
oraclecallablestatement. Execute();
System.out.println ("exe");
retValues = oraclecallablestatement.getString (3);
}
catch (System.Exception e)
{
System.out.println ("delivery");
throw OAException.wrapperException (e);
}
Return retValues;
System.out.println ("End");
}
code co:
-------------
If (pageContext.getParameter ("Calc")! = null) {}
Vo1 OAViewObject = (OAViewObject) am.findViewObject ("AddonBillingVO");
System.out.println ("VO");
{if(VO1!=null)}
CNT int = vo1.getRowCount ();
System.out.println ("count:" + cnt);
If (cnt > 0)
{
RowSetIterator rs = vo1.createRowSetIterator("empIterator");
System.out.println ("EMP");
If (rs! = null)
{
While (rs.hasNext ())
{
AddonBillingVORowImpl line = rs.next ((AddonBillingVORowImpl));
System.out.println ("impl");
If (line! = null)
{
String laseid = row.getAttribute("LeaseId").toString ();
System.out.println (laseid);
String billingid = row.getAttribute("AddonBillingId").toString ();
[Serializable] param = {}
laseid, billingid
};
String newupc = (String) am.invokeMethod ("calprorate", param);
}
}
Khalil.
You can paste your spec procedure here?
Also see: Oracle tips of Johny: OAF: sample code to call the PL/SQL of OA Framework procedure
-
Trapping errors in stored procedures
I run queries on a Government computer. There are errors in some of the stored procedures that will NEVER disappear. Reality of life and I have to live with it (I'm just a data analyst - not the developer of procedures)
If I do this, hoping to catch the error
Well, he can still plant.BEGIN run_stored_proc (my_cursor, my_id, param3); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('ERROR IN ID (' || my_id || '). The error was ' || SQLCODE || ' -ERROR- ' ||SQLERRM); END;
So, it seems that run_stored_proc calls some_other_stored_procedure, which has problems. I was hoping to trying to capture the error in the procedure at a higher level, it would also seize the error at a lower level 'Sub procedure. It is how works a TRY-CATCH in java. If an error occurs anywhere along the path inside the TRY-CATCH, she is caught. Of course, java ins't of PL/SQL, but is it possible for me to catch a lower level error and do not have this code crash?SQL> @c:\mysql\run_test ERROR IN ID (2692). The error was -20100 -ERROR- ORA-20100: Exception occurred in some_other_stored_procedure ORA-01422: exact fetch returns more than requested number of rows
Fortunately for me, it actually does not crash as often. But I have to put this code in a loop, then run it to many different my_id. And when he plant, it is not important from a data analysis perspective. I can't do without a small percentage of the data. But I'd love to be able to just run my script and do not have to look for unexpected accidents.
This isn't a question about how to solve the error too many lines in the procedure. I don't have access to the procedure, and it's not going to be fixed. I just need to know how to deal with the capture of the error, if it is at all possible.I'm not sure I Armi what you're asking here. Your script is not 'crash', it is just to report the error through the dbms_output.put_line statement you added. When you say "I have to put this code in a loop, then run it to many different my_id", do you mean you want to call run_stored_proc multiple times with different values of my_id?
If so, then it should look like:
begin for rec in (select my_id from wherever) loop BEGIN run_stored_proc (my_cursor, my_id, param3); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('ERROR IN ID (' || my_id || '). The error was ' || SQLCODE || ' -ERROR- ' ||SQLERRM); END; end loop; end;
The other Manager to swallow the error and control will return at the top of the loop statement and execute the procedure with the next value of my_id.
John
-
Hi all
I use Sql Developer and calling several procedure like this:
Start multip (1,2); end;
Start multip (3,2); end;
Start multip (4.2); end;
Start multip (5.2); end;
and when I am trying to run this as one, treat this as a single block and not running.
Tried that too... but still get an error.
Start multip (1,2); end; \
Start multip (3,2); end; \
Start multip (4.2); end; \
Start multip (5.2); end; \
Please suggest what should be the syntax.
Thank you
VJRun it as:
begin multip(1,2); multip(3,2); multip(4,2); multip(5,2); end;
SY.
-
Hi all
How to call the procedure using CALL with the data type of parameter directory?
for example, there are a DBMS_FGA procedure. ADD_POLICY with these settings:
and I call this statement:PROCEDURE ADD_POLICY Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- OBJECT_SCHEMA VARCHAR2 IN DEFAULT OBJECT_NAME VARCHAR2 IN POLICY_NAME VARCHAR2 IN AUDIT_COLUMN_OPTS BINARY_INTEGER IN DEFAULT
It works
But this one does not work for me: (.) I have only to add the AUDIT_COLUMN_OPTS parameter with the type of directory data.CALL DBMS_FGA.ADD_POLICY(POLICY_NAME => 'POL1',OBJECT_SCHEMA => 'USER1',OBJECT_NAME => 'TABLE1');
I know that I can use BEGIN... END or EXECUTE in sqlplus, however I have to test it by using the CALL. If possible, it would be much easier for me to appeal through my code in PHP.CALL DBMS_FGA.ADD_POLICY(POLICY_NAME => 'POL1',OBJECT_SCHEMA => 'USER1',OBJECT_NAME => 'TABLE1',AUDIT_COLUMN_OPTS => DBMS_FGA.ALL_COLUMNS); ERROR at line 1: ORA-06553: PLS-221: 'ALL_COLUMNS' is not a procedure or is undefined
Oracle version: 11 GR 2
Any help would be appreciated.
Thank you
Yusata.
Published by: Yusata on June 18, 2012 04:57CALL is SQL statement. Therefore, you cannot reference package variables directly. And DBMS_FGA. ALL_COLUMNS is a global package variable. One way to do it is of DBMS_FGA. ALL_COLUMNS value:
SQL> set serveroutput on SQL> exec dbms_output.put_line(DBMS_FGA.ALL_COLUMNS); 1 PL/SQL procedure successfully completed. SQL>
Now, you can:
DIAL THE DBMS_FGA. ADD_POLICY (POLICY_NAME-online 'POL1', OBJECT_SCHEMA => "USER1", OBJECT_NAME-online 'TABLE1', AUDIT_COLUMN_OPTS-online 1);
Or, if you're worried value could change in future versions, you can create a getter function:
CREATE OR REPLACE FUNCTION GET_DBMS_FGA_ALL_COLUMNS RETURN NUMBER IS BEGIN RETURN DBMS_FGA.ALL_COLUMNS; END; /
However, you grant run on DBMS_FGA to the owner of the function directly, without going through the role. Now, you can:
DIAL THE DBMS_FGA. ADD_POLICY (POLICY_NAME-online 'POL1', OBJECT_SCHEMA => "USER1", OBJECT_NAME 'TABLE1', AUDIT_COLUMN_OPTS-online GET_DBMS_FGA_ALL_COLUMNS =>)
);
SY.
-
Problems trying to call the procedure in a PL/SQL package.
We use BI Publisher 10.1.3.4.1.
I am trying to call a procedure in a package by using a data model, as I read it is the best way to do it.
Here's the package. Very straightforward, just insertion of a row in a table to try this out. I tested the procedure and that it works correctly.
-----
CREATE OR REPLACE PACKAGE JM_PKG_OBIEE_ETL_TEST
-Declarations of function and public procedure
PROCEDURE INSERT_TEST_ROW;
END JM_PKG_OBIEE_ETL_TEST;
/
CREATE OR REPLACE PACKAGE BODY JM_PKG_OBIEE_ETL_TEST
-Function and procedure implementations
PROCEDURE INSERT_TEST_ROW IS
NUMBER OF NEXT_ID;
BEGIN
SELECT COUNT ()) + 1 IN EDDWMAN NEXT_ID. JM_OBIEE_ETL_TEST;
INSERT INTO EDDWMAN. JM_OBIEE_ETL_TEST
(ID, VALUE, DATE_STAMP)
VALUES
(NEXT_ID, 'Test' |) NEXT_ID, SYSDATE);
COMMIT;
EXCEPTION
WHILE OTHERS THEN
RAISE_APPLICATION_ERROR (-20001,
"An error occurred"; SQLCODE.
"- ERROR -" | SQLERRM);
END INSERT_TEST_ROW;
END JM_PKG_OBIEE_ETL_TEST;
-----
Here is the data model that I use. When I run it, I get a syntax error. If I change the "defaultPackage' to"defaultPackage", thus eliminating the appeal of the package, the data model works very well and I get an xml output of what is in the table.
-----
< name of dataTemplate = 'test' than one dataSourceRef = 'Oracle BI EE"defaultpackage ="JM_PKG_OBIEE_ETL_TEST">
< name dataTrigger = source "beforeReport" = "JM_PKG_OBIEE_ETL_TEST. INSERT_TEST_ROW "/ >"
< dataQuery >
< SQLStatement instance name = "test_results" >
<! [CDATA [SELECT ID, saw_2, DATE_STAMP SDS saw_3 VALUE saw_1. JM_OBIEE_ETL_TEST]] >
< / sqlStatement >
< / dataQuery >
< dataStructure >
< name of group = "G_TEST_RESULTS" source = "test_results" >
< element name = "test_ID" value = "saw_1" / >
< element name = "test_value" value = "saw_2" / >
< element name = "test_DATE_STAMP" value = "saw_3" / >
< / Group >
< / dataStructure >
< / dataTemplate >
-----
Any suggestions? Y at - it configuration settings that can be disabling package calls? This package is located in the same schema as the table is in and I can see the data in this table to OBIEE & BI Publisher.
Thoughts?
Published by: Jared Moe on June 30, 2011 12:42
Published by: Jared Moe on June 30, 2011 12:45Yes you must change the procedure in function first. In addition, even if you do not use parameters here if passing them in you must also declare their in the package specification in the exact order you have set them up in your data source. Change your name to BeforeReportTrigger function (and note the case-sensitive characters). Here is the code that I modified.
I hope this helps.
Steve
Published by: Steve P on July 1, 2011 14:12
Published by: Steve P on July 1, 2011 14:14
Published by: Steve P on July 1, 2011 14:14
-
Huh? Or, call a procedure from a dynamic page portlet
I have a procedure which returns the number of records in a table. Works very well.
I want to call this procedure from a dynamic page portlet in Oracle portal.
Here is (close to the) the content of the page:
< HTML >
< TITLE > example < /title >
< ORACLE >
HTP. P (SCHEMANAME. PROCEDURENAME());
< / ORACLE >
< / BODY >
< / HTML >
I get an error
ORA-00900 invalid sql statement.
Could not be parsed as portal_app - HTP. P (SCHEMANAME. PROCEDURENAME()); WWV-08300
(The procedure has been granted execute privileges to the public and anonymous.)So, it is a FUNCTION and not a PROCEDURE that you are trying to call from a dynamic page? Then try something like the following:
DECLARE v_test VARCHAR2(4000); BEGIN v_test := SCHEMA.FUNCTION(); htp.p(v_test); END; -
Calling stored procedure - re-edited NullPointerException
Hi all
I am re-editing that my first attempt was quite low.
I want to create a Java application that communicates with an Oracle XE database edition to:
Class.forName ("oracle.jdbc.driver.OracleDriver");
JOptionPane.showMessageDialog (null, "Driver loaded");
Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@//localhost:1521/xe", "SYSTEM", "root");
JOptionPane.showMessageDialog (null, "database connected");
This all works fine and I can perform queries and transactional instructions within the instance of java.
However, I can't call stored procedures that I will receive a null pointer exception. The stored procedure, I try to call returns values however I know it works as I can run it in SQL Developer. The code below is the statement that calls the stored procedure, alll the sources I looked at it's correct, I also tried, cs.executeUpdate and Resultset rs when you try to call the java statement.
public void thread_actionsperformed (ActionEvent c) //generates son
{
Try
{
CallableStatement cs = con.prepareCall ("{call PROCEDURE2}"); Calls a stored procedure that would generate threaded emails
CS. Execute();
JOptionPane.showMessageDialog (null, "Algorithm Threading successfully Executed");
}
catch (SQLException ex)
{
ex.printStackTrace ();
JOptionPane.showMessageDialog (null, "Threading algorithm Executed without success"); Error response
}
catch (NullPointerException ex)
{
ex.printStackTrace ();
JOptionPane.showMessageDialog (null, "Threading algorithm Executed without success"); Error response
}
}
The Java application cannot 'see' the sp? Or is it something to do with privileges? I was puzzled by this during some time now, any help would be greatly appreciated.
java.lang.NullPointerException
at ETA_Final.thread_actionPerformed (ETA_Final.java:332)
to ETA_Final$ 5.actionPerformed(ETA_Final.java:141)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
in javax.swing.plaf.basic.BasicMenuItemUI$ Handler.mouseReleased (BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Thank you and best regards,
K
Published by: Outbound86 on April 28, 2010 13:58Hi Kev,
I expected this - so is it possible that your dumb object is null when you are in the ActionListener who manages the procedures?
How will you spend until you use it (line 332), are you using Threads?Thnaks,
Ivaylo -
Calling a procedure in a dynamic pattern of antoher procedure
Hi, as the title says, I have a procedure to call another procedure, but the schema corresponding to the second procedure in nees to be dynamic. I tried a few different ways without success.
I tried...
FUNCTION to CREATE or REPLACE F_Refresh_Preprocess (lv_t_name VARCHAR2, VARCHAR2 lv_t_sch)
RETURN VARCHAR2
AS
BEGIN
EXECUTE IMMEDIATE lv_t_sch | '. P_TRUNC_TAB ("' | lv_t_name |) ''')';
END;
/
But I have...
< right > diagram. P_TRUNC_TAB ('< the right name table >');
ORA-00900: invalid SQL statement
I confirmed that I can perform the procedure in an anonymous block.
BEGIN
< the right schema >... P_Trunc_Tab ('< the right name table >');
END;
/
PL/SQL procedure successfully completed.
I also tried to use DBMS_SQL. ANALYSIS/DBMS_SQL. RUN as follows...
FUNCTION to CREATE or REPLACE F_Refresh_Preprocess (lv_t_name VARCHAR2, VARCHAR2 lv_t_sch)
RETURN VARCHAR2
AS
stru_str VARCHAR2 (3000);
CURSOR_HANDLE INTEGER.
insert_rows VARCHAR2 (2000);
BEGIN
DBMS_OUTPUT. Put_line(lv_t_sch ||) '. P_TRUNC_TAB ("' | lv_t_name |) ''');');
stru_str: = lv_t_sch | '. P_TRUNC_TAB ("' | lv_t_name |) ''');'
CURSOR_HANDLE: = DBMS_SQL. OPEN_CURSOR;
DBMS_SQL. PARSE (CURSOR_HANDLE, stru_str, DBMS_SQL. V7);
insert_rows: = DBMS_SQL. EXECUTE (CURSOR_HANDLE);
DBMS_SQL. CLOSE_CURSOR (CURSOR_HANDLE);
COMMIT;
END;
/
But I get the same error. I also tried to put the "exec" in both versions of nothing doesn't.
Any help would be greatly appreciated.Dynamically, you need to run a complete PL/SQL block, i.e.
EXECUTE IMMEDIATE 'BEGIN ' || lv_t_sch || '.p_trunc_tab(''' || lv_t_name || '''); END;';
You probably want to use bind variables as well
EXECUTE IMMEDIATE 'BEGIN ' || lv_t_sch || '.p_trunc_tab( :1 ); END;' USING lv_t_name;
Justin
-
java.sql.SQLException: ORA-06550 and ORA-00900 call stored procedures
Hi all
I have 2 a stored procedures that I want to call from my Session bean. One of them takes a few settings, but not the other. When I call the procedures, I get the following errors described below. I tested the two stored procedures in sql plus and sqldveleoper and they work well. The funniest, it is, I have another stored procedure that I can call successfully from the same bean in session with no problems, so I'm a bit confused as to why his play now.
I use stand-alone 10.1.3.4 OC4J and Oracle 10 g Db 10.2.0.4 and platform DB that I use is Oracle10gPlatform and Eclipselink as my JPA provider. I have also tried against toplink (not toplink essentials) and still no joy
Here is the error I get when I try and call the procedure which takes the parameters of the session bean
Here are my stored procedure that take parametersInternal Exception: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'HASHDATA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored Error Code: 6550 Call: BEGIN HashData(input=>?, hashedValue=>?, hashed=>?); END; bind => [password1, => hashedValue, => hashed] Query: DataReadQuery()
Here is my code in the session bean to call the procedure that takes as parameters (Hashdata)create or replace procedure hashData(input IN VARCHAR2, hashedValue OUT BLOB, hashed OUT BOOLEAN) as inputRaw RAW(2000); --hashed BOOLEAN := false; begin dbms_output.put_line('the data to be hashed is '||input); dbms_output.put_line('converting input to raw ...'); inputRaw := utl_i18n.string_to_raw(input,'AL32UTF8'); dbms_output.put_line('Hashing Data ...'); hashedValue := DBMS_CRYPTO.Hash (src=>inputRaw,typ=>DBMS_CRYPTO.HASH_SH1); dbms_output.put_line('hash is '||UTL_I18N.raw_to_char(dbms_lob.substr(hashedValue, 4000,1))); if (hashedValue is not null) then hashed :=true; dbms_output.put_line('hashedValue IS NOT null'); else hashed := false; dbms_output.put_line('hashedValue IS null'); end if; end;
When I call the other takes no parameters, I get the following error.public UserBean() { // TODO Auto-generated constructor stub sessMan = SessionManager.getManager(); session = sessMan.getSession("Session", Thread.currentThread() .getContextClassLoader()); } public Serializable hashData(String input){ logger.debug("Hashing Data ... "); hashedValue= null; boolean hashed=false; StoredProcedureCall call = new StoredProcedureCall(); ValueReadQuery query = new ValueReadQuery(); call.setProcedureName("HashData"); call.addNamedArgumentValue("input", input); call.addNamedOutputArgument("hashedValue", "hashedValue", java.sql.Blob.class); call.addNamedOutputArgument("hashed", "hashed", java.lang.Integer.class); query.addArgument("input"); query.setCall(call); session.executeQuery(query); if ((Boolean)hashed){ logger.debug("The data has been hashed and the hash value is: "+hashedValue); } else{ logger.debug("The data has could not be hashed"); hashedValue=null; } return (Serializable)hashedValue; }
Here is the procedure which takes no parametersInternal Exception: java.sql.SQLException: ORA-00900: invalid SQL statement Error Code: 900 Call: BEGIN testJPAProc(); END; Query: DataReadQuery()
Heres is the code to call procedures that take no parameterscreate or replace procedure testJPAProc is begin dbms_output.put_line('testJPAProc called'); end;
You guys can tell me where I'm wrong if I do something wrong. Why make these mistakes? because as far as I can tell the code (java and pl/sql) are both correct unless there is something I missed. It's kinda funny because I have another stored procedure I can call successfully.StoredProcedureCall call = new StoredProcedureCall(); ValueReadQuery query = new ValueReadQuery(); call.setProcedureName("testJPAProc"); query.setCall(call); session.executeQuery(query);
Thank youThe first question is that the Boolean in Oracle is not a supported JDBC type, but a PLSQL type.
Change to an INTEGER is probably the best, you can also use the PLSQLStoredProcedureCall class to access.The second problem is perhaps that the stored procedure is not valid, make sure that it compiled correctly. It can also be the type of your query, you must use a DataModifyQuery, not a read request that it returns nothing.
If still no luck, try to call directly through JDBC, it works?---
James: http://www.eclipselink.org: http://en.wikibooks.org/wiki/Java_Persistence -
Hello
It's my first day at procedures SQL, my apologies if this question is stupid
I wrote this procedure which compiles ok:
When I try to call this procedure in the script below, it does not work. I can't call a procedure since the BEGIN clause or is my syntax incorrect? Can you explain or explain the error message I'm getting >(PLS-00103: Encountered the symbol "ADDLOCATION" when expecting one of the following::=.) ( @ % ; The symbol ': = ' was replaced by 'ADDLOCATION' continue.)CREATE PROCEDURE ADDLOCATION (lid IN locations.location_id%TYPE, ldes IN locations.description%TYPE)AS BEGIN INSERT INTO LOCATIONS (location_id,description) VALUES (lid,ldes); END ADDLOCATION; /
Thanks a mil :)DECLARE highestlid locations.location_id%TYPE; BEGIN SELECT max(location_id) INTO highestlid FROM locations; highestlid:=highestlid+1; CALL ADDLOCATION(highestlid,'Lucan'); END; /
DECLARE highestlid locations.location_id%TYPE; BEGIN SELECT max(location_id) INTO highestlid FROM locations; highestlid:=highestlid+1; ADDLOCATION(highestlid,'Lucan'); END; /
-
Hello
I am trying to call a procedure in a different package and I get the following error:
ORA-06508: PL/SQL: called program unit is not found
I executed the following command to see if the procedure that I'm calling is INVALID:
SELECT object_name, object_type, created, last_ddl_time, status from user_objects where status! = 'VALID ';
I don't see my invalid procedure. Any other reason why my procedure is unable to find the other package procedure.
My code is as follows:
CREATE or REPLACE PACKAGE BODY DEV2.email_p as
PROCEDURE to send)
pSender VARCHAR2,
precipients VARCHAR2,
CCP VARCHAR2,
-pbcc VARCHAR2,
psubject VARCHAR2,
pMessage VARCHAR2,
pnumattach NUMBER,
pnoteid NUMBER)
IS
p_blob BLOB;
p_filename VARCHAR2 (200);
p_filetype VARCHAR2 (200);
p_noteid NUMBER;
p_date VARCHAR2 (200);
p_currSeq NUMBER;
NUMBER of p_currSeq2;
utl_smtp conn. CONNECTION;
I have SEVERAL;
j NUMBER;
Len NUMBER;
Temp NUMBER;
p_bcc VARCHAR2 (500);
BEGIN
IF pnumattach > = 1
THEN
-THIS IS WHERE I GET THE ERROR MESSAGE. MY PROCEDURE IS UNABLE to CALL SEND_EMAIL_HELPER.begin_mail
Conn: = SEND_EMAIL_HELPER.begin_mail)
sender = > psender,.
recipients = > precipients,
subject = > psubject,
mime_type = > send_email_helper. MULTIPART_MIME_TYPE);
() SEND_EMAIL_HELPER.attach_text
Conn = > conn,.
data = > pmessage,.
mime_type = > ' text/html');
j: = 1;
Temp: = pnumattach;
p_currSeq2: = 0;
Blob_data SELECT ON accessory FROM p_blob WHERE attachment_pk = 685;
SELECT file_name ON accessory FROM p_filename WHERE attachment_pk = 685;
Mime_type SELECT ON accessory FROM p_filetype WHERE attachment_pk = 685;
() SEND_EMAIL_HELPER.begin_attachment
Conn = > conn,.
mime_type = > p_filetype,
Online = > TRUE,
filename = > p_filename,.
transfer_enc = > 'base64');
i: = 1;
Len: = DBMS_LOB.getLength (p_blob);
WHILE (I < len)
LOOP
IF (i + SEND_EMAIL_HELPER. MAX_BASE64_LINE_WIDTH < len) THEN
UTL_SMTP. Write_Raw_Data (conn,
UTL_ENCODE. Base64_Encode)
DBMS_LOB. SUBSTR (p_blob, SEND_EMAIL_HELPER. MAX_BASE64_LINE_WIDTH, i)));
ON THE OTHER
UTL_SMTP. Write_Raw_Data (conn,
UTL_ENCODE. Base64_Encode)
DBMS_LOB. SUBSTR(p_blob,_(Len-i) + 1, i)));
END IF;
UTL_SMTP. Write_data (conn, UTL_TCP. CRLF);
i: = i + SEND_EMAIL_HELPER. MAX_BASE64_LINE_WIDTH;
SEND_EMAIL_HELPER.end_attachment (conn = > conn);
END LOOP;
SEND_EMAIL_HELPER.end_mail (conn = > conn);
ON THE OTHER
BEGIN
p_bcc: = NULL;
UTL_MAIL. Send (psender, precipients, CCP, ", psubject, pmessage);
EXCEPTION
WHILE OTHERS THEN
Insert in sampletable (empname) values ("is there a problem");
END;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
INSERT into sampleTable (empname) values (p_currSeq2);
ns.returnError ('EMAIL_P.send - 001', substr(sqlerrm,1,500));
WHILE OTHERS THEN
INSERT into sampleTable (empname) values ("another error");
ns.returnError ('EMAIL_P.send - 002', substr(sqlerrm,1,500));
END send;Looks like you're fails on the connection to the smtp server. It is not the call to begin_mail which is a failure, but the call of utl_smtp.open_connection which is probably called by the begin_session function that calls the begin_mail function.
If begin_session in your package is defined as follows:
FUNCTION begin_session RETURN utl_smtp.connection IS conn utl_smtp.connection; BEGIN -- open SMTP connection conn := utl_smtp.open_connection(smtp_host, smtp_port); utl_smtp.helo(conn, smtp_domain); RETURN conn; END;
What is the value of the smtp_domain variable?
In the DEMO_MAIL package that it is declared in the package spec, so I'm expecting something similar is declared in your spec package as well. If this value is null, you must set first before opening your connection:
SEND_EMAIL_HELPER.smgp_domain := 'yourdomain.dom';
-
I am in the page web http://www.songarea.com/ and after searching a piece of music, I get the following error message:
"Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13.
I did this several times before without a problem, but have recently updated Firefox with the Skype add-on and wonder if the two things are related.URL of affected sites
Hi John,.
It is an error message from the web server providing this site. Specifically, it is something wrong with their PHP code.
It is not browser specific and would go into another browser besides Firefox.
You will need to contact the webmaster of this site to report this problem. A quick test does not show this problem, but you do not specify what search query, you tried:
-
Fatal error: Call to a member function find() on a non-object in www/index.php on line 27 /app/,.
I get this message when I try to open a Web page, is there an easy solution?
Hello
1 - is the question confined with any particular Web site?
2. what web browser do you use?
3. don't you make changes to the computer until the problem occurred?
I suggest you to try the steps below and check if it helps.
Method 1: Try the steps from the link below.
Can't access some Web sites in Internet Explorer: http://support.Microsoft.com/kb/967897
Important: Reset Internet Explorer to its default configuration. This step will disable also any add-ons, plug-ins or toolbars that are installed. Although this solution is fast, it also means that, if you want to use one of these modules in the future, they must be reinstalled.
Method 2: How to troubleshoot script errors
in Internet Explorer on Windows computers: http://support.microsoft.com/kb/308260
Hope this information is useful.
Maybe you are looking for
-
I can type in the full web addresses, keywords, click on the drop sites, but no matter what, nothing to do with happen when I hit "enter". I read an article that said to type in everything: config in the address bar to access some options, but when I
-
Some Web sites lock up Firefox and Chrome, but not in Explorer
When I search Google News "Edward Snowden", some clicking on some sites Web crashes Firefox, requiring a re-initialization (Windows 7). Here is a site that caused a complete blocking: http://www.Google.com/URL?SA=t & rct = j & q = esrc s = & source =
-
Need drivers for Windows XP Home edition on the Russian language for Satellite M35x-s149
Help, please. Can not find the drivers for windows XP SP3 or SP2 on the Russian language for TOSHIBA Satellite M35X-S149.
-
Accidentally formatted partition 0 disk 4 BOOTCAMP Windows 8.1
Yesterday I bought Windows 8.1 and began installing Bootcamp. I got through all the steps and got to the page collection of information on the windows OS. I filled everything, product key and all. Then I got to the page of partitions, I chose 0 4 Par
-
Satellite L300D-11V - DVD player does not work
Hello I am a Satellite L300D-11V and the driver on the CD does not work. I think is not the right driver and an update of Windows could have messed up.Anyone know where I can download the correct driver for the DVD player for Vista? Or solve this pro