Error while calling BI Publisher from Forms 10g using Webservice - Urgent !
Hi,
I am calling a BI Publisher(10.1.3.4.1) webservice from the Forms 10g (10.1.2.0.2). I developed a jar file which works fine when I run from the Jdeveloper. I have successfully attached jar file to the Forms 10g but when I am calling from the when-button-pressed trigger I am getting beow error
Exception: java.lang.Exception: java.lang.NoSuchMethodError: oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.setPreemptiveBasicAuth(Z)V
Thanks in advance
What steps did you follow to successfully attached jar file to the Forms 10g? To me, it sounds like you don't have your .jar file configured with Forms Builder and/or your App Server. Your .jar file needs to be added to the FORMS_CLASS_PATH in the default.env and the FORMS_CLASS_PATH registry entry. You will likely need to modify the formsweb.cfg also to include your .jar in the archive= or archive_jini= variables (depending on your JRE [Jinitiator or Sun JRE respectively]).
It could also be a dependency on an additional Java library. Is "setPreemptiveBasicAuth" a method that you created or it is a dependent method from an additional library?
Let us know this; as well as which Java version you're using.
By the way, with respects to your "Urgent!" request. You have to understand that forum contributers are purely voluntary - this is not our full-time job. If your issue is truely urgent, it is always best to open a Service Request (SR) with Oracle Support than to rely on the forum for an urgent reply! ;-)
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Edited by: CraigB on Sep 20, 2010 2:48 PM
Similar Messages
-
Error while calling web service from Forms 10g
Hi,
I have defined a web service and deployed at OracleAS 10g 10.1.2.0.2. Web services is working fine as per standalone invocation URL and also using a Web Service source in Portal (OmniPortlet).
I have created a web service proxy and imported the JAR file into Forms module via Java Importer. Created a button to invoke a web service and show results on message bar.
Code for WHEN-BUTTON-PRESSED:
declare
v_javaObject ora_java.jobject;
xo ora_java.jobject;
v_name varchar2(30);
javaException ORA_JAVA.JOBJECT;
v_BigDecimalObject ORA_JAVA.JOBJECT;
begin
v_javaObject := EmpServicePortClient.new;
v_BigDecimalObject := BigDecimal.new(101);
v_name := EmpServicePortClient.getName(v_javaObject,v_BigDecimalObject);
message(v_name);
exception
WHEN ORA_JAVA.JAVA_ERROR THEN
-- In this case, the error would be
-- Argument 1 can not be null
message(ORA_JAVA.LAST_ERROR,acknowledge);
--Clean up
ORA_JAVA.CLEAR_ERROR;
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
javaException := ORA_JAVA.LAST_EXCEPTION;
-- Print out the Exception by using the toString()
-- Method of the exception Object
message(Exception_.toString(javaException),acknowledge);
-- and clean up
ORA_JAVA.CLEAR_EXCEPTION;
END;
Forms got compiled successfully.
However, while invoking a service by pressing a button, getting following error at message bar:
java.rmi.RemoteException:; nested exception is: HTTP transport error: javaxml.soap.SOAPException: java.security.PrivilegedAction
Is there anything that I have missed in the configuration? or what else is causing it?
Regards,
PreetHi,
I have defined a web service and deployed at OracleAS 10g 10.1.2.0.2. Web services is working fine as per standalone invocation URL and also using a Web Service source in Portal (OmniPortlet).
I have created a web service proxy and imported the JAR file into Forms module via Java Importer. Created a button to invoke a web service and show results on message bar.
Code for WHEN-BUTTON-PRESSED:
declare
v_javaObject ora_java.jobject;
xo ora_java.jobject;
v_name varchar2(30);
javaException ORA_JAVA.JOBJECT;
v_BigDecimalObject ORA_JAVA.JOBJECT;
begin
v_javaObject := EmpServicePortClient.new;
v_BigDecimalObject := BigDecimal.new(101);
v_name := EmpServicePortClient.getName(v_javaObject,v_BigDecimalObject);
message(v_name);
exception
WHEN ORA_JAVA.JAVA_ERROR THEN
-- In this case, the error would be
-- Argument 1 can not be null
message(ORA_JAVA.LAST_ERROR,acknowledge);
--Clean up
ORA_JAVA.CLEAR_ERROR;
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
javaException := ORA_JAVA.LAST_EXCEPTION;
-- Print out the Exception by using the toString()
-- Method of the exception Object
message(Exception_.toString(javaException),acknowledge);
-- and clean up
ORA_JAVA.CLEAR_EXCEPTION;
END;
Forms got compiled successfully.
However, while invoking a service by pressing a button, getting following error at message bar:
java.rmi.RemoteException:; nested exception is: HTTP transport error: javaxml.soap.SOAPException: java.security.PrivilegedAction
Is there anything that I have missed in the configuration? or what else is causing it?
Regards,
Preet -
Operation not found error while calling AM methods from managed bean
Hi,
operation not found error while calling AM methods from managed bean.
written a method with two parameters in AM.
exposed the method in AM client interface
in the page bindings added the method in method action ..left empty in the value fields of the parameters.
calling the method from managed bean like below
String userNameVal = (String)userName.getValue();
String passwordVal = (String)password.getValue();
OperationBinding operationBinding =
ADFUtils.findOperation("verifyLogin");
operationBinding.getParamsMap().put("userName",userNameVal);
operationBinding.getParamsMap().put("password",passwordVal);
operationBinding.execute();
i am getting operation verifyLogin not found error.Please suggest me something to do.
Thanks
SatyaHi vlsn,
Can you try with the below code
// in your backing bean
OperationBinding operation = bindings.getOperationBinding("verifyLogin");
//Put your both parameters here
operation.getParamsMap().put("parameter_name1", parameterValue1);
operation.getParamsMap().put("parameter_name2", parameterValue2);
operation.execute();
if (operation.getResult() != null) {
Boolean result = (Boolean) operation.getResult();
and share the result.
regards,
Rajan -
Error while calling stored procedure from Java
Hi Guys,
How are you everybody? I hope everything is goin fine on your side. I have one issue in PL/SQL while calling below stored procedures from Java.
Problem Description: We have a stored procedure PROCEDURE BULK_INSERTS (
V_SESSION_ID_TAB IN T_SESSION_ID_TAB_TYPE,
V_SERVICE_TYPE_TAB IN T_SERVICE_TYPE_TAB_TYPE,
V_SERVICE_LOCATION_TAB IN T_SERVICE_LOCATION_TAB_TYPE,
V_SERVICE_CALL_NAME_TAB IN T_SERVICE_CALL_NAME_TAB_TYPE,
V_SERVICE_CALL_START_TIME_TAB IN T_SERVICE_CALL_ST_TAB_TYPE,
V_SERVICE_CALL_END_TIME_TAB IN T_SERVICE_CALL_ET_TAB_TYPE,
V_SERVICE_CALL_DURATION_TAB IN T_SERVICE_CALL_DUR_TAB_TYPE,
V_STATUS_TAB IN T_STATUS_TAB_TYPE,
V_NOTES_TAB IN T_NOTES_TAB_TYPE
) and we are getting ora errors while calling this stored procedure from java.
All tab types are declared locally, at package level.
Here is error which occur while calling this sp:
{call BULK_PKG.BULK_INSERTS(?,?,?,?,?,?,?,?,?)}
And the parameter types we are using are:
SESSION_ID - NUM_TAB_TYPE
SERVICE_TYPE - VAR_TAB_TYPE
SERVICE_LOCATION - VAR_TAB_TYPE
SERVICE_CALL_NAME - VAR_TAB_TYPE
SERVICE_CALL_START_TIME - DATE_TIME_TAB_TYPE
SERVICE_CALL_END_TIME - DATE_TIME_TAB_TYPE
SERVICE_CALL_DURATION - NUM_TAB_TYPE
STATUS - VAR_TAB_TYPE
NOTES - VAR_TAB_TYPE
And the Exception stack trace is:
ERROR (com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServi
ceCallDAO.java:143)@ExecuteThread: '252' for queue: 'weblogic.kernel.Default') {Error attempting to save collected ESC data}
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:944)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3482)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3856)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1373)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:98)
at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.doBulkInsert(ExternalServiceCallDAO.java:220)
at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServiceCallDAO.java:138)
Please help my guys out of this. I will really appreciate all suggestions and advices.
Thank you everybody.I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
ORA-06512: at line 12
Here is example for my test procedure:
declare
v_session_id_tab SESSION_ID_TAB_TYPE;
v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
v_status_tab STATUS_TAB_TYPE;
v_notes_tab NOTES_TAB_TYPE;
begin
v_session_id_tab(1) := 1;
v_service_type_tab(1) := 'db';
v_service_location_tab(1) := 'local';
v_service_call_name_tab(1) := 'Name of call';
v_service_call_start_time_tab(1) := SYSDATE;
v_service_call_end_time_tab(1) := SYSDATE;
v_service_call_duration_tab(1) := 100;
v_status_tab(1) := 'Z';
v_notes_tab(1) := 'NOTES';
BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
v_service_call_duration_tab, v_status_tab, v_notes_tab);
end;
I declare all types at schema level.
Please give your comments.
Thank you -
Problem with output from report to excel, calling the report from form 10g
Hi everyone, I'm having a problem generating a excel from a report, which is called from a form, I'm using Forms 10g. The problem is this: My report has a variable number of columns. These columns appear according to data obtained from the database, these columns are dates, In vesion 6 excel file generated shows the columns one after another starting in column A1 to column CP. I mean that the dates are correlative. But in version 10g the excel file generated shows the same report starting in column A to column T, only shows the 20 dates correlative corresponding to this columns, the rest of the dates are down the excel sheet in groups of 20 dates, it's something, the file in 6i grows across and in 10g grows down the excel sheet. The report (rdf file) is the same in 6i and 10g, I compiled the 6i version to obtain the 10g version. The excel sheet generated in 10g looks like the report was in pdf format, because PDF format, cuts the report in pages and the file grows down, if I generate the report in PDF format it has the same structure excel file in 10g has. I hope yo can help because I have days trying to solve this but I have no succes. If someone could help I could email the excel files generated in two versions. Here I put the code I use to generate the files in 6i and 10g. I have tried with DESFORMAT=SPREADSHEET in 10g but the result is the same. Thanks for your help. Greetings for all.
Code for version 6i (Works Very well)
PROCEDURE GUARDAREXCEL IS
pl_id ParamList;
nom_rep varchar2(20);
cla_rep varchar2(20);
cod_dis varchar2(4);
nom_arch varchar2(100);
fec date;
BEGIN
pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('tmpdata');
IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
cod_dis := :BK_PARAMETROS.LI_COD_DIS;
END IF;
IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
ELSE
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
:BK_PARAMETROS.TI_COD_CLI:='%';
END IF;
IF :BK_PARAMETROS.CLAS_REP=1 THEN
cla_rep := '001';
ELSE
IF :BK_PARAMETROS.CLAS_REP=2 THEN
cla_rep := '002';
ELSE
IF :BK_PARAMETROS.CLAS_REP=3 THEN
cla_rep := '003';
ELSE
cla_rep := '004';
END IF;
END IF;
END IF;
Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );
select sysdate into fec from dual;
IF :BK_PARAMETROS.TIPO_REP=1 THEN
BEGIN
nom_rep := 'tdvenrli1577.rep';
nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
BEGIN
nom_rep := 'tdvenrli1578.rep';
nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
BEGIN
Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');
nom_rep := 'tdvenrli1576.rep';
nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
ELSE
BEGIN
nom_rep := 'TDVENRLI1545.REP';
nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
END IF;
--Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
standard.commit;
Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
EXCEPTION WHEN Run_Product_Failure THEN
message('Error');
END;
Code for version 10g
PROCEDURE GUARDAREXCEL IS
pl_id ParamList;
nom_rep varchar2(20);
cla_rep varchar2(20);
cod_dis varchar2(4);
nom_arch varchar2(100);
fec date;
--byt12122007.sn
repid REPORT_OBJECT;
vURL VARCHAR2(500);
rep_status VARCHAR2(20);
vJobID VARCHAR2(100);
v_rep VARCHAR2(100);
VAR NUMBER;
w_name_repserv VARCHAR2(30);
--byt1212007.en
BEGIN
--w_name_repserv:=F_OBTIENE_SERVREP;
w_name_repserv:='repserv';
pl_id := Get_Parameter_List('mytmp_params');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('mytmp_params');
IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
cod_dis := :BK_PARAMETROS.LI_COD_DIS;
END IF;
IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
ELSE
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
:BK_PARAMETROS.TI_COD_CLI:='%';
END IF;
IF :BK_PARAMETROS.CLAS_REP=1 THEN
cla_rep := '001';
ELSE
IF :BK_PARAMETROS.CLAS_REP=2 THEN
cla_rep := '002';
ELSE
IF :BK_PARAMETROS.CLAS_REP=3 THEN
cla_rep := '003';
ELSE
cla_rep := '004';
END IF;
END IF;
END IF;
Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
/*Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );*/
select sysdate into fec from dual;
IF :BK_PARAMETROS.TIPO_REP=1 THEN
BEGIN
repid := find_report_object('tdvenrli1577');
--nom_rep := 'tdvenrli1577.rep';
nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1577');
END;
ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
BEGIN
repid := find_report_object('tdvenrli1578');
--nom_rep := 'tdvenrli1578.rep';
nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1578');
END;
ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
BEGIN
repid := find_report_object('tdvenrli1576');
Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');
--nom_rep := 'tdvenrli1576.rep';
nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1576');
END;
ELSE
BEGIN
repid := find_report_object('tdvenrli1545');
--nom_rep := 'TDVENRLI1545.REP';
nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1545');
END;
END IF;
--Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
--Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
standard.commit;
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESNAME,nom_arch);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, 'File');
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'DELIMITED');
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, w_name_repserv);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'paramform=no');
v_rep := RUN_REPORT_OBJECT(repid, pl_id);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
rep_status:= report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
vJobID := SUBSTR(v_rep, INSTR(v_rep, '_', -1)+1);
vURL:='/reports/rwservlet/getjobid'||vJobID||'?'||'server='||w_name_repserv;
END IF;
WEB.SHOW_DOCUMENT(vURL, '_blank');
IF NOT form_success THEN
MESSAGE('Error: PL/SQL held against Button failed to execute');
RAISE FORM_TRIGGER_FAILURE;
END IF;
/*Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
EXCEPTION WHEN Run_Product_Failure THEN
message('Error');*/
END;There are two problems with your VI. First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this: Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition. When you exit the acquire/write to file loop, then close the file. In particular, the opening and the closing of the file should not be inside the loop.
As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus. As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function. Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
Good Luck.
Bob Schor -
Simplest Way 2 Call a report from Forms 10g
Hello,
i am using Oracle 10g & tools 10g too,
What i am trying to do is to call a report from a form...
So one friend told me 2 use a library exists in Folder Forms90 called " rp2rro"on the installed developer10g tools,i am using the following code :
============================================
Begin
PARAM_ID := GET_PARAMETER_LIST(PARAM_NAME);
IF NOT ID_NULL(PARAM_ID) THEN
DESTROY_PARAMETER_LIST('REPORT_PARAMETER');
END IF;
PARAM_ID := CREATE_PARAMETER_LIST(PARAM_NAME);
ADD_PARAMETER(PARAM_ID,'PARAMFORM',TEXT_PARAMETER,'NO');
ADD_PARAMETER(PARAM_ID,'COPIES',TEXT_PARAMETER,:COPIES);
ADD_PARAMETER(PARAM_ID,'P_DISPLAY',TEXT_PARAMETER,:DESTYPE);
ADD_PARAMETER(PARAM_ID,'DESFORMAT',TEXT_PARAMETER,'pdf');
ADD_PARAMETER(PARAM_ID,'P_DATA_TYPE',TEXT_PARAMETER,:PERIOD_MONTH);
ADD_PARAMETER(PARAM_ID,'P_MATERIAL_CODE',TEXT_PARAMETER,:MATERIAL_DESC);
ADD_PARAMETER(PARAM_ID,'P_DATE_FROM',TEXT_PARAMETER,:DATE_FROM);
ADD_PARAMETER(PARAM_ID,'P_DATE_TO',TEXT_PARAMETER,:DATE_TO);
ADD_PARAMETER(PARAM_ID,'MONTH_ID',TEXT_PARAMETER,:MONTH_ID);
ADD_PARAMETER(PARAM_ID,'FIN_YEAR_CODE',TEXT_PARAMETER,:FIN_YEAR_CODE);
rp2rro.rp2rro_run_product(REPORTS,'Report_name',SYNCHRONOUS, RUNTIME, FILESYSTEM, PARAM_ID, NULL);
END;
The problem is that i am receiving many errors as:
frm-41219:Can't find report invalid id
frm-47023:No such parameter named rp2rroDesformat exist in form my_form_name
frm-40105:Unable 2 resolve reference to item parameter.rp2rrodesformat
can any kind guy help me pls it's urgent i have no time 2 even read a document 4 it pls help me..!!??
Regards,
Abdetu..Hi Abdetu,
Here is a procedure and simple call of the procedure witch Iam using successfully now.
PROCEDURE INVOKE_REPORT
url_and_server in VARCHAR2,
file_name in VARCHAR2,
des_type in NUMBER,
des_name in VARCHAR2,
des_format in VARCHAR2,
param_list in PARAMLIST
IS
l_report_id REPORT_OBJECT := FIND_REPORT_OBJECT('QMSREP');
l_report_job_id VARCHAR2(100);
l_userid VARCHAR2(200) := GET_APPLICATION_PROPERTY(USERNAME) || '/' ||
GET_APPLICATION_PROPERTY(PASSWORD) || '@' ||
GET_APPLICATION_PROPERTY(CONNECT_STRING);
l_report_url VARCHAR2(200) := substr(url_and_server, 0, instr(url_and_server, ',') - 1);
l_report_server VARCHAR2(100) := substr(url_and_server, instr(url_and_server, ',') + 1);
l_vcStatus VARCHAR2(100);
l_vcJob VARCHAR2(100);
BEGIN
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_COMM_MODE, ASYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_EXECUTION_MODE, RUNTIME);
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_SERVER, l_report_server);
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_FILENAME, lower(file_name));
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_DESTYPE, des_type);
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_DESNAME, des_name);
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_DESFORMAT, des_format);
SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_OTHER, 'paramform=no userid='||l_userid);
-- invoke the report (currently we don't use the returned ID)
l_report_job_id := RUN_REPORT_OBJECT(l_report_id, param_list);
l_vcstatus := Report_Object_Status(l_report_job_id);
l_vcJob := substr(l_report_job_id, instr(l_report_job_id ,'_', 1 , 3 ) + 1);
WHILE l_vcstatus in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
l_vcstatus := Report_Object_Status(l_report_job_id);
END LOOP ;
if l_vcStatus = 'FINISHED' then
Web.Show_Document('http://'||l_report_url||'/reports/rwservlet/getjobid'||l_vcJob||'?server='||l_report_server,'_blank');
else
message('Failed - Status was :'||l_vcStatus);
end if;
END;
INVOKE_REPORT ('172.198.1.1:7777,rep_SRV'
,'MYREP.RDF'
,cache
,'htmlcss'
,l_par_list_id
hope this helps,
Alireza -
Error while calling a procedure from ESB
Hi,
I am calling a procedure from ESB using DB adapter. and in the routing rules i am mapping the i/p values for schema to procedure input variables using mappings(transformation) but the values are going as null to the procedure call.
Please help me out.
The exception follows...
An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/ESB-Issues_issue3/db3.wsdl [ db3_ptt::db3(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'db3' failed due to: Error while trying to prepare and execute an API.
An error occurred while preparing and executing the SYSTEM.INSERT_ISSUE_PROC API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."ISSUES"."ISSUE_NAME")
ORA-06512: at "SYSTEM.INSERT_ISSUE_PROC", line 16
ORA-06512: at line 1
[Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."ISSUES"."ISSUE_NAME")
ORA-06512: at "SYSTEM.INSERT_ISSUE_PROC", line 16This is likely being caused by a problem that we've seen a number of times. You'll have namespace issues and problems with NULLs if your JDev is 10.1.3.1 and SOA is 10.1.3.3 (or vice-versa). You MUST synchronize JDev 10.1.3.3 (or higher) with SOA 10.1.3.3 (or higher). It doesn't matter if you mix 10.1.3.3 and 10.1.3.4. You just need to get away from 10.1.3.1.
-
Error while calling stored procedure from apps adapter
Hi,
I am calling Oracle applications standard api to create ar invoice (XX_BPEL_TEST_APPS_ADAPTER_PKG is the name of wrapper package created by adapter) from apps adapter but getting the following error:
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'test_apps_adapter' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG.AR_INVOICE_API_PUB$CREATE_SIN API. An error occurred while preparing and executing the APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG.AR_INVOICE_API_PUB$CREATE_SIN API. Cause: java.sql.SQLException: ORA-06531: Reference to uninitialized collection ORA-06512: at "APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG", line 199 ORA-06512: at "APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG", line 909 ORA-06512: at line 1 Check to ensure that the API is defined in the database and that the parameters match the signature of the API. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-6531" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
Just wondering if anyone has faced a similar problem?I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
ORA-06512: at line 12
Here is example for my test procedure:
declare
v_session_id_tab SESSION_ID_TAB_TYPE;
v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
v_status_tab STATUS_TAB_TYPE;
v_notes_tab NOTES_TAB_TYPE;
begin
v_session_id_tab(1) := 1;
v_service_type_tab(1) := 'db';
v_service_location_tab(1) := 'local';
v_service_call_name_tab(1) := 'Name of call';
v_service_call_start_time_tab(1) := SYSDATE;
v_service_call_end_time_tab(1) := SYSDATE;
v_service_call_duration_tab(1) := 100;
v_status_tab(1) := 'Z';
v_notes_tab(1) := 'NOTES';
BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
v_service_call_duration_tab, v_status_tab, v_notes_tab);
end;
I declare all types at schema level.
Please give your comments.
Thank you -
Getting error while calling AME api from the page
Hi,
I am calling ame api ame_api2.getallapprovers7 from our custom page.I have written following code-
public void getapprovers(String transactionid)
String OutError = "";
ArrayList al = new ArrayList();
OADBTransaction trans = getOADBTransaction();
String insStmnt = "BEGIN " +
"ame_api2.getAllApprovers7(applicationIdIn => :1,transactionTypeIn =>:2,transactionIdIn =>:3,"+
"l_processYN =>:4,approversOut =>:5); " +
"END;";
OracleCallableStatement stmt = (OracleCallableStatement)trans.createCallableStatement(insStmnt, 1);
try
stmt.setString(1, "800");
stmt.setString(2, "XXXXCWKAPP");
stmt.setString(3, transactionid);
stmt.registerOutParameter(4, OracleTypes.VARCHAR);
stmt.registerOutParameter(5, OracleTypes.ARRAY,"XXXX_APPROVER_TABLE");
stmt.execute();
// OAExceptionUtils.checkErrors as per PLSQL API standards
OAExceptionUtils.checkErrors(trans);
ARRAY arrayError = stmt.getARRAY(5);
Datum[] arr = arrayError.getOracleArray();
for (int i = 0; i < arr.length; i++)
oracle.sql.STRUCT os = (oracle.sql.STRUCT)arr;
Object[] a = os.getAttributes();
System.out.println("Column:" + a[0] + " Value:" + a[1]);
//OutError = (String)a[1];
//al.add(new OAException(OutError, OAException.ERROR));
stmt.close();
catch(SQLException sqle){
try { stmt.close(); }
catch (Exception e) {;}
throw OAException.wrapperException(sqle);
if (OutError != null)
// OAException.raiseBundledOAException(al);
4 and 5th parameters are out parameters and 5th parameter provides the approver records and it should have the same data type as ame_util.approversTable2. I have created this table type explicitly in oracle by the name XXXX_APPROVER_TABLE but i am getting the error while running the page "java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "APPS.ETHR_APPROVER_TABLE"". I requirement is to take the 5th parameter in ame_util.approversTable2 data type.
Please help me urgently.
Thanks
AshishHi Kumar,
The ETHR_APPROVER_TABLE is custom pl sql indexed table that I have created.following are the parameters of api-
procedure getAllApprovers7(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2);
i need a out variable of type ame_util.approversTable2 so get the values.
I have changed the code and now getting the following error-
java.sql.SQLException: ORA-03115: unsupported network datatype or representation
I have only changed this statement.
stmt.registerOutParameter(5,OracleTypes.PLSQL_INDEX_TABLE);//,"XXXX_APPROVAL_TBL");
Edited by: user5756777 on Jul 13, 2009 4:17 AM -
How to Check the report is Finished while calling a report from Forms 6i
Dear All,
I am Calling a report from oracle forms 6i, after runing report in " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"
I need to copy the pdf to store it in another place once the report is generated.
My Problem is : that i want ot Check first the report has generated after " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);" is executed ? How to check the report is generated ot not?
As i tried to use the below procedure after "Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"" but his does not work... nothing happens
{code}
PROCEDURE FPC_COPY_REPORT (p_report_name varchar2) IS
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
lv_id varchar2(1000);
BEGIN
repid := find_report_object('AMTP_995.RDF');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed'); message('Report Completed');
else
message('Error when running report.'); message('Error when running report.');
end if;
END;
{code}
Any Helpactually My code is this:
declare
ln_alert number;
pl_id ParamList;
lv_report_name varchar2(10000);
lv_path varchar2 (100) := 'C:\';
lv_shared_path varchar2(1000);
lv_copy_file varchar2(10000);
cursor cr_dir_path IS
select v_dir_path
from md_directory
where v_dir_code ='SHR';
lv_file_name varchar2(1000);
BEGIN
open cr_dir_path;
fetch cr_dir_path into lv_shared_path;
close cr_dir_path;
lv_report_name := lv_path||:fn_cntl.nb_ref_no||'_M08600000_'||to_char(sysdate,'YYYYMMDD-HHmmss')||'.pdf';
if ffn_check_fields THEN
pl_id := Get_Parameter_List('LAI');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('LAI');
if :fn_cntl.nb_report_name ='MMAT_REPORT'
then
if :fn_cntl.nb_report_desc ='EXPORT'
then
Add_Parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'DESTYPE', TEXT_PARAMETER,'File');
Add_Parameter(pl_id, 'DESNAME', TEXT_PARAMETER, lv_report_name);
Add_Parameter(pl_id, 'DESFORMAT',TEXT_PARAMETER,'PDF');
Add_Parameter(pl_id, 'p_mat_no',TEXT_PARAMETER, :fn_cntl.nb_mat_no);
Add_Parameter(pl_id, 'p_ref_no', TEXT_PARAMETER, :fn_cntl.nb_ref_no);
Add_Parameter(pl_id, 'p_verified_by',TEXT_PARAMETER, user);
Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);
DECLARE
repid REPORT_OBJECT; v_rep VARCHAR2(100); rep_status varchar2(20);BEGIN
/* REP_OBJ= REPORT OBJECT CREATED UNDER REPORT NODE AT FORM */
repid := find_report_object('MMAT_REPORT'); v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed'); message('Report Completed');
--copy_report_object_output(v_rep,'c:\local.pdf');
-- host('netscape c:\tlocal.pdf');
else message('Error when running report.');
message('Error when running report.');
end if;
END;
end if;
end if;
if :fn_cntl.nb_report_desc ='EXPORT'
then
error_handler('This report will be Storde in ' ||lv_report_name||' and '||lv_shared_path|| ' Location',3);
lv_copy_file :='copy '||' "'||lv_report_name||'" "'||lv_shared_path||'"';
host(lv_copy_file,no_screen);
error_handler('Report Has been Generated Sucessfully.',3);
end if;
end if;
END;I will try first the another solution you have replied perviously... and will let you no the results... thanks a lot... -
Getting the error while calling the report from oaf page
Dear all
when i am calling the report from oaf page
if (pageContext.getParameter("PrintPDF") != null)
DataObject sessionDictionary =
(DataObject)pageContext.getNamedDataObject("_SessionParameters");
HttpServletResponse response =
(HttpServletResponse)sessionDictionary.selectValue("HttpServletResponse");
try
ServletOutputStream os = response.getOutputStream();
// Set the Output Report File Name and Content Type
String contentDisposition = "attachment;filename=EmpReport.pdf";
response.setHeader("Content-Disposition", contentDisposition);
response.setContentType("application/pdf");
// Get the Data XML File as the XMLNode
XMLNode xmlNode = (XMLNode)am.invokeMethod("getEmpDataXML");
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
xmlNode.print(outputStream);
ByteArrayInputStream inputStream =
new ByteArrayInputStream(outputStream.toByteArray());
ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
//Generate the PDF Report.
TemplateHelper.processTemplate(((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
"XXCRM", "XXCRM_EMP",
((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
inputStream,
TemplateHelper.OUTPUT_TYPE_PDF, null,
pdfFile);
// Write the PDF Report to the HttpServletResponse object and flush.
byte[] b = pdfFile.toByteArray();
response.setContentLength(b.length);
os.write(b, 0, b.length);
os.flush();
os.close();
} catch (Exception e)
response.setContentType("text/html");
throw new OAException(e.getMessage(), OAException.ERROR);
pageContext.setDocumentRendered(false);
i am getting the error java.classcastexception at this line
DataObject sessionDictionary =
(DataObject)pageContext.getNamedDataObject("_SessionParameters");
regards
Sreekanthcheck if you have import oracle.cabo.ui.data.DataObject; in your import statement.
--Prasanna -
Error while calling an RFC from R/3
Hi all,
I am new to webdynpro. I am calling a RFC from R/3/.the code is like this.
Zhr_Fm_Loan_Input input = new Zhr_Fm_Loan_Input();
wdContext.nodeZhr_Fm_Loan_Input().bind(input);
input.setUsrid(wdContext.currentContextElement().getEmpnoa());
try
wdContext.nodeZhr_Fm_Loan_Input().currentZhr_Fm_Loan_InputElement().modelObject().execute();
catch(Exception e)
wdComponentAPI.getMessageManager().reportException("Exception "+e,true);
In the output i am getting an eror Exception com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException.
Can anybody explain the error.
Regards,
RajeshHi Rajesh
Kindly check ur BAPI once from Backend, i hope there is no other mandatory field required apart from Usrid.
I hope BAPI doesnot have any mandatory Structure in it. in case it has , u have to pass that also..
Try printing this context also ..wdContext.currentContextElement().getEmpnoa().. i hope it is not returning a null.
wdContext.nodeZfm_Input().nodeOutput().invalidate(); // Add this line after execute statement
Regards
Puneet -
Error While Querying DB Link from Oracle 10g to Postgres 8.2
Hi,
I have installed unixodbc 2.3.1, postgres odbc driver (psqlodbc-07.03) and dg4odbc 11.2
On querying : select sysdate from dual@dblink_postgresql, the following error occurs:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found {01000}
ORA-02063: preceding 2 lines from DBLINK_POSTGRES
Similar error appears in the trace file as well.
[unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a'
$ isql -v postgresql postgres postgres@2012
[01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found
[ISQL]ERROR: Could not SQLConnect
However the file is present in the location and has no permission related problems.
$ pwd
/oracle/psqlodbc/lib
$ ls -lrt
total 2952
-rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
-rw-r--r-- 1 oracle oinstall 731419 Mar 25 15:28 libpsqlodbc.a
-rw-r--r-- 1 oracle oinstall 12215 Mar 25 22:11 win_md5.o
-rw-r--r-- 1 oracle oinstall 18100 Mar 25 22:11 options.o
-rw-r--r-- 1 oracle oinstall 13196 Mar 25 22:11 misc.o
-rw-r--r-- 1 oracle oinstall 4234 Mar 25 22:11 lobj.o
-rw-r--r-- 1 oracle oinstall 122442 Mar 25 22:11 info.o
-rw-r--r-- 1 oracle oinstall 26464 Mar 25 22:11 execute.o
-rw-r--r-- 1 oracle oinstall 22070 Mar 25 22:11 environ.o
-rw-r--r-- 1 oracle oinstall 8633 Mar 25 22:11 drvconn.o
-rw-r--r-- 1 oracle oinstall 83758 Mar 25 22:11 convert.o
-rw-r--r-- 1 oracle oinstall 62529 Mar 25 22:11 connection.o
-rw-r--r-- 1 oracle oinstall 5685 Mar 25 22:11 columninfo.o
-rw-r--r-- 1 oracle oinstall 19724 Mar 25 22:11 bind.o
-rw-r--r-- 1 oracle oinstall 3768 Mar 25 22:11 tuplelist.o
-rw-r--r-- 1 oracle oinstall 2816 Mar 25 22:11 tuple.o
-rw-r--r-- 1 oracle oinstall 36770 Mar 25 22:11 statement.o
-rw-r--r-- 1 oracle oinstall 10490 Mar 25 22:11 socket.o
-rw-r--r-- 1 oracle oinstall 74140 Mar 25 22:11 results.o
-rw-r--r-- 1 oracle oinstall 22686 Mar 25 22:11 qresult.o
-rw-r--r-- 1 oracle oinstall 1977 Mar 25 22:11 psqlodbc.o
-rw-r--r-- 1 oracle oinstall 25893 Mar 25 22:11 pgtypes.o
-rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 pgapi30.o
-rw-r--r-- 1 oracle oinstall 34071 Mar 25 22:11 parse.o
-rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 odbcapi30.o
-rw-r--r-- 1 oracle oinstall 41540 Mar 25 22:11 odbcapi.o
-rw-r--r-- 1 oracle oinstall 11601 Mar 25 22:11 multibyte.o
-rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 info30.o
-rw-r--r-- 1 oracle oinstall 5972 Mar 25 22:11 gpps.o
-rw-r--r-- 1 oracle oinstall 37546 Mar 25 22:11 dlg_specific.o
My odbc.ini and init4dg4odbc looks like below:
$ pg odbc.ini
[postgresql]
Description = Test to Postgres
Driver = /oracle/psqlodbc/lib/libpsqlodbc.a
Trace = Yes
TraceFile = postgres.log
Database = postgres
Servername = TCLDSAPORTUAT
UserName = postgres
Password = postgres@2012
Port = 5432
Protocol = TCP
ReadOnly = Yes
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
$ pg initdg4odbc.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = postgresql
HS_FDS_TRACE_LEVEL = DEBUG
HS_FDS_SHAREABLE_NAME = /oracle/unixodbc64/lib/libodbc.so
# ODBC specific environment variables
set ODBCINI=/oracle/unixodbc64/etc/odbc.ini
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
I found similar threads in the forum but could not find solution for this problem.
Please help to resolve this issue.
Thanks,
Akanksha
Edited by: 996208 on Mar 26, 2013 5:35 AMHi Mike,
I used the truss option for diagnosis, the output is really long and shows the same error at the end of execution:
$truss isql -v postgresql postgres postgres@2012
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
access("/usr/lib/nls/msg/en_US/execerr.cat", 0) = 0
_getpid() = 27262980
kopen("/usr/lib/nls/msg/en_US/execerr.cat", O_RDONLY) = 3
kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
kfcntl(3, F_SETFD, 0x0000000000000001) = 0
kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
kread(3, "\0\001 ù\001\001 I S O 8".., 4096) = 4096
lseek(3, 0, 1) = 4096
lseek(3, 0, 1) = 4096
lseek(3, 0, 1) = 4096
_getpid() = 27262980
lseek(3, 0, 1) = 4096
_getpid() = 27262980
lseek(3, 0, 1) = 4096
_getpid() = 27262980
lseek(3, 0, 1) = 4096
lseek(3, 4639, 0) = 4639
kread(3, "\t 0 5 0 9 - 1 9 4 E x".., 4096) = 1686
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
getuidx(4) = 207
getuidx(2) = 207
getuidx(1) = 207
getgidx(4) = 203
getgidx(2) = 203
getgidx(1) = 203
kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
kioctl(1, 22528, 0x0000000000000000, 0x0000000000000000) = 0
[01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/psqlodbc.o' : file not found
kwrite(1, " [ 0 1 0 0 0 ] [ u n i x".., 99) = 99
[ISQL]ERROR: Could not SQLConnect
kwrite(2, " [ I S Q L ] E R R O R :".., 34) = 34
kfcntl(1, F_GETFL, 0x0000000010DF0051) = 67110914
kfcntl(2, F_GETFL, 0x0000000010DF0051) = 67110914
_exit(1)
Do I need to install postgres software also?
While installing postgres odbc driver in /oracle/psqlodbc only two folders were created viz. lib and share
In lib folder two files were created viz. psqlodbc.la and libpsqlodbc.a
And everybody on the net seems to refer psqlodbc.so in the "Driver = " parameter
Today, I extracted the libpsqlodbc.a by using ar -X 64 -xv libpsqlodbc.a again, still no file with .so has been created.
$ ls -lrt
total 2952
-rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
-rwxr-xr-x 1 oracle oinstall 731419 Mar 28 13:51 libpsqlodbc.a
-rw-r--r-- 1 oracle oinstall 12215 Apr 01 13:50 win_md5.o
-rw-r--r-- 1 oracle oinstall 3768 Apr 01 13:50 tuplelist.o
-rw-r--r-- 1 oracle oinstall 2816 Apr 01 13:50 tuple.o
-rw-r--r-- 1 oracle oinstall 36770 Apr 01 13:50 statement.o
-rw-r--r-- 1 oracle oinstall 10490 Apr 01 13:50 socket.o
-rw-r--r-- 1 oracle oinstall 74140 Apr 01 13:50 results.o
-rw-r--r-- 1 oracle oinstall 22686 Apr 01 13:50 qresult.o
-rw-r--r-- 1 oracle oinstall 1977 Apr 01 13:50 psqlodbc.o
-rw-r--r-- 1 oracle oinstall 25893 Apr 01 13:50 pgtypes.o
-rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 pgapi30.o
-rw-r--r-- 1 oracle oinstall 34071 Apr 01 13:50 parse.o
-rw-r--r-- 1 oracle oinstall 18100 Apr 01 13:50 options.o
-rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 odbcapi30.o
-rw-r--r-- 1 oracle oinstall 41540 Apr 01 13:50 odbcapi.o
-rw-r--r-- 1 oracle oinstall 11601 Apr 01 13:50 multibyte.o
-rw-r--r-- 1 oracle oinstall 13196 Apr 01 13:50 misc.o
-rw-r--r-- 1 oracle oinstall 4234 Apr 01 13:50 lobj.o
-rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 info30.o
-rw-r--r-- 1 oracle oinstall 122442 Apr 01 13:50 info.o
-rw-r--r-- 1 oracle oinstall 5972 Apr 01 13:50 gpps.o
-rw-r--r-- 1 oracle oinstall 26464 Apr 01 13:50 execute.o
-rw-r--r-- 1 oracle oinstall 22070 Apr 01 13:50 environ.o
-rw-r--r-- 1 oracle oinstall 8633 Apr 01 13:50 drvconn.o
-rw-r--r-- 1 oracle oinstall 37546 Apr 01 13:50 dlg_specific.o
-rw-r--r-- 1 oracle oinstall 83758 Apr 01 13:50 convert.o
-rw-r--r-- 1 oracle oinstall 62529 Apr 01 13:50 connection.o
-rw-r--r-- 1 oracle oinstall 5685 Apr 01 13:50 columninfo.o
-rw-r--r-- 1 oracle oinstall 19724 Apr 01 13:50 bind.o
Thanks,
Akanksha -
Error while calling java program from ABAP
Hi Experts,
We are trying for RFC inbound scenario.
We followed the below blog
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
We are working with SAP JCO 3.0.2
We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
'STFC_CONNECTION' could not be found in the server repository.
If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
'RFCPING' could not be found in the server repository.
We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
Please help us in resolving this issue.
Thanks
PrincePabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree -
Retrieve image file from FORMS 10G using BLOB
Dear all,
i inserted one record in a table for the following procedure.
Create Or Replace Procedure Blob_Xl Is
l_blob Blob;
l_bfile Bfile;
Begin
Insert Into LOB_TABLE Values ( 'TEST1', Empty_Blob() )
Returning BLOBDATA Into l_blob;
l_bfile := Bfilename( 'TEST1', 'I.JPG');
dbms_lob.fileopen( l_bfile,dbms_lob.file_readonly );
dbms_lob.loadfromfile( l_blob, l_bfile, dbms_lob.getlength( l_bfile ) );
dbms_lob.fileclose( l_bfile );
Commit;
End Blob_Xl;
after that
record also inserted, i check thro count.
i try to retrieve that image from that table for using following procedure, in that procedure i called from one button in forms 10g and wrote in when button pressed , when i clicked it wont show any images.
where i am wrong?
Create Or Replace Procedure get_img As
vblob Blob;
buffer Raw(32000);
buffer_size Integer := 32000;
offset Integer := 1;
Length Number;
Begin
owa_util.mime_header('image/JPG');
Select BLOBDATA Into vblob From LOB_TABLE Where No = 'TEST1';
Length := dbms_lob.getlength(vblob);
While offset < Length Loop
dbms_lob.Read(vblob, buffer_size, offset, buffer);
htp.prn(utl_raw.cast_to_varchar2(buffer));
offset := offset + buffer_size;
End Loop;
Exception
When Others Then
htp.p(Sqlerrm);
End;
/hi
try something like this for retrieve.May it helps u.
DECLARE
directions CLOB;
directions_1 VARCHAR2(300);
directions_2 VARCHAR2(300);
chars_read_1 BINARY_INTEGER;
chars_read_2 BINARY_INTEGER;
offset INTEGER;
BEGIN
--Retrieve the LOB locator inserted previously
SELECT falls_directions
INTO directions
FROM waterfalls
WHERE falls_name='Munising Falls';
--Begin reading with the first character
offset := 1;
--Attempt to read 229 characters of directions, chars_read_1 will
--be updated with the actual number of characters read
chars_read_1 := 229;
DBMS_LOB.READ(directions, chars_read_1, offset, directions_1);
--If we read 229 characters, update the offset and try to
--read 255 more.
IF chars_read_1 = 229 THEN
offset := offset + chars_read_1;
chars_read_2 := 255;
DBMS_LOB.READ(directions, chars_read_2, offset, directions_2);
ELSE
chars_read_2 := 0;
directions_2 := '';
END IF;
--Display the total number of characters read
DBMS_OUTPUT.PUT_LINE('Characters read = ' ||
TO_CHAR(chars_read_1+chars_read_2));
--Display the directions
DBMS_OUTPUT.PUT_LINE(directions_1);
DBMS_OUTPUT.PUT_LINE(directions_2);
END;
sarah
Edited by: S@R@h on Oct 7, 2009 11:29 PM
Maybe you are looking for
-
Add number of week ...
.. to the small calendar that can be opened in every date field would be just a small change. Business worlds - at least ours - is always talking in week numbers. Thanks Franz
-
Tiger User files to new iMac via enet or backup drive?
I'm completely new to Leopard. My new (refurb) iMac 2.66 from Apple is bundled with SL. All I want from the old Powerbook/Tiger User files are iTunes library files, images folders in Pictures and Docs. No need for needwork settings, will be going to
-
hi,all. i write a chat server use java socket. now is more than 2000 users connect to my server. but too many user make the chat message speed slow. now my server is open one port to listen the client connection. who can tell me if i change my server
-
I have purchased an itunes gift voucher through itunes, but i have not yet recieved it. How long do they take to come through?? What do I do if it doesn't come??
-
Reg:Funtional Design or specification
Hi All, Can i know the steps to be followed to prepare the Fucntional Design for a NEW SAP implementation. Thanks sasikanth