JDeveloper, Java & XML :: PLS-00201 Error Displayed When Call Function From Program?

Jun 30, 2011

my java program i am executing a pl/sql function using callable statement i checked everything in the function and the function is created without compilation errors in sql*plus environment, and i gave all DBA permissions to the user, but i got the error like below

java.sql.SQLException: ORA-06550: line 1, column 28: PLS-00201: identifier 'NAME' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored

and i wrote the function like below for the below table

create table student(regno number(6),name varchar2(15),dob date,phone number(10),
address varchar2(30),cat varchar2(2),password varchar2(12),hallno number(6),
fee_paid varchar2(3),constraint student_pk primary key(regno))
create table fee(regno number(6), branch varchar2(15),amount number(4), ddno number(12), fee_paid varchar2(3),
dddate date, dd_received_date date default sysdate, constraint fee_pk primary key(regno))

[code]...

and the java program is like below
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection=DriverManager.getConnection(dbURL,dbUserName,dbPassword);
CallableStatement st=connection.prepareCall("{?=call

[code]...

View 5 Replies


ADVERTISEMENT

JDeveloper, Java & XML :: Call DB Function From Java Hibernate

Feb 10, 2011

I need to call DB function through Java Hibernate.

My Sample XML File looks like.
---------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<sql-query name="getchequeno" callable="true">
?:=call cz_nab_mw_fn_gen_ol_chq_no()
</sql-query>
</hibernate-mapping>
---------------------------------------------------------------
I am getting below error while reading the file

"java.lang.RuntimeException: org.hibernate.HibernateException: Errors in named queries: getchequeno"

View 1 Replies View Related

JDeveloper, Java & XML :: Missing Expression And Then Group Function Not Allowed Error

Feb 23, 2011

I have 2 tables used in this problem: ODETAILS and ORDERS.

ODETAILS has the following columns: ONO, PNO, QTY, COST
ORDERS has the following columns: ONO, CNO, ENO, RECEIVED, SHIPPED, ORDER_COST

UPDATE ORDERS
SET ORDER_COST= 1 * ( select SUM(
SELECT COST
FROM ODETAILS
WHERE ORDERS.PNO=ODETAILS.PNO
)
);

In ODETAILS there can be more than 1 row for 1 order. So I'm trying to add all the COSTs in ODETAILS.

View 3 Replies View Related

JDeveloper, Java & XML :: Using PL/SQL Function To Execute Java Class?

May 20, 2013

i`m trying to use pl/sql function to execute java class. I created 2 tables with around 100 values and java class with simple functionality. I need to create function to loop through my table1 and get with each iteration one value from table and pass that value as parameter to java class.

table1 is something like this:

ID NAME
1 name1
2 name2
3 name3
. .
. .
100 name100

table2 is empty with same columns as table1 ( table2 is for data obtained from java returns ) I created in sql+ java class.

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "myClass" AS
import java.io.*;
import java.util.*
public class myClass {
public static String fun(String strName)

[code]....

Then i wanna make a pl/sql function for:

1)For i = 1 Obtain first value from table1 (column name) and pass it throught java class then return value and save it in table2 with the same id as id from table1

2) change i=1 to i=2 and do that same

3) end if i=101

View 1 Replies View Related

SQL & PL/SQL :: Connection Timeout When Calling Oracle Function From Java Program?

Jun 18, 2013

We have a daily batch job executing a oracle-plsql function. Actually the quartz scheduler invokes a java program which makes a call to the oracle-plsql function. This oracle plsql function deletes data (which is more than 6 months) from 4 tables and then commits the transaction.

This batch job was running successfully in the test environment but started failing when new data was dumped to the tables which happened 2 weeks ago (The code is supposed to go into production this week). Earlier the number of rows in each table was not more than 0.1 million. But now it is 1 million in 3 tables and 2.4 million in the other table.

After running for 3 hours, we are getting a error in java (written in the log file) "...Connection reset; nested exception is java.sql.SQLException: Io exception: Connection reset....". When the row-counts on the tables were checked, it was clear that no record was deleted from any of the tables.

Is it possible in oracle database, for the plsql procedure/function to be automatically terminated/killed when the connection is timed out and the invoking session is no longer active?

View 13 Replies View Related

SQL & PL/SQL :: Call Java Function?

Jan 3, 2012

I want to have something like this:Run PL/SQL function and in middle of function call JAVA function and when JAVA function is done continue PL/SQL function.

Because I have PL/SQL function who inserts into table information.And the JAVA function is uploading/streaming file to column->blob.And in the end of PL/SQL function goes insert into table with file extension and check for *.edoc validation.I can't do it with PL/SQL only. how to do this right or how to run JAVA function in PL/SQL.

View 3 Replies View Related

JDeveloper, Java & XML :: Using DELETEXML SQL Function

May 31, 2013

I have the following problem with the DELETEXML function :

my table called scl_profile content the following XML field :

select ID, profile_data from scl_profile
WHERE existsNode(profile_data,
'/exportImportProduitsMarcheCriteria/colonnesExport="LIBELLE_1"') = 1
[code]....

The item is not deleted.

View 6 Replies View Related

Forms :: How To Call A Java Function From Oracle

Sep 5, 2007

I am having Oracle 9.2.0.1.0 client in my PC and jdk version is 1.6

I had configured below tools in my PC. (windows 2000) I am having Oracle 9.2 with Oracle Developer Suite 10g (10.1.2.0.2) which contains Oracle JDeveloper 10g (10.1.2.1) also.

How to call a java function from Oracle forms? code samples and how to integrate those thing?

View 13 Replies View Related

JDeveloper, Java & XML :: Calling Function With (array Of) Complex Data Type

Oct 20, 2011

I'm trying to call a Java function from within a PL/SQL aggregation function with a (array of) complex data type.

a) basic definitions (work and are ok)

CREATE OR REPLACE TYPE eventtype AS OBJECT
(
relevance NUMBER,
bid1 NUMBER,tid1 NUMBER,prob1 NUMBER,
bid2 NUMBER,tid2 NUMBER,prob2 NUMBER,
bid3 NUMBER,tid3 NUMBER,prob3 NUMBER,
bid4 NUMBER,tid4 NUMBER,prob4 NUMBER,
bid5 NUMBER,tid5 NUMBER,prob5 NUMBER,
bid6 NUMBER,tid6 NUMBER,prob6 NUMBER
);
CREATE OR REPLACE TYPE eventtuple IS TABLE OF eventtype;
/

b) The following call works (but is not exactly that what I want):

public class pcompDP {
public static NUMBER probComputation(oracle.sql.STRUCT pin) throws java.sql.SQLException {
...
}
}
create or replace FUNCTION pcompDPFunc(cin IN eventtype) RETURN NUMBER PARALLEL_ENABLE DETERMINISTIC AS LANGUAGE JAVA NAME 'pcompDP.probComputation(oracle.sql.STRUCT) return BigDecimal';
/
SELECT pcompDPFunc(eventtype(5, 6, 0.3, 10, 20, 0.45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) from dual;

c) The following call doesn't work (but should have the intended semantics):

public class pcompDP {
public static NUMBER probComputation(oracle.sql.STRUCT[] pin) throws java.sql.SQLException {
...
}
}
create or replace FUNCTION pcompDPFunc(cin IN eventtype) RETURN NUMBER PARALLEL_ENABLE DETERMINISTIC AS LANGUAGE JAVA NAME 'pcompDP.probComputation(oracle.sql.STRUCT[]) return BigDecimal';
/
SELECT pcompDPFunc(eventtuple(eventtype(2, 3, 0.234, 1, 1, 0.123, 0, 0, 0, 0, 0, 0, 0, 0, 0), eventtype(5, 6, 0.3, 10, 20, 0.45, 0, 0, 0, 0, 0, 0, 0, 0, 0))) from dual;

d) What's the error? Do I have to use JPublisher or is it possible without it? I guess an array should be possible without it.

The type of the parameter seems to be wrong. Question is whether in PL/SQL, Java or SQL.

View 1 Replies View Related

Precompilers, OCI & OCCI :: Cobol Program That Call C Program

Jan 28, 2011

I have a Cobol program that call C program above

#include stdlib

EXEC SQL INCLUDE SQLCA;
EXEC SQL BEGIN DECLARE SECTION;
char *uid = "puntos/puntos@cmrdesar";
[code]....

Are something wrong in C programm ? Pro*C code from vouters.dyndns.org/tima/OpenVMS-Cobol-C-Cobol_ passing_ variable_ number_ of_ arguments_to_C.html

View 1 Replies View Related

JDeveloper, Java & XML :: Invalid Column Index Error - Web Applications

Mar 13, 2012

I'm working on a Java Web Application

(User input(jsp)<-->Controller<----->DAO<----->Database) project where the user submits certain fields (partyId, DocId, cbrxPath, cbrValue, nodeId, TRANSLATION_Class and so on)and they are saved in 3 different tables (Party_Document_Node table, Routing and Routing_Node table).

Here's the portion of the DAO code below where the problem is:

public class AssociationsDAOOracleImpl implements AssociationsDAO {
private static final String PARTIES_WITH_ASSOCIATIONS = " Select distinct(party_id) from PARTY_DOCUMENT ORDER BY 1";

private static final String ASSOCIATION_FETCH_QUERY = " Select PARTY_ID, DOCUMENT_ID, NODE_ID, APPLICATION_CONTEXT_XPATH, DOCUMENT_LOGGING FROM PARTY_DOCUMENT_NODE WHERE PARTY_ID = ? ORDER BY PARTY_ID ";

private static final String ROUTING_FETCH_QUERY = " Select CONTENT_ROUTING_PATH FROM ROUTING WHERE PARTY_ID = ? AND DOCUMENT_ID =? ORDER BY PARTY_ID ";

private static final String ROUTINGNODE_FETCH_QUERY = " Select CONTENT_ROUTING_VALUE, TRANSLATION_CLASS FROM ROUTING_NODE WHERE PARTY_ID = ? AND DOCUMENT_ID =? AND NODE_ID =? ORDER BY PARTY_ID ";

private static final String CONTEXT_FETCH_QUERY = " Select CONTEXT_VALUE, CONTEXT_INSTANCE, CONTEXT_KEY FROM APPLICATION_CONTEXT where party_id = ? and document_id = ? and node_id = ? ";

private static final String NODEID_FETCH_QUERY = " Select NODE_ID FROM PARTY_DOCUMENT_NODE WHERE PARTY_ID = ? AND DOCUMENT_ID =? AND NODE_ID =? ORDER BY PARTY_ID ";
[code]....

View 1 Replies View Related

Error Call A Function Which Alter Sequence Value

Jun 22, 2011

error call a function which alter sequence value..I created a function to reset a sequence value as below

CREATE OR REPLACE FUNCTION rebuildSequence
return number
As
l_csmsgid1 PLS_INTEGER;
l_csmsgid2 PLS_INTEGER;
l_val PLS_INTEGER;
plsql_block VARCHAR2(500);
[code]....

I verified and executed the pl/sql block without a problem. but when only put into a fuction and call it, got then error.

View 7 Replies View Related

SQL & PL/SQL :: Function Raise No Error When Call In Select

Feb 17, 2010

why function does no raise error no_data found when call in select statement.

1) create one function.

CREATE OR REPLACE function fn_sal(v_id NUMBER) RETURN NUMBER
IS
v_sal NUMBER;
BEGIN
SELECT sal INTO v_sal FROM emp where empno=0;
RETURN v_sal;
END;

2) call it in select statement.

SELECT fn_sal(e.sal),e.* FROM emp e

select satement cause no error , it displayes all the records but null for the function cloumn.

why it not gives no_data_found error.

View 4 Replies View Related

JDeveloper, Java & XML :: Using Java.lang.Math In Oracle / ORA-31011 / Parsing Failed

Apr 26, 2013

I am trying to execute an xslt (for XML transformation) using xmltype.transform function.

I can't paste XSLT code here, but below is similar what I am doing.

[URL]

I have used a reference of random() method of java.lang.Math in xslt file, and it's giving me below error.

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00607: Invalid reference: 'random'.

I doubt, it's because of "Math" class, which is not present in Oracle, how to load standard java classes.

View 1 Replies View Related

JDeveloper, Java & XML :: Java Stored Procedure Invoking Windows Run Time Process

May 22, 2012

I am trying to invoke program from my local Windows machine (exactly java executor, which is in my environment on c:javajdkinjava) using database package with Java stored procedure.

Everything is fired by SQLPLUS script, this script invokes package with Java stored procedure (jar loaded into Oracle) and that procedure is trying to invoke runtime process (syntax:

c:javajdkinjava -cp

and here ara my classes and main jar) using my local java executor. I added all permissions using dbms_java.grant_permisions (execution forced me to give permissions java.io.FilePermission to <<ALL_FILES>> for execute), moreover I added to my database user JAVASYSPRIV and JAVAUSERPRIV role. Unfortunately, beside this I am still getting error:

C:javajdkinjava not found (Note that lookup with PATH isn't done due to the oracle executable being setuid.)

View 8 Replies View Related

JDeveloper, Java & XML :: Java.sql.SQLException - Execute Batch - Exception Equal To 1?

Jul 14, 2011

I was getting java.sql.SQLException: executeBatch, Exception = 1when i tried to use executeBatch().could not understand why i am getting it.

View 1 Replies View Related

JDeveloper, Java & XML :: Calling Java Stored Procedure From Oracle

Jun 20, 2011

I am writing a java stored procedure in my package. In the java procedure I want to issue a query to be fired on the user table from which I am calling the java procedure.

Some thing like following:

I am logged in to USER1 and my package is inside USER1. From this package I am calling the Java Stored Procedure. In java procedure I want to make a jdbc connection to USER2. The details of USER2(password, hostname,portno) are stored in a table called 'connection_details' and this table is in the USER1.

My problem is how can I issue the

SELECT details FROM CONNECTION_DETAILS for USER2

so that i can get the details..?

Do i need to first make jdbc connection to USER1 and then execute the above query for which i need similar details of USER1. How can i obtain the details of USER1 here.

I am thinking if I am already in USER1 then do I need to make the jdbc connection to USER1 and then execute the query?

View 1 Replies View Related

JDeveloper, Java & XML :: Create Or Replace And Compile Java - Getting Ora 29531?

Dec 21, 2011

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

View 8 Replies View Related

JDeveloper, Java & XML :: Best Driver For Java To Oracle Database Connection

Jul 30, 2012

Which is the best driver for java to Oracle database connection ?

View 1 Replies View Related

JDeveloper, Java & XML :: How To Pass Any Array From Java To Oracle

Feb 4, 2005

Here is a problem. I have to pass an array e.g ('Account','Marketing',Computer' ) from java to Oracle 9i.

Would I be able to do in Oracle, if yes then how ?

View 11 Replies View Related

JDeveloper, Java & XML :: Native Java In Oracle Versus PL/SQL?

Aug 26, 2011

we can you java code natively with Oracle. But I didn't get how to decide when to use native java in oracle and when to use pl/sql.

View 5 Replies View Related

SQL & PL/SQL :: Getting PLS-00201 Error?

May 21, 2012

I have a job to run 'scott.product_pkg' daily, but I am getting this following error.

Job failure message:
ORA-06550: line 1, column 8:
PLS-00201: identifier 'scott.product_pkg' must be declared
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored

View 4 Replies View Related

JDeveloper, Java & XML :: Connection Between Java And Oracle

Nov 26, 2012

I Program with Java . when we connect oracle by program ,

Get the following error :

'No suitable driver found for jdbc:orcl:thin:@localhost:1521 '

View 3 Replies View Related

Networking And Gateways :: C Program Call From Plsql

Jan 24, 2013

my db version is:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

entry in my listener.ora file
===========================
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
[code]......

entry in tnsnames.ora file:
===============================
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc0))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl.example.com)
)
)

listener is running perfectly. created c program, compile the program by

gcc -c <filename>
ld -shared -o <filename.so> <filename.o>
cp <filename.so> $ORACLE_HOME/bin

create library & function from db. when I am invoking this function it is throwing error message:

ORA-28546: connection initialization failed, probable Net8 admin error

View 1 Replies View Related

Execute Command Line Program Within Java?

Jan 10, 2012

I've created a Java class in my Oracle DB that calls a Visual Basic program to convert a XLS file into a CSV file in order to load it into an external table. The problem that I have is that when I call the Visual Basic program from the Java class, nothing happens. I had the same problem with a Python program, and I thought that the problem was from Python, but now with Visual Basic the problem remains, both aren't executed.

The strange thing is that when I call the same Java class outside Oracle, directly from a command line, it executes both Python and Visual Basic programs.

Here is the Java class defined in Oracle:

CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "OSCommand" AS
import java.io.*;
public class OSCommand{
public static void Run(){
try
{

[code]....

And here is the procedure that calls the Java class:

create or replace
procedure run_os_command
as language java
name 'OSCommand.Run()';

View 1 Replies View Related

Forms :: Using A Java Program In Bean Area?

Jul 13, 2010

I want to use a java program in Bean Area.

But I can't understand the implement class and how it is implemented.

View 1 Replies View Related

Application Express :: Image Not Displayed In Form With APEX Utility Function

Apr 18, 2013

I have just created the basic employee information form in which i upload the photograph of the employee. The photograph gets uploaded but it does not display properly. I have already referred the sample database application to display the image. Moreover, i have followed the same steps as it is used to display the product image in that application. Still i am unable to get result. I am getting following output:

<img src="apex_util.get_blob_file?a=35682&s=101496289174102&p=15&d=10639237623242912156&i=10639236703270912154&p_pk1=21&p_pk2=&p_ck=FCA12832591A1C706D76FDD589E551A2" />

View 11 Replies View Related

Execute Java Program From Oracle Procedure Which Is On Different Machines

Oct 10, 2012

Machine 1: Oracle server installed and database hosted on this Machine.
Machine 2: Oracle client is installed and connect through sqlplus to database in machine 1.

The requirement is: I need to have a Java/C program in machine 2 (where client available) which needs to be called from the stored procedure in server on machine 1. The objective is calling a java/C program from Oracle stored procedure but available on 2 different machines. Is it possible,

Environment: Oracle 11.2.0.1
UNIX AIX 6.1

View 3 Replies View Related

JDeveloper, Java & XML :: Parsing Through PL/SQL

Nov 21, 2011

oracle PL/SQL. I have almost finished this xml parsing task but their is one problem. Actually in our table there are more than 70-80 columns & due to that only I don't want to put the hard coded column name in my procedure, because if I will do that, the unnecessary procedure size will be increase(means line of code).Here is our procedure

Create or replace procedure loadMyXML(dir_name IN varchar2, xmlfile IN varchar2) AS
l_bfile BFILE;
l_clob CLOB;
l_parser dbms_xmlparser.Parser;
l_doc dbms_xmldom.DOMDocument;
l_nl1 dbms_xmldom.DOMNodeList;
l_nl2 dbms_xmldom.DOMNodeList;
l_n dbms_xmldom.DOMNode;
node1 dbms_xmldom.DOMNode;
l_colName VARCHAR2(100);
[code]...

View 3 Replies View Related

JDeveloper, Java & XML :: How To Get Thread ID

Dec 18, 2010

I want to do concurrency program analysis, how can I get the id of the thread when this thread started dynamic in the progress of execution?

View -1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved