ORA-28509 when calling PL/SQL mq message throught Java Application
I have a PL/SQL procedure called "prc_send_mq_message" witch works perfectly when I invoke throught database users where it is compiled.
But when this same procedure is invoked by Java Application witch connects with the same user, the error: "ORA-28509: was not possible stablish connectinon with Non_Database Oracle" happens.
Can anyone help me ?
See pl/sqlblock bellow:
Create or replace procedure prc_send_mq_message Is
pi_db_link_name Varchar2(100) := 'siibdg4mq';
pi_queue_name Varchar2(100) := 'QL.REQ.SIIB.FBS.01';
vObjDesc PGM.MQOD;
vHandleObj PGM.MQOH;
vMsgDesc PGM.MQMD;
vPutOpt PGM.MQPMO;
--options PGM.MQPMO;
vPutBuffer Raw(32767);
Begin
-- Opening the queue:
vObjDesc.DBLINKNAME := pi_db_link_name;
vObjDesc.OBJECTNAME := pi_queue_name;
pgm.mqopen( vObjDesc, PGM_SUP.MQOO_OUTPUT, vHandleObj ); --> ORA-28509: was not possible stablish connectinon with Non_Database Oracle
End;
/
Hi,
This is the Oracle MessageQ forum, not the WebLogic Server, Oracle Database, or Oracle JMS forum. You will likely have better success in getting your question answered by using one of the Database related forums.
Regards,
Todd Little
Oracle Tuxedo Chief Architect
Similar Messages
-
How can I get error message when calling pl/sql
Hi,
I call a pl/sql java wrapper generated by Rosetta.
public static void startWf(
OracleConnection _connection,
BigDecimal p_goal_header_id,
BigDecimal p_submiter_userid,
String p_commit,
String p_init_msg_list,
String [] x_return_status,
BigDecimal [] x_msg_count,
String [] x_msg_data
) throws SQLException
the pl/sql is written by the standard way of OAF backend,
PROCEDURE start_wf ( p_goal_header_id in number
,p_submiter_userid in number
,p_commit in varchar2 DEFAULT FND_API.G_TRUE
,p_init_msg_list in varchar2 DEFAULT FND_API.G_FALSE
,x_return_status out varchar2
,x_msg_count out number
,x_msg_data out varchar2);
when running this procedure in TOAD, in case of error, following script can print error message:
if l_return_status <> 'S' then
dbms_output.put_line('Result');
dbms_output.put_line('status: '||l_return_status);
dbms_output.put_line('error count: '||l_msg_count);
dbms_output.put_line('Loop Error');
dbms_output.put_line('Err: '||fnd_msg_pub.get(-1,p_encoded=>'F'));
for i in 2..l_msg_count loop
dbms_output.put_line('Err: '||fnd_msg_pub.get(p_encoded=>'F'));
end loop;
end if;
if l_return_status = 'S' then
dbms_output.put_line('Success');
end if;
end;
My question is when calling pl/sql java wrapper from Java, in case of Error, return_status="E", then in order to get exact error msg, is there any equivalent java method such as get error from pageContext or OADBTransaciton.. etc instead of calling again pl/sql fnd_msg_pub.get to get error msg?
thanks
LeiLei,
You can use
checkErrors(OADBTransaction pTx,
int pMessageCount,
String pReturnStatus,
String pMessageData)
method in OAExceptionUtils Class.For details look at javadoc of OAExceptionUtils Class.
--Mukul -
ORA-02074 when calling proc from VB
Anyone have any idea why a stored procedure that sets a savepoint will fail with
[Oracle][ODBC][Ora]ORA-02074: cannot ROLLBACK in a distributed transaction
ORA-02074: cannot SET SAVEPOINT in a distributed transaction
ORA-06512: at "PIPS_ADMIN.PKG_ACAS_COMMON", line 1098
ORA-06512: at line 1
when called from Visual Basic via an ADO connection through ODBC BUT
will succeed when called from SQL*Plus or TOAD or other tool.
Any ideas appreciated.
MikeThe change was only made to a local variable in a function that was called from the original function that got the parameters from the java client.
I changed it from localtimestamp to systimestamp and it works fine.
Do i have to make any settings about the time zone in the jdbc thin client ? -
Getting ora-0600 when running PROFLOAD.sql
Hi,
I was getting ORA-0600 when running PROFLOAD.sql script for DBMS_PROFILER (from SYS account). I am running Oracle 9i personal edition on win98. Did anybody had the same problem??Here is the full dump..
QL> @profload
Package created.
Grant succeeded.
Synonym created.
create or replace library sys.dbms_profiler_lib wrapped
ERROR at line 1:
ORA-00600: internal error code, arguments: [16201], [], [], [], [], [], [], []
create or replace
ERROR at line 1:
ORA-00600: internal error code, arguments: [16201], [], [], [], [], [], [], []
Testing for correct installation
PACKAGE BODY sys.DBMS_PROFILER - missing or invalid
PL/SQL procedure successfully completed. -
ORA-23421 when calling dbms_defer_sys.schedule_purge
Hi all,
did anyone experience ORA-23421 when calling dbms_defer_sys.schedule_purge?
for settimg up an updatable materialized view replication between two Oracle 9.2 databases, I followed the steps detailed in "Oracle9i Replication Management API Reference" and when calling
DBMS_DEFER_SYS.SCHEDULE_PURGE (
next_date => SYSDATE,
interval => 'SYSDATE + 1/24',
delay_seconds => 0,
rollback_segment => '');
on the materialized view site, I get the error ORA-23421, telling me, that job number 48 is not a job in the job queue.
Do you have any idea, what's going wrong?
Thanks for your assistance
Siegfried HartungThe answer could be found at http://www.orafaq.com/forum/t/66106/0/
From a previous run of the initialization scripts another user owned the job, that was adressed. The issue was resolved by changing the script in order to use the old userid (snapadmin instead of mvadmin). -
How can i call a jasper report from a java Application
Hi,
i am chiranjit , currently i working in a web based ERP project, in this project as a report building tool we are using JasperReport wih eclipse plugin . in eclipse report's are generating very well but i am unable to call that report from a java application because i have no idea about the How to call a Jasper Report from a Java Application . so please send me the necessary class names, jar files names and programe code as early as possible.
ChiranjitAhh, kind of a duplicate thread:
http://forums.java.sun.com/thread.jspa?threadID=631642
@OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
� {� -
How can i call a VB6 project from my java application using JNI
hi
can anyone tell me the procedure of calling a VB6 project from any java application using JNI
if anyone does know then tell me the detail procedure of doing that. I know that i have to create a dll of that VB6 project then to call it from the java application.
if anyone know that procedure of creating dll file of an existing VB6 project please reply
please if anyone know then let me knowAhh, kind of a duplicate thread:
http://forums.java.sun.com/thread.jspa?threadID=631642
@OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
� {� -
Send short message from Java application on mobile phone to server; http
Hello!
My question is: can I send short message from Java application on mobile phone to server - with the use of SMS (WMA) or http connection?
I found this topic http://forums.sun.com/thread.jspa?threadID=5405431 about: "how to send data from midlet to servlet using doPost method".
There is also such topic http://forums.sun.com/thread.jspa?threadID=5408046&tstart=0 about: "CLDC and MIDP - sending SMS to server -> Wireless Messaging API (WMA)".
Please, kindly help me.
Code from the topic mentioned above, edited by me so that it can be read easily:
//http://forums.sun.com/thread.jspa?threadID=5405431
//CLDC and MIDP - Re: how to send data from midlet to servlet using doPost method
I want to know how to pass the values .
for examples : this is what i wrote for doGet
String url = setting.getUrl().toString()"/testProServlet/servlet/UpdateCompanyProfile?userId="+loggedInUserId"&svComp="saveCompHex;
userId and svComp has the data which is very long so i wanted to use doPost.
Now i dont know how to do it.
This is what i have done in doGet (midlet)
public void saveCompanyProfile(String saveComp,int flag,String blankFieldNm)
System.out.println("flag===" flag);
if (flag==1)
displayAlert("Company Profile Edit",blankFieldNm+" field cannot be blank.",AlertType.ERROR, edCmpRecForm, true);
else
String saveCompHex = helper.encodeHexString(saveComp);
// String saveCompHex =saveComp;
HttpConnection httpConn = null;
serverSettings setting = new serverSettings();
System.out.println("saveCompHex===" saveCompHex);
String url = setting.getUrl().toString()"/testProServlet/servlet/UpdateCompanyProfile?userId="loggedInUserId"&svComp="saveCompHex;
System.out.println("url of save company profile:: "+url);
InputStream is = null;
OutputStream os = null;
try {
// Open an HTTP Connection object
httpConn = (HttpConnection) Connector.open(url);
System.out.println("urlMidlet1 save edited company data===::" url.length());
// Setup HTTP Request
httpConn.setRequestMethod(HttpConnection.POST);
httpConn.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
System.out.println("urlMidlet2===" url);
int respCode = httpConn.getResponseCode();
System.out.println("respCode edit company profile=====" respCode);
if (respCode == httpConn.HTTP_OK)
StringBuffer sb = new StringBuffer();
os = httpConn.openOutputStream();
is = httpConn.openDataInputStream();
int chr;
while ((chr = is.read()) != -1)
sb.append((char) chr);
String sResultSvCompanyProfile= sb.toString();
System.out.println("+++++++++++++Company sResult+++++++++++++==="sResultSvCompanyProfile);
if (resultViewCompanyProfile.trim().equals(""))
System.out.println("++++++++++++++If++++++++++++++SaveCompanyProfile===");
displayAlert("Login Incorrect","Username and Password incorrect", AlertType.ERROR, mainForm, true);
else
System.out.println("++++++++++++++Else++++++++++++++SaveCompanyProfile===");
//companyProfile();
displayAlert1("Information","Company Profile edited successfully", AlertType.INFO, profileMenuScreen, true);
else
System.out.println("Error in opening HTTP Connection. Error#" respCode);
//the line below divided into two lines because it was too long
displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
AlertType.ERROR, mainForm, false);
catch(IOException e)
e.getMessage();
finally {
if(is!= null)
try
is.close();
catch (IOException e)
// TODO Auto-generated catch block
e.printStackTrace();
displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
AlertType.ERROR, mainForm, false);
if(os != null)
try
os.close();
catch (IOException e)
// TODO Auto-generated catch block
e.printStackTrace();
displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
AlertType.ERROR, mainForm, false);
if(httpConn != null)
try
httpConn.close();
catch (IOException e)
// TODO Auto-generated catch block
e.printStackTrace();
displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
AlertType.ERROR, mainForm, false);
} //end finally
} //end else (?)
} //end savecompanyhi,
SMS API(WMA) is an optional package. It is not a MIDP1.0 or MIDP2.0 api's.
There are phones which has WMA api with MIDP1.0 support .... Nokia 3650
Seimens has some phone with their own api's to send sms.Check out seimens site for more info
BTW, What do you mean buy sending SMS to Server????
If you want to send message to server you can do it with Http.
HTH
phani -
ORA-01804 when calling function from java client
Hi All,
we changed a PL/SQL-function that is called from a java client from using sysdate to localtimestamp. The function works fine in TOAD, but when called from the java client ist throws an ora-01804: failure to initialize timezone information.
Any suggestions?
AlexanderThe change was only made to a local variable in a function that was called from the original function that got the parameters from the java client.
I changed it from localtimestamp to systimestamp and it works fine.
Do i have to make any settings about the time zone in the jdbc thin client ? -
FRM-40735 / ORA-06508 when calling an attached package's procedure
Hello all,
I've a problem when calling a procedure in one of my attached libraries. the code is :
when upper(trim(NOT_MSG_NAME)) = 'REN_MSG_REQ_REG_PERMENANT' then SERV.CLFRM_PBL_NRQP_F(:Parameter.NOTIFICATION_ID);
and it gives me FRM-40735 stating that an ORA-06508 has occurred when calling the procedure.
Important and funny thing is, when I add the path to the library , It works fine!
When I attach it, removing the path, It goes wrong like I said..
the location of the library is:D:\DevSuiteHome\cgenf61\ADMIN , the path is added in FORMS_PATH and all the other
libraries attached to the form in the same path are working fine !
I'm using forms builder 10.1.2.0.2, and the platform is windows and I've migrated from forms 9.0.4.0.19
anybody having any ideas what the problem may be?Thank you Sarah
In fact, somebody had modified the formsweb.cfg adding two working directory directives (It's a shared PC!). I recon none of them works though no configuration error is raised. I omitted both of them and the problem is gone .
thank you again. -
11g preview version 3: JNDI Lookup problem when calling PL/SQL webservice
Hi,
I am experiencing a problem when calling a PL/SQL Webservice from a BPEL flow.
When I am trying to test my BPEL flow from the SOA Console I get a "Error doing JNDI lookup on target jdbc/MyDBDS"
The composite application including the BPEL flow is deployed in one application. "CompositeApp" and the web service in another Application called
"WebServiceApp".
Both applications are deployed on the same built in OC4J Application Server
If I test the webservice in isolation from the SOA console it works. It also seems to be working if the webservice and the and the BPEL flow is in the same project.
If anyone has any ideas on this one I would be very greatful.
Thanks in advancetry creating the MyDBDS connection as an application resource in both applications.
-
Calling PL/SQL function from external Java class
I was wondering if I was able to call a pl/sql function from an external java class? If so, would you be able to tell me briefly on how to go about it. I know I can call java methods that are internally stored in the db from pl/sql, but I was hoping I could call pl/sql from external java. Thanks,
KellyOk, I made the changes, but I'm now getting the following error:
Error code = 1403
Error message = ORA-01403: no data found
ORA-06512: at "IOBOARD.GETSTATUS", line 6
ORA-06512: at line 1
The ora-01403 I don't understand because there is data for the name Kelly.Brace.
ora-06512 error: at string line string.
Here's what the code looks like after I made the changes:
String sql = "{?=call ioboard.GetStatus(?)}";
// create a Statement object
myStatement = myConnection.prepareCall( sql );
myStatement.setString( 1, "Kelly.Brace" );
myStatement.registerOutParameter(2, java.sql.Types.LONGVARCHAR );
// create a ResultSet object, and populate it with the
// result of a SELECT statement
ResultSet myResultSet = myStatement.executeQuery();
// retrieve the row from the ResultSet using the
// next() method
myResultSet.next();
// retrieve the user from the row in the ResultSet using the
// getString() method
String status = myResultSet.getString(1);
System.out.println("Hello Kelly, your status is: " + status);
// close this ResultSet object using the close() method
myResultSet.close();Here's what the function looks like:
CREATE OR REPLACE FUNCTION GetStatus( user_name in varchar2)
RETURN VARCHAR2
is
v_status varchar2(10);
BEGIN
select iob_location into v_status
from ioboard.iob_user
where iob_username = user_name;
RETURN( v_status);
END;This works perfectly in the SQL Window:
select iob_location
from ioboard.iob_user
where iob_username = 'Kelly.Brace'; -
How to call a sql stored procedure in java...... HELP
Hi I am making an application for taking backup in sql automatically so i have created a dts package which is called by a stored procedure. Now the problem is that how to call that stored procedure in a Java program so that after running my java program i get my database backup.
Please please solve my problem.
thanks in advance.
If possible please send the code.
Message was edited by:
Andy_Davis
Message was edited by:
Andy_DavisHi... I am trying to create a dts package which is called by a stored procedure... How can i do this? IF possible can you please send me the code as well..
Thanks a ton...
Susan_Davis -
Ora-12154 when trying to connect to database from fortran application
I am trying to connect to database and run an simple select query to a table(without any where clause) using pro*fortran code.
the connect strng is like
exec sql connect :uidpwd
where uidpwd = username/password@SID
SID and tnsnames connect string are the same.
The fortran (profortran) code is placed in the database server and there are no errors when make is run.
Tnsping is working fine, also i am able to conect using sql*plus and run the same query.
Please help
Thanks and Regards
NitinHi Nitin
Thanks for the helpful! With your point I'm now Pro! Great thanks.
By the way have your seen that?
Files such as LISTENER.ORA, TNSNAMES.ORA, SQLNET.ORA, if configured manually, or copied and edited from earlier releases of Oracle Database may have record attributes that are incompatible with Oracle Database 10g release 2. The software cannot read such files. The required record format is stream_lf and the record attributes are carriage_control and carriage_return.
This may result in:
Inability to start the listener
Services not registered with the listener
Inability to connect to other databases
ORA-12154: TNS:could not resolve service name
Run the following command on each file affected:
$ DIR/FULL filename
An output similar to the following may be displayed:
Record format: Variable length, maximum 255 bytes
Record attributes: Carriage return carriage control
If the output includes the preceding entries, then run the following command:
$ CONVERT/FDL=SYS$INPUT filename filename
RECORD
CARRIAGE_CONTROL CARRIAGE_RETURN
FORMAT STREAM_LF
^Z
Otherwise herewith an interesting metalink note. Doc ID: Note:437597.1
Subject: Ora-12154 When Executing Pro*Fortran Code Compiled With Oracle 10g.
Hope this will also help you...
Cheers
Hubert -
Calling pl/sql api through multiple java threads
Hi All,
I need to call a pl/sql api from multiple java threads simultaneously and all thread will use same db connection.
I want to know if all the threads will simultaneously call the pl/sql api then will the local variable inside pl/sql procedure be shared between them or they will get separate instances of variables.
TIAYou cannot make multiple parallel client calls over the same Oracle session handle. There is a single non-threaded/non-fibre serialised server process servicing client requests for that session. (physical process on Linux/Unix, thread in the oracle.exe process on Windows).
Each thread on the client side, needs its very own Oracle session. Thus each thread will have a server process footprint on the server. Which could be problematic if 10 clients each starts 10 threads - as it means a 100 processes on the server are needed to service these client threads.
Have a look at Overview of OCI Multithreaded Development in the Oracle® Call Interface Programmer's Guide for how to use the threading call interface of the OCI - as oppose to rolling your own where each thread manually needs to deal with is OCI session context.
Maybe you are looking for
-
Hi Everyone. I've got some lovely XML IDocs. I'd like to read them into the IDOC Class Library and send them to SAP with JCo.......... But I can't get some simple code to parse the XML. I've been sending XMLs to SAP for a long time and they were al
-
New iPad won't save genius playlists to iCloud (iTunes Match)
Hi, Just received the new iPad. One feature I was excited for in iOS 5.1 was the ability make and save genius mixes to iTunes Match so that I would have the mixes across iTunes, my iPhone, and my iPad. However, when I make a genius mix on the new i
-
Need help deleting purchased TV episodes to free up storage space
I want to download purchased TV episodes but am told that I don't have enough free space. I've deleted episodes from "Settings" "Useage" "Video" but the GB used value isn't adjusting under "Storage" "Useage". How do I get that value to adjust?
-
What is default contents of smartcard and SIM cards
hello plz tell me what is the default data on smartcards.(smartcard unique number and whatelse..) what is the difference between SIM card and SmartCards other than physical size. what is the default data we find on SIM cards. thanks in advance
-
Hello all , We need to display the Start date and the End date along with the time taken to complete the project in a report. I have created a measure called date and the type is a text field. I was able to load data into the date field. But , I am u