Wrong number of arguments in method
i have made on jar file in which i have one method let say String c(String a, String b,String c).
i am calling this method in my jsp like
String num = c(String a, String b, String c)
but giving error
500 internal server error
Wrong number of arguments in method.
thanks
I assume you have this in a Java snippet and the method is defined within the JSP. Ok, then you should call as follows:
String num = c(a,b,c);
When you call a method, you don't include the Types in the call-- that's only when you define the method.
Hope this helps.
Similar Messages
-
Error: Wrong number of arguments in method
Hi all,
I keep getting the above mentioned error when compiling simple JSPs with
only a few lines of codes. Here are the log dump.
Mon Aug 07 20:02:30 GMT+08:00 2000:<I> <ServletContext-General> file: init
Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
resource 'language.html' in document root 'C:\weblogic\myserver\public_html'
Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
resource 'top.html' in document root 'C:\weblogic\myserver\public_html'
Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
resource 'language.html' in document root 'C:\weblogic\myserver\public_html'
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: init
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
verbose initialized to: true
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
packagePrefix initialized to: jsp
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
compileCommand initialized to: C:/jdk1.2.2/bin/javac.exe
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
srcCompiler initialized to weblogic.jspc
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
superclass initialized to null
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
workingDir initialized to: C:\weblogic\myserver\classfiles
Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
pageCheckSeconds initialized to: 1
Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> *.jsp:
initialization complete
Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> Generated
java file: C:\weblogic\myserver\classfiles\jsp\helloworld.java
Mon Aug 07 20:02:59 GMT+08:00 2000:<E> <ServletContext-General> Compilation
of C:\weblogic\myserver\classfiles\jsp\helloworld.java failed:
C:\weblogic\myserver\classfiles\jsp\helloworld.java:54: Wrong number of
arguments in method.
if (sci.isResourceStale("/helloworld.jsp", 933320916000L, "5.1.0
Service Pack 4 06/29/2000 18:18:23 #74560")) return true;
^
C:\weblogic\myserver\classfiles\jsp\helloworld.java:55: Wrong number of
arguments in method.
if (sci.isResourceStale("/dukebanner.html", 933321078000L, "5.1.0
Service Pack 4 06/29/2000 18:18:23 #74560")) return true;
^
2 errors
java.io.IOException: Compiler failed
executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath,
c:\weblogic\lib\weblogic510sp4boot.jar;c:\weblogic\myserver\User.jar;c:\webl
ogic\myserver\Person.jar;c:\weblogic\myserver\TradingAccount.jar;c:\weblogic
\myserver\uniquesequence.jar;c:\weblogic\myserver\stockbroker.jar;;C:\jdk1.2
.2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\w
eblogic\eval\cloudscape\lib\cloudscape.jar;c:\weblogic\lib\weblogic510sp4.ja
r;c:\weblogic\license;c:\weblogic\classes;c:\weblogic\myserver\serverclasses
;c:\weblogic\lib\weblogicaux.jar;C:\weblogic\myserver\tmp_deployments\ejbjar
-10126.jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\weblogic\myserv
er\tmp_deployments\ejbjar-10125.jar;C:\weblogic\myserver\tmp_deployments\ejb
jar-10124.jar;C:\weblogic\myserver\tmp_deployments\ejbjar-10123.jar;C:\weblo
gic\myserver\tmp_deployments\ejbjar-10122.jar;C:\weblogic\myserver\tmp_deplo
yments\ejbjar-10121.jar;C:\weblogic\myserver\servletclasses;C:\weblogic\myse
rver\classfiles, -d, C:\weblogic\myserver\classfiles,
C:\weblogic\myserver\classfiles\jsp\helloworld.java])
at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
a, Compiled Code)
at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
7)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:118)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:744)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:692)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
Mon Aug 07 20:02:59 GMT+08:00 2000:<E> <ServletContext-General> Servlet
failed with Exception
java.io.IOException: Compiler failed
executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath,
c:\weblogic\lib\weblogic510sp4boot.jar;c:\weblogic\myserver\User.jar;c:\webl
ogic\myserver\Person.jar;c:\weblogic\myserver\TradingAccount.jar;c:\weblogic
\myserver\uniquesequence.jar;c:\weblogic\myserver\stockbroker.jar;;C:\jdk1.2
.2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\w
eblogic\eval\cloudscape\lib\cloudscape.jar;c:\weblogic\lib\weblogic510sp4.ja
r;c:\weblogic\license;c:\weblogic\classes;c:\weblogic\myserver\serverclasses
;c:\weblogic\lib\weblogicaux.jar;C:\weblogic\myserver\tmp_deployments\ejbjar
-10126.jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\weblogic\myserv
er\tmp_deployments\ejbjar-10125.jar;C:\weblogic\myserver\tmp_deployments\ejb
jar-10124.jar;C:\weblogic\myserver\tmp_deployments\ejbjar-10123.jar;C:\weblo
gic\myserver\tmp_deployments\ejbjar-10122.jar;C:\weblogic\myserver\tmp_deplo
yments\ejbjar-10121.jar;C:\weblogic\myserver\servletclasses;C:\weblogic\myse
rver\classfiles, -d, C:\weblogic\myserver\classfiles,
C:\weblogic\myserver\classfiles\jsp\helloworld.java])
at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
a, Compiled Code)
at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
7)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:118)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:744)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:692)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
I believe that it has got something to do with the configuration of the
server and not the code in the JSPs. Have anyone encountered this error
before? Pls advice thanx!
Cheers,
kianhui
double d[] = new double[300];
getMax(d);Pass the array, not an element in the array. -
Getting Wrong number of Arguments as response
Hi,
I am just trying run one Process Rtask for RACF called "AdduserToDataSet" which gives a response called Wrong number of Arguments:
I checked for both Process Task mapping variables and Adapter Varibles and looks like both are same. Not sure what could be the issue?
2011-05-27 06:04:30,281 INFO (http-0.0.0.0-8080-7) [STDOUT] Target Class = com.identityforge.oracle.integration.IdfUserOperations
*2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] java.lang.IllegalArgumentException: wrong number of arguments*
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpADDUSERTODATASET.ADDUSERTODATASETTASK(adpADDUSERTODATASET.java:109)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpADDUSERTODATASET.implementation(adpADDUSERTODATASET.java:58)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
2011-05-27 06:04:30Can you enable the debug logging level for the connector and retry and then post the output?
Thanks,
Kevin -
Procedure - Execute - Wrong Number of Arguments...
Hi All,
I am using the following block for executing procedure.
But iam getting OUT parameter error.
Error
ORA:06550: line4,column9:
PLS:00306: wrong number or arguments in call to PROCSS_PROC
ORA:06550: line 4,column9
PL/SQL: statement ignored
DECLARE
l_status NUMBER(1);
BEGIN
SCHEMA_NAME.PKG_NAME.PROCSS_PROC
( 3, --> Days to be purged
T_TYPE('TABLE_1','TABLE_2','TABLE_3'),
l_status
DBMS_OUTPUT.PUT_LINE('l_status - '|| l_status);
END;
Main Package procedure
CREATE OR REPLACE PACKAGE pkg_name
AS
TYPE T_TYPE IS TABLE OF VARCHAR2 (4000);
PROCEDURE PROCSS_PROC
p_freq IN NUMBER,
p_multi_tab IN T_TYPE,
p_res OUT NUMBER
END pkg_name; --End of Package
CREATE OR REPLACE PACKAGE BODY pkg_name
AS
PROCEDURE PROCSS_PROC (
p_freq IN NUMBER,
p_multi_tab IN T_TYPE,
p_res OUT NUMBER )
IS
BEGIN
--Setting the local variable to check whether the procedure executed successfully or not.
--If it returns '0'; then all the process haven't got successfully completed
--If it returns '1'; then all process got success
p_res := 0;
p_res := 1; --If it returns '1'; then all process got success
END PROCSS_PROC; --End of the Procedure
END pkg_name; --End of the Package
/Please help....
Thanks..
Edited by: Linus on Oct 4, 2010 6:07 AMType is declared in the package, therefore to reference it outside the package you must qualify it with package name:
DECLARE
l_status NUMBER(1);
BEGIN
SCHEMA_NAME.PKG_NAME.PROCSS_PROC
( 3, --> Days to be purged
pkg_name.T_TYPE('TABLE_1','TABLE_2','TABLE_3'),
l_status
DBMS_OUTPUT.PUT_LINE('l_status - '|| l_status);
END;
/SY. -
Error message: 450 [Wrong number of arguments or invalid property assignment]
Hello Support,
I have a vbscript which does some database query. i see from the log that script quits with the below error.
Error message: 450 [Wrong number of arguments or invalid property assignment]
but when i execute the same query directly on database, it gives me correct result. also i see that not all the time script quits with this error.
Does anyone have idea how to troubleshoot it?
-KAKA-i see. i know at which line it fails as error handling is done and will be written in the log.
sQuery_Prod = "select object_text from sto_ov_externalnode where name = '" & NodeId & "'"
oRecordSet_Prod.Open sQuery_Prod, oConnection, adOpenStatic, adLockOptimistic
if err.number <> 0 then
LogWrite ("Unable to run query")
LogWrite ("Query: [" & sQuery_Prod & "]")
LogWrite ("Connection string: [" & sConnect & "]")
LogWrite ("Error message: " & err.number & " [" & err.description & "]")
wscript.quit(1)
end if
and this piece of code write following in the log.
07.10.2014 16:55:03:Unable to run query
07.10.2014 16:55:03:Query: [select object_text from sto_ov_externalnode where name = '{B10255CF-F618-45FB-99BC-31A57D747702}']
07.10.2014 16:55:03:Connection string: [DSN=Script;DRIVER={SQL Native Client};User ID=xxxxxx;Password=yyyyyy]
07.10.2014 16:55:03:Error message: 450 [Wrong number of arguments or invalid property assignment]
Where as i can run query "select object_text from sto_ov_externalnode where name = '{B10255CF-F618-45FB-99BC-31A57D747702}'" successfully directly on database.
also in the next cycle same query will be successfull within script too.
Does this help in understanding the problem?
-KAKA- -
Wrong number of arguments in call to .....
Hi All, <br><br> .. I donno what mistake iam performing here.. <br>
<br><br> There are 141 columns in my procedure .... I have checked and compared each and every parameter datatype with the ones iam setting foor callablestmt and everything is correct ..... but still iam getting error .. Wrong number of arguments call...I am just giving dummy values..
<br><br>
int x=0; <br>String s=null;
for Number Type parameter --- >cstmt.setInt(1,x)<br>
for Varchar2 Parameter --->cstmt.setString(2,s) <br>
for Date Parameter --->cstmt.setDate(1,null)<br>
for inout Parameter --> just setting the string and not giving any registeroutparamter<br>
for out parameters (iam giving 3 types)<br>
-->cstmt.registerOutParameter(139,OracleTypes.VARCHAR);<br>
<br>cstmt.registerOutParameter(134,OracleTypes.DATE);<br> cstmt.registerOutParameter(131,OracleTypes.NUMERIC,0,10);<br>
<br>
Iam passing 141 columns in sqlstatement with bind params including out params..<br>
am I doing this correctly ?<br>When i searched one thread .. on person said that he removed assignments for out paramter annd no need to set for outparmas. <br>I tried that also .. but then it is giving "bind varaibled does not exist"..I donno where ian doing the mistake ... can u please help me?
<br><br>
Thanks<br>
SoujanyaSoujanya,
Another thing to consider here is that because you are calling a procedure with such a large number of params and most of them might be defaulted/not set, it would be a better practice to call a wrapper procedure where you can add extra validation on input params before calling the actual procedure and send the required params from OAF as a single record.
--Shiv -
Status for listener has wrong number of arguments
I'm runing the OEM and trying to click on the "Listner Status" button on the right side of the screen when showing the listeners. It returns an error message "NL-00857 wrong number (0-1 needed) of arguments tot status"
where do I see these arguments?
thnx
EndreOK, I have made some progress on this. Try opening the file you created in Pages '08 in Preview and saving under a new name. This is what my friend did and it worked. Here is what he said in his email to me:
+"I opened your file on my MacBook Pro with Preview and then saved again under new name. I could open the file I saved in widows fine but the original file you sent would not open. "+
Unfortunately, it did not work when I retraced his steps on my Mac. However, it is worth a try, and if it doesn't work on your own Mac, try another one you own or see if it will work on a friend's Mac. -
Error for wrong number of arguments
Hi
I am getting the below error for plsql
IF (l_src_cd ='P' or l_src_cd = 'E') THEN
ERROR at line 243:
ORA-06550: line 243, column 22:
PLS-00306: wrong number or types of arguments in call to '='
ORA-06550: line 243, column 9:
PL/SQL: Statement ignored
while writing
IF (l_src ='P' or l_src= 'E') THEN
l_activity := 'ERS';
elsif (length(l_adj_cd) > 0) THEN
l_activity := 'KAM';
elsif (length(l_offer_cd) > 0 ) THEN
l_activity := 'RAM';
elsif (length(l_visit_nbr) > 0 ) THEN
l_activity := 'SAM';
ELSE l_activity :='UNK';
END IF;
wrong number or type of argument
Appreciate your help on the above?
Thanks & RegardsWhat is the data type of l_src?
SQL> declare
2 type t_tp is table of varchar2(10) index by binary_integer;
3 l_v t_tp;
4 begin
5 l_v(1) := 'A';
6 l_v(2) := 'B';
7 if l_v = 'A' or l_v = 'B' then
8 dbms_output.put_line('True');
9 else
10 dbms_output.put_line('False');
11 end if;
12* end;
SQL> /
if l_v = 'A' or l_v = 'B' then
ERROR at line 7:
ORA-06550: line 7, column 11:
PLS-00306: wrong number or types of arguments in call to '='
ORA-06550: line 7, column 4:
PL/SQL: Statement ignoredJohn -
Hi,
We currently run Crystal Reports v10 with ODBC (CR Oracle ODBC Driver 4.20) to Oracle 9i database (on solaris) and have some reports which gets data (ref cursors) from stored procedures. So far so good and now we are upgrading our oracle database to 10g on Linux server and during my testing these reports give the following error.
Error Description:
Failed to open rowset
Query Engine Error: HY000:[DataDirect][ODBC Oracle driver]ORA-06550:line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'MY_STORED_PROCEDURE'
ORA-06550: line1, column 35:
PLS-00363: expression 'MY_PARAM_VALUE' cannot be used as an assignment target
ORA-6550: lin1, column8:
PL/SQL: Stateme'
Any help would be greatly appreciated.
Thanks,
-Venkat GopalanDiscovered on another post that 4.2 is too old. You need to upgrade to a more current ODBC driver that runs on Solaris.
We have a newer one version 5.3 but it's only for windows. Go to Datadirect.com and see if they have one for that OS.
Otherwise you'll have to configure your reports to use the native Oracle driver.
Thank you
Don -
Process is not accessible and wrong number of arguments
New to SQL and created the following code. Not sure what is wrong...trying to call a procedure/package. Sometimes it tells me the '.' between the package name is invalid.
Thanks
Please reply [email protected]
CREATE OR REPLACE FUNCTION f_call_acct_trans_pkg
(p_calling_job VARCHAR2,
p_location VARCHAR2,
p_pgm_cd VARCHAR2,
p_bank_code VARCHAR2,
p_source_cd VARCHAR2,
p_detail_cd VARCHAR2,
p_transaction_date DATE,
p_activity_date DATE,
p_term_cd VARCHAR2,
p_in_account_str VARCHAR2)
RETURN VARCHAR2
AS
BEGIN
DECLARE
p_out_call_status VARCHAR2(30);
p_out_account_str VARCHAR2(30);
v2_acct_unit VARCHAR2(30):= p_out_account_str;
DZ_GL_ACCT.DZ_GL_ACCT_TRANSLATE
(p_calling_job,
p_location,
p_pgm_cd,
p_bank_code,
p_source_cd,
p_detail_cd,
p_transaction_date,
p_activity_date,
p_term_cd,
p_in_account_str);
RETURN v2_acct_unit;
END;CREATE OR REPLACE FUNCTION f_call_acct_trans_pkg
(p_calling_job VARCHAR2,
p_location VARCHAR2,
p_pgm_cd VARCHAR2,
p_bank_code VARCHAR2,
p_source_cd VARCHAR2,
p_detail_cd VARCHAR2,
p_transaction_date DATE,
p_activity_date DATE,
p_term_cd VARCHAR2,
p_in_account_str VARCHAR2)
RETURN VARCHAR2
AS
p_out_call_status VARCHAR2(30);
p_out_account_str VARCHAR2(30);
v2_acct_unit VARCHAR2(30):= p_out_account_str;
BEGIN
DZ_GL_ACCT.DZ_GL_ACCT_TRANSLATE
(p_calling_job,
p_location,
p_pgm_cd,
p_bank_code,
p_source_cd,
p_detail_cd,
p_transaction_date,
p_activity_date,
p_term_cd,
p_in_account_str);
RETURN v2_acct_unit;
END;Max
http://oracleitalia.wordpress.com -
Ora-06550,pls-00306 wrong number of arguments in call to ||
declare
type t_empid is table of empn.empid%type;
type t_ename is table of empn.ename%type;
v_empid t_empid;
v_ename t_ename;
cursor c1 is select empid,ename from empn;
begin
open c1;
fetch c1 bulk collect into v_empid,v_ename;
dbms_output.put_line(v_empid||v_ename);
--end loop;
close c1;
end;If you do want to benchmark bulk processing versus normal processing - you need to ensure that the tests are identical each time around, except for the part that you want to benchmark.
So if you're going to benchmark cursor fetching, that becomes a complex problem. How do you ensure that both tests use the same type of I/O? Logical I/O is faster than physical I/O. Flushing the db buffer cache to force physical I/O, does not flush the operating system's file system buffers. And despite Oracle viewing the I/O as physical I/O, it can be logical I/O from the o/s side.
So cursor fetching is a complex thing to benchmark accurately. And why benchmark that? Bulk processing is about context switching. It is not about cursor fetching or making SQL cursors faster.
So to simply benchmark context switching, we need to eliminate other factors - such as I/O. The following example uses an empty table (no I/O will result) and attempt to only look at the performance of context switching between the PL/SQL engine and SQL engine.
SQL> --// the test table - which we keep empty to eliminate any I/O
SQL> create table footab( id number );
Table created.
SQL> --// the collection data type the test will be using
SQL> create or replace type TNumbers is table of number;
2 /
Type created.
SQL> --// the test: bulk processing and then "normal" processing
SQL> declare
2 numArray TNumbers;
3 t1 number;
4 begin
5 numArray := new TNumbers();
6 numArray.Extend(10000);
7 for i in 1..numArray.Count
8 loop
9 numArray(i) := i;
10 end loop;
11
12 t1 := dbms_utility.get_cpu_time;
13 forall i in 1..numArray.Count
14 delete from footab where id = numArray(i);
15 t1 := (dbms_utility.get_cpu_time - t1)/100;
16 dbms_output.put_line( 'forall='||t1||' sec(s)' );
17
18 t1 := dbms_utility.get_cpu_time;
19 for i in 1..numArray.Count
20 loop
21 delete from footab where id = numArray(i);
22 end loop;
23 t1 := (dbms_utility.get_cpu_time - t1)/100;
24 dbms_output.put_line( 'for='||t1||' sec(s)' );
25 end;
26 /
forall=.06 sec(s)
for=.26 sec(s)
PL/SQL procedure successfully completed.
SQL> So, from this test, one can see that a reduction of context switches improve performance. Nothing more.
The actual benefit in real life processing depends on a number of factors. And many of these will be unique at run-time. So one can say that reducing context switching is better. How much better will be pure speculation as test results like these cannot be applied via a formula of sorts to determine production performance. -
1136: Wrong Number of Arguments
Hi,
I'm a flash beginner and I wanted to do a "Space Invaders" like game. Now I get an error, wehn I try to call a function in an other function.is that not allowed? I want that the Bullet shoots directly when I click. but when I hold the left mouse button pressed, the mode should be auto shoot and bullets should shoot out with a timer of 100. I got sucsess by writing both in the start shoot timer, like this:
public function startShootTimer (e:MouseEvent):void {
ShootTimer.start();
var bullet:Bullet = new Bullet();
bullet.x = bazooka.x + 70;
bullet.y = bazooka.y - 3;
addChild(bullet);
Bullets.push(bullet);
But it would be better (for future projects) to have 2 functions, or not ? Is that possible ? Very thank you for your help ! Here's my full not working program:
package {
import flash.display.*;
import flash.events.Event;
import flash.utils.Timer;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
public class Main extends MovieClip {
var bazooka:Bazooka = new Bazooka();
var Bullets:Array = new Array();
var ShootTimer:Timer = new Timer(500);
public function Main() {
startGame();
public function startGame() {
addPlayer();
stage.addEventListener(Event.ENTER_FRAME, mainLoop);
ShootTimer.addEventListener(TimerEvent.TIMER, autoShootBullet);
stage.addEventListener(MouseEvent.MOUSE_DOWN, startShootTimer);
stage.addEventListener(MouseEvent.MOUSE_DOWN, shootBullet);
stage.addEventListener(MouseEvent.MOUSE_UP, stopShootTimer);
public function addPlayer():void {
bazooka.x = 0;
bazooka.y = stage.stageHeight * .5;
addChild(bazooka);
public function shootBullet(e:MouseEvent):void {
var bullet:Bullet = new Bullet();
bullet.x = bazooka.x + 70;
bullet.y = bazooka.y - 3;
addChild(bullet);
Bullets.push(bullet);
public function startShootTimer (e:MouseEvent):void {
ShootTimer.start();
public function stopShootTimer (e:MouseEvent):void {
ShootTimer.stop();
public function autoShootBullet (e:TimerEvent):void {
shootBullet(); // Heres my error
public function mainLoop (e:Event):void {
for (var b:int = 0; b < Bullets.length; b++) {
Bullets[b].x += 20;that's allowed.
but your shootBullet function expects a mouse event to be passed as a parameter. there are two quick and easy ways to resolve:
1. use shootBullet(null)
2. change your shootBullet function to:
public function shootBullet(e:MouseEvent=null):void {
var bullet:Bullet = new Bullet();
bullet.x = bazooka.x + 70;
bullet.y = bazooka.y - 3;
addChild(bullet);
Bullets.push(bullet); -
Wrong number of arguments for a setcolor operator
Does anyone know what the above message means? I saved a pages document as a .pdf file and when the person I emailed it to tried to open it he got the above message.
He has been able to open previous files I have sent.OK, I have made some progress on this. Try opening the file you created in Pages '08 in Preview and saving under a new name. This is what my friend did and it worked. Here is what he said in his email to me:
+"I opened your file on my MacBook Pro with Preview and then saved again under new name. I could open the file I saved in widows fine but the original file you sent would not open. "+
Unfortunately, it did not work when I retraced his steps on my Mac. However, it is worth a try, and if it doesn't work on your own Mac, try another one you own or see if it will work on a friend's Mac. -
Wrong number of arguments in constructor
constructor define as follows,
public class Fig {
public void Fig(int x, int y, int width, int height, Color line_color, Color fill_color, int nHands)
i invoke this constructor as follows,
Fig curFig = new Fig(20,20,20,20,Color.blue,Color.red,6);
then emergy this error ,why?
thanks.public void Fig(int x, int y, int width, int height,
Color line_color, Color fill_color, int nHands)mmm, it would seem that that is not a constructor.
remove the "void" and it will work as expected; probably. -
Wron number of arguments error on URLEncoder.encode(language,
the following is the code which is an example in The complete Reference JSP
I ran this in tomcat
it shows an error which is showed down this code.The place where error occuring is underlined in the code
<%@ page session="false"
import="java.io.*,
java.net.*,
java.util.*" %>
<html>
<head>
<title>Using Cookies to Store Preferences</title>
<style><%= STYLESHEET %></style>
</head>
<body>
<table border="0" cellspacing="3" width="500">
<%-- Company logo --%>
<tr><td>
<img src="images/lyric_note.png">
</td></tr>
<%-- Language preference bar --%>
<tr><td class="LB">
<%= getLanguageBar(request) %>
</td></tr>
</table>
<%-- Localized greeting --%>
<h1><%= getGreeting(request) %></h1>
<%-- Store language preference in a persistent cookie --%>
<% storeLanguagePreferenceCookie(request, response); %>
</body>
</html>
<%!
// ===========================================
// Helper methods included here for
// clarity. A better choice would be
// to put them in beans or a servlet.
// ===========================================
* The CSS stylesheet
private static final String STYLESHEET =
"h1 { font-size: 130%; }\n"
+ ".LB {\n"
+ " background-color: #005A9C;\n"
+ " color: #FFFFFF;\n"
+ " font-size: 90%;\n"
+ " font-weight: bold;\n"
+ " padding: 0.5em;\n"
+ " text-align: right;\n"
+ " word-spacing: 1em;\n"
+ "}\n"
+ ".LB a:link, .LB a:active, .LB a:visited {\n"
+ " text-decoration: none;\n"
+ " color: #FFFFFF;\n"
+ "}\n";
* Creates the language preference bar
private String getLanguageBar
(HttpServletRequest request)
throws IOException
String thisURL = request.getRequestURL().toString();
StringBuffer sb = new StringBuffer();
appendLink(sb, thisURL, Locale.ENGLISH);
appendLink(sb, thisURL, Locale.GERMAN);
appendLink(sb, thisURL, Locale.FRENCH);
appendLink(sb, thisURL, Locale.ITALIAN);
String languageBar = sb.toString();
return languageBar;
* Helper method to create hyperlinks
private void appendLink
(StringBuffer sb, String thisURL, Locale locale)
throws UnsupportedEncodingException
if (sb.length() > 0)
sb.append(" ");
String language = locale.getLanguage();
sb.append("<a href=\"");
sb.append(thisURL);
sb.append("?language=");
sb.append(URLEncoder.encode(language, "UTF-8")); sb.append("\">");
sb.append(locale.getDisplayName(locale));
sb.append("</a>\n");
* Gets the greeting message appropriate for
* this locale
private String getGreeting
(HttpServletRequest request)
Locale locale = getLocaleFromCookie(request);
ResourceBundle RB = ResourceBundle.getBundle
("com.jspcr.sessions.welcome", locale);
String greeting = RB.getString("greeting");
return greeting;
* Determines the locale to use, in the following
* order of preference:
* 1. Language parameter passed with request
* 2. Language cookie previously stored
* 3. Default locale for client
* 4. Default locale for server
private Locale getLocaleFromCookie
(HttpServletRequest request)
Locale locale = null;
String language = request.getParameter("language");
if (language != null)
locale = new Locale(language);
else {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies;
String name = cookie.getName();
if (name.equals("language")) {
language = cookie.getValue();
locale = new Locale(language);
break;
if (locale == null)
locale = request.getLocale();
return locale;
* Stores the language preference
* in a persistent cookie
private void storeLanguagePreferenceCookie
(HttpServletRequest request, HttpServletResponse response)
Locale locale = getLocaleFromCookie(request);
String name = "language";
String value = locale.getLanguage();
Cookie cookie = new Cookie(name, value);
final int ONE_YEAR = 60 * 60 * 24 * 365;
cookie.setMaxAge(ONE_YEAR);
response.addCookie(cookie);
%>
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occured between lines: 45 and 173 in the jsp file: /chap08/examples/cookies/CookieBasedWelcome.jsp
Generated servlet error:
C:\tomcat\jakarta-tomcat-4.0\work\localhost\_\chap08\examples\cookies\CookieBasedWelcome$jsp.java:75: Wrong number of arguments in method.
sb.append(URLEncoder.encode(language, "UTF-8"));
^
An error occured between lines: 45 and 173 in the jsp file: /chap08/examples/cookies/CookieBasedWelcome.jsp
Generated servlet error:
C:\tomcat\jakarta-tomcat-4.0\work\localhost\_\chap08\examples\cookies\CookieBasedWelcome$jsp.java:110: Wrong number of arguments in constructor.
locale = new Locale(language);
^
An error occured between lines: 45 and 173 in the jsp file: /chap08/examples/cookies/CookieBasedWelcome.jsp
Generated servlet error:
C:\tomcat\jakarta-tomcat-4.0\work\localhost\_\chap08\examples\cookies\CookieBasedWelcome$jsp.java:119: Wrong number of arguments in constructor.
locale = new Locale(language);
^
3 errors
But i have even checked the syntax of encode at which is exactly matching
http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLEncoder.html
Kindly let me know what is the reason.......Check the Java API for this:
There is a specific note for the method, which reads as follows:
Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites.
It's always better to look in API docs.
Annie.
Maybe you are looking for
-
Problem in creation of transfer order
Hi gurus, I am facing a problem while craeting a TO for multiple processing deliveries. can anyone let me correct the process what i am following Intially i am creating a group withh group of deliveries through VL06P with grou[ type has :K" (Picking)
-
How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order??
-
Dual boot Arch and Windows XP (arch installed first) [solved]
I recently moved over to arch from Ubuntu, and would like to install Windows XP so that I can dual-boot between the two. However, my arch install created four partitions on my disk, and I can not create another one. I would rather not have to reinsta
-
I updated my software, now my email will not update, how do I fix this?
I cannot get emails on my iphone 4 after I updated the software to the latest one. I tried to re-enter my passwords but that did not work, still get no email. HELP
-
Hi, There is a big bug in the CS6 , tiff file format have change, and when i generate a tiff file ( flaterned image with alpha layer) in photoshop CS6 or after effect CS6, the alpha layer can not be used in indesign CS5, i need to open my tiff in pho