ora 29531 Why? [message #536531] |
Wed, 21 December 2011 06:25 |
iblazquez
Messages: 26 Registered: June 2007
|
Junior Member |
|
|
I've this java source
create or replace and compile java source named "Decodificador" as
public class Decodificador {
public static String decodifica(String codigo){
return codigo;
]
}
and this function
create or replace function F_Decodificador(codigo varchar2) RETURN VARCHAR2 IS
LANGUAGE java NAME 'Decodificador.decodifica(String) return String';
when I execute the function the result is:
ORA-29531: no method decodifica in class Decodificador
I don't know why. can anybody explain it to me
|
|
|
Re: ora 29531 Why? [message #536532 is a reply to message #536531] |
Wed, 21 December 2011 06:27 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
mkr02@ORA11GMK> !oerr ora 29531
29531, 00000, "no method %s in class %s"
// *Cause: An attempt was made to execute a non-existent method in a
// Java class.
// *Action: Adjust the call or create the specified method.
|
|
|
|
|
|
Re: ora 29531 Why? [message #536541 is a reply to message #536540] |
Wed, 21 December 2011 07:01 |
|
Michel Cadot
Messages: 68732 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Once you fix this it compiles:
SQL> 9
9* ]
SQL> c:]:}
9* }
SQL> l
1 create or replace and compile java source named "Decodificador" as
2
3 public class Decodificador {
4
5
6 public static String decodifica(String codigo){
7
8 return codigo;
9 }
10
11 }
12*
SQL> /
Java created.
SQL> create or replace function F_Decodificador(codigo varchar2) RETURN VARCHAR2 IS
2 LANGUAGE java NAME 'Decodificador.decodifica(String) return String';
3
4 /
Function created.
Regards
Michel
[Updated on: Wed, 21 December 2011 07:02] Report message to a moderator
|
|
|
Re: ora 29531 Why? [message #536544 is a reply to message #536540] |
Wed, 21 December 2011 07:05 |
iblazquez
Messages: 26 Registered: June 2007
|
Junior Member |
|
|
I've copied bad the code
create or replace and compile java source named "Decodificador" as
public class Decodificador {
public static String decodifica(String codigo){
return codigo;
}
}
the error persist
|
|
|
Re: ora 29531 Why? [message #536545 is a reply to message #536541] |
Wed, 21 December 2011 07:08 |
|
Michel Cadot
Messages: 68732 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
SQL> create or replace function F_Decodificador(codigo varchar2) RETURN VARCHAR2 IS
2 LANGUAGE java NAME 'Decodificador.decodifica(String) return String';
3
4 /
Function created.
SQL> select F_Decodificador from dual;
select F_Decodificador from dual
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'F_DECODIFICADOR'
SQL> create or replace function F_Decodificador(codigo varchar2) RETURN VARCHAR2 IS
2 LANGUAGE java NAME 'Decodificador.decodifica(java.lang.String) return java.lang.String';
3 /
Function created.
SQL> select F_Decodificador('X') from dual;
F_DECODIFICADOR('X')
-----------------------------------------------------------------------------------------------------
X
1 row selected.
See how it is easy to see and fix the error when you correctly post.
Regards
Michel
[Updated on: Wed, 21 December 2011 07:09] Report message to a moderator
|
|
|
|