Problem with Stored Procedure and inout parameter and jdbc-odbc bridge
create or replace procedure test_proc( para in out number) as
begin
if para = 1 then
para := 11111;
else
para := 22222;
end if;
end;
public static void main(String args[]) throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:test3";
String uid = "scott";
String pwd = "tiger";
Connection conn = DriverManager.getConnection(url,uid,pwd);
CallableStatement cstmt = conn.prepareCall("{call test_proc(?)}");
cstmt.registerOutParameter(1,Types.INTEGER);
cstmt.setInt(1,1);
cstmt.execute();
System.out.println("para = " + cstmt.getInt(1));
cstmt.close();
conn.close();
I get the following errors:
Exception in thread "main" java.lang.NumberFormatException:
at java.lang.Integer.parseInt(Integer.java:426)
at java.lang.Integer.<init>(Integer.java:540)
at sun.jdbc.odbc.JdbcOdbcCallableStatement.getInt(JdbcOdbcCallableStatement.java:385)
at test_proc.main(test_proc.java:11)
How can i get the correct result: 1111
Note: The Oracle jdbc driver can gets the correct result.
Pls help me! Thanks!
Hello,
I presume you have created the stored procedure with an INOUT parameter?
Similar Messages
-
Problem with Stored Procedure exection in Sender and Receiver side of JDBC
Hi All,
I am facing problem while executing Stored Procedures using sender and receiver sides of JDBC adapter.
Here is my SP in Oracle DB :
PROCEDURE EMP
( ID IN VARCHAR2,NAME IN VARCHAR2,PROCESSED IN VARCHAR2 ) AS
BEGIN
INSERT INTO EMPLOYEE VALUES (ID, NAME, PROCESSED);COMMIT;END EMP;
Now I want to execute this SP using sender JDBC channel and receiver JDBC channel.
Can anyone please help me executing this SP?
Regards,
SooryaHi Soorya,
The receiver Data type should be like this:
<StatementName>
<storedProcedureName action=u201D EXECUTEu201D>
<table>realStoredProcedureeName</table>
<param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
</storedProcedureName >
</StatementName>
Check the link http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
Which DB are you using?? The sender structure will be like
<resultset>
<row>
<field1></field1>
<field2></field2>
<field3></ field3>
</row>
</resultset>
Search SDN you will get lot of examples
Regards
Suraj -
Post Author: Ranjith.403
CA Forum: General
Hi,
Am new to crystal reports with stored procedures
am created a report using a stored procedure in oracle. In that Stored Procedure am Using a temporary table.
After inserting values into the table am assigning to ref cursor.
Refcursor having fields like item,onhandstock,purchase rate
This report working fine in oracle version 9.2.0.1.0 where comes to oracle version 9.2.0.8.0 it's giving the varchar values correctly.
The Number values are showing as 0.
Help me to solve it.
Thanks in Advance,
RanjithTry modularising this large procedure into smaller procedures and functions, and determine which part is causing you trouble.
-
Problem with stored procedure in DB2
Hi,
Rigth now im havin a little problem trying to CALL a DB2 SP
I have a DB2 SP, something like this:
CREATE PROCEDURE ordenes.XXMOR_GuardaEncabezado
in p_ORDID INTEGER,
in p_ADVID CHAR (6),
in p_ACCTHDRID CHAR (6),
in p_STNID CHAR (6),
in p_ORDTYP SMALLINT,
in p_STRDT varchar(10),
in p_EDT char(10),
in p_MCONTID CHAR (16),
in p_AGYESTNUM CHAR (20),
IN p_PRDID1 CHAR(4),
in p_RTCRD CHAR (6),
in p_USRFLD1 CHAR (6),
in p_USRFL10 SMALLINT,
in p_TOTSPTORD INTEGER,
in p_CMT char(136),
in p_ROTID CHAR(20),
in p_Aux1 varchar(15),
in p_Aux2 varchar(15),
in p_Aux3 varchar(15),
in p_Aux4 varchar(15),
in p_Aux5 varchar(15),
out o_ORDID varchar(15)
And i calling the SP from my AppModuleImpl java class like this:
getDBTransaction().createStatement(0).getConnection().prepareCall("CALL ordenes.XXMOR_Ords(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
i am using this convention to pass the parameters:
Integer = setInt
Smallint = setShort
Char and Varchar = setString
and getString for the output:
But i only recibe this exception everytime i try to run the SP: java.sql.SQLException: Parameter type not valid.
Can anyone help me ! ?
Ty, regards from Mexico.I am using Stored procedure and that is working fine in Oracle
This is my XI Request structure :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:read_PROC_GET_ACTIVE_ESIIDS xmlns:ns0="http://reliant.com/xi/BMFR2">
- <statement>
- <PROC_GET_ACTIVE_ESIIDS action="EXECUTE">
<table>TCS.PKG_BMF_MANAGE_SERVICE_DATA.PROC_GET_ACTIVE_MF_ESIIDS</table>
<in_bmf_partner_id isInput="true" type="VARCHAR">994</in_bmf_partner_id>
<in_esids isInput="true" type="CLOB">1008901001155950587100:1008901001155950545100:1008901001155950671100:1008901001155950114100</in_esids>
</PROC_GET_ACTIVE_ESIIDS>
</statement>
</ns0:read_PROC_GET_ACTIVE_ESIIDS>
This is oracle Stored procedure signature :
PROCEDURE PROC_GET_ACTIVE_ESIIDS
in_bmf_partner_id IN kss_activity_stg_curr_stat.BMF_PARTNER_ID%TYPE,
in_esids IN CLOB,
out_recordset OUT sys_refcursor
Let me know if you need any further information.
Thanks,
Hetal -
Probleme with stored procedure in oracle 10 g
I create a stored procedure for archiving successfully compile but when I select t_sql_statement i have 0 rows :( :(
create or replace
PROCEDURE p_archive_test(piv_owner varchar2)
is
lv_stmt varchar2(2000) := 'insert /*+ append */ into TABLE1 (COLUMNS)
select INS_COLUMNS
from TABLE2 tab2@db1
where not exists (select null
from TABLE1 tab1
where PKCOLUMNS
cursor c_tab is
select tab.table_name,'ERR$_'||tab.table_name ERR_TABLE
from all_tables tab
where tab.owner = piv_owner
-- and tab.table_name = 'action'
--order by atb.TABLE_ORDER
-- For each table get the primary key columns
cursor c_pk(civ_table_name in all_tables.TABLE_NAME%type)
is
select acl.COLUMN_NAME
from all_cons_columns acl
,all_constraints acn
where acn.OWNER = piv_owner
and acn.CONSTRAINT_TYPE = 'P'
and acn.TABLE_NAME = civ_table_name
and acl.OWNER = acn.OWNER
and acl.TABLE_NAME = acn.table_name
and acl.CONSTRAINT_NAME = acn.CONSTRAINT_NAME
order by acl.POSITION;
-- For each table get the corresponding table columns names
cursor c_ins_cols(civ_table_name in all_tab_columns.TABLE_NAME%type)
is
select 'tab2.'||atc.COLUMN_NAME column_name
from all_tab_columns atc
where atc.OWNER = piv_owner
and atc.TABLE_NAME = civ_table_name
order by atc.COLUMN_ID;
-- For each table get the columns names excluding the primary key columns
cursor c_upd_cols(civ_table_name in all_tab_columns.TABLE_NAME%type)
is
select 'tab1.'||atc.COLUMN_NAME||'=tab2.'||atc.column_name column_name
from all_tab_columns atc
where atc.OWNER = piv_owner
and atc.TABLE_NAME = civ_table_name
and not exists (select 1
from all_cons_columns acl
,all_constraints acn
where acl.OWNER = atc.owner
and acl.TABLE_NAME = atc.TABLE_NAME
and acl.column_name = atc.column_name
and acn.OWNER = acl.OWNER
and acn.TABLE_NAME = acl.TABLE_NAME
and acn.constraint_type = 'P')
order by atc.COLUMN_ID;
-- For each table get the columns names
cursor c_cols(civ_table_name in all_tab_columns.COLUMN_NAME%type)
is
select
--'tab1.'||
atc.COLUMN_NAME column_name
from all_tab_columns atc
where atc.owner = piv_owner
and atc.TABLE_NAME = civ_table_name
order by atc.COLUMN_ID;
lv_cols varchar2(4000);
lv_pk_cols varchar2(4000);
lv_ins_cols varchar2(4000);
lv_upd_cols varchar2(4000);
BEGIN
for r_tab in c_tab
loop
lv_cols := '';
lv_pk_cols := '';
lv_ins_cols := '';
lv_upd_cols := '';
for r_pk in c_pk(civ_table_name => r_tab.table_name)
loop
lv_pk_cols := lv_pk_cols||'tab1.'||r_pk.column_name||'=tab2.'||r_pk.column_name||' and ';
end loop r_pk_loop;
lv_pk_cols := substr(str1 => lv_pk_cols
,pos => 1
,len => length(ch => lv_pk_cols) - 5);
for r_ins_cols in c_ins_cols(civ_table_name => r_tab.table_name)
loop
lv_ins_cols := lv_ins_cols||r_ins_cols.column_name||',';
end loop r_ins_cols_loop;
lv_ins_cols := substr(str1 => lv_ins_cols
,pos => 1
,len => length(ch => lv_ins_cols) - 1);
for r_upd_cols in c_upd_cols(civ_table_name => r_tab.table_name)
loop
lv_upd_cols := lv_upd_cols||r_upd_cols.column_name||',';
end loop r_upd_cols_loop;
lv_upd_cols := substr(str1 => lv_upd_cols
,pos => 1
,len => length(ch => lv_upd_cols) - 1);
for r_cols in c_cols(civ_table_name => r_tab.table_name)
loop
lv_cols := lv_cols||r_cols.column_name||',';
end loop r_cols_loop;
lv_cols := substr(str1 => lv_cols
,pos => 1
,len => length(ch => lv_cols) - 1);
lv_stmt := replace(replace(replace(replace(replace(replace(replace(lv_stmt
,'TABLE1'
,r_tab.table_name)
,'TABLE2'
,'DIST_'||r_tab.table_name)
,'PKCOLUMNS'
,lv_pk_cols)
,'UPD_COLUMNS'
,lv_upd_cols)
,'INS_COLUMNS'
,lv_ins_cols)
,'COLUMNS'
,LV_COLS)
,'TABLE3'
,R_TAB.ERR_TABLE);
-- here It highy advisable to store the sql statement that will be submitted
-- to the SQL engine before executing it dynamically
insert into t_sql_statement values (lv_stmt);
execute immediate lv_stmt;
end loop ;
commit;
exception
when others then
rollback;
raise;
end p_archive_test;Welcome to the forum!
Unfortunately you have posted to the wrong forum. This question is not about sql developer and is more appropriate for the sql and pl/sql forum
PL/SQL
Please
1. repost the question in the SQL and PL/SQL forum
2. edit this question to tell people to followup in the other forum - post the link to the question in the other forum
3. mark this question answered so people will followup in the other forum.
Read the FAQ in the other forum (there will be link at the top right of the page) for how to post a question and the information you need to provide. In particular use 'code' tags (see FAQ for explanation) before and after posted code and always provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
Before you post the new thread I suggest you perform some additional testing by
1. Modify your code so that it creates the statements but does not execute them. With dynamic sql the most common problem is incorrect syntax and until you have verified that the syntax is both correct and exactly what you want it is a waste of time to execute the statements.
2. Modify your code to only create one statement (add WHERE ROWNUM = 1 to the main query). If the syntax is wrong it will be wrong for all of the statements so until the code works correctly for one loop it is a waste of time perform 10's or 100' of loops.
3. Currently you are not committing the creation of the statement itself but only after it is executed. Thus if the execution fails the query that failed won't be available for you to examine. Either commit the INSERT or, at a minimum capture the query into a global variable and add a DBMS_OUTPUT to the exception handler to display the failed query so you can examine and test it to fix any problem.
Also, by just blindly using the data in ALL_TAB_COLS you are not taking into account that Oracle creates hidden (see the hidden column) and virtual columns that will cause your processing to fail for any tables that use them since you cannot use them directly in queries like you are creating. -
Problem with stored procedure usage when Toplink api is used
In one of our applications we used the combination of JBoss4.0.2 application server, Oracle Toplink 10g (9.0.4.5), JDBC Driver Version is ..... 10.1.0.2.0, Database Product Version is Oracle9i Enterprise Edition Release 9.2.0.6.0, j2sdk1.4.2_08
We faced problem in the application when it is trying to call stored procedure using Oracle Toplink api
code snippet:
public ByteArrayOutputStream baos = new ByteArrayOutputStream();
public PrintStream pos = new PrintStream(baos);
public String delete(String Id)
String procedureName = "abc";
try
UnitOfWork uow = PersistenceManager.getCurrent().getUnitOfWork();
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName(procedureName);
call.addUnamedArgumentValue(Id);
uow.executeNonSelectingCall(call);
uow.commit();
catch (Exception e)
message = e;
e.printStackTrace(pos);
message = message+ baos.toString();
return message;
Stack Trace:
Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'abc' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'abc' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Error Code: 6550Local Exception Stack: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'abc' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'DELETE_LOADED_RESULT_SET' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Error Code: 6550 at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:227) at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:733) at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:781) at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:642) at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1400) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeNoSelectCall(CallQueryMechanism.java:164) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeNoSelect(CallQueryMechanism.java:143) at oracle.toplink.queryframework.DataModifyQuery.execute(DataModifyQuery.java:41) at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493) at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958) at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2236) at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086) at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038) at oracle.toplink.publicinterface.Session.executeNonSelectingCall(Session.java:816) at com.abc.de.fg.model.resultSet.ResultSetProvider.delete(ResultSetProvider.java:150) at
Could anyone please let me know what might be the problem in this case.Tried and couldn't reproduce the problem using 9.0.4.7.
Here's the code:
System.out.println("storedProcedureUnamedValueTest");
StoredProcedureCall call = new StoredProcedureCall();
String lastName = "Jones";
call.setProcedureName("STOREDPROCEDURE_IN");
call.addUnamedArgumentValue(lastName);
session.executeNonSelectingCall(call);stored procedure definition in data base:
CREATE OR REPLACE PROCEDURE "TEST_904"."STOREDPROCEDURE_IN" (
IN_PARAM VARCHAR2) AS
BEGIN
UPDATE EMPLOYEE SET F_NAME = 'Indiana' WHERE (L_NAME = IN_PARAM);
END;log:
storedProcedureUnamedValueTest
DatabaseSession(15)--Execute query DataModifyQuery()
DatabaseSession(15)--Connection(16)--BEGIN STOREDPROCEDURE_IN('Jones'); END;
DatabaseSession(15)--Connection(16)--reconnecting to external connection poolAndrei -
Problem with Stored procedure in JDBC Synch scenario
Hello Experts,
I am working on the scenario which is from HTTP <-> to <-> JDBC. It is a synchronouse scenario. We are using Stored procedure in this scenario.
1) Please send the response structure for it.
2) here when i am sending request to the Database it is giving me below error :
Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TCS.PKG_BMF_MANAGE_SERVICE_DATA.PROC_GET_ACTIVE_MF_ESIIDS' (structure 'statement'): java.sql.SQLException: Oracle CLOB Helper: java.lang.AbstractMethodError: java/sql/Clob.setString(JLjava/lang/String;)I. Setting message to status failed.
One of the field in Database stored procedure is of type CLOB. So can you ppl guide me that what might be the solution for this.
Any help appriciated.
Thanks,
HetalI am using Stored procedure and that is working fine in Oracle
This is my XI Request structure :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:read_PROC_GET_ACTIVE_ESIIDS xmlns:ns0="http://reliant.com/xi/BMFR2">
- <statement>
- <PROC_GET_ACTIVE_ESIIDS action="EXECUTE">
<table>TCS.PKG_BMF_MANAGE_SERVICE_DATA.PROC_GET_ACTIVE_MF_ESIIDS</table>
<in_bmf_partner_id isInput="true" type="VARCHAR">994</in_bmf_partner_id>
<in_esids isInput="true" type="CLOB">1008901001155950587100:1008901001155950545100:1008901001155950671100:1008901001155950114100</in_esids>
</PROC_GET_ACTIVE_ESIIDS>
</statement>
</ns0:read_PROC_GET_ACTIVE_ESIIDS>
This is oracle Stored procedure signature :
PROCEDURE PROC_GET_ACTIVE_ESIIDS
in_bmf_partner_id IN kss_activity_stg_curr_stat.BMF_PARTNER_ID%TYPE,
in_esids IN CLOB,
out_recordset OUT sys_refcursor
Let me know if you need any further information.
Thanks,
Hetal -
Query with column rename not working! (SQLServer/JDBC-ODBC bridge)
Hi,
I was wondering if anybody could help. I am translating some stuff from ASP to JSP and ran into an SQL query that goes like this:
String SQLQuery = "SELECT myTable.myColumn renamedColumn FROM myTable";
which is perfectly legal in SQL Server. I get the stuff from myTable, no problem, and the column's name is locally indeed renamedColumn.
Under the sun.jdbc.odbc.JdbcOdbcDriver, however, trying to do something like:
string myResult = results.getString("renamedColumn");
throws an SQL exception with the message "Index not found".
And if I don't rename the column and try:
myResult = results.getString("myTable.myColumn");
also gives the same problem.
Anybody know what to do?
[P.S, the reason why I have to rename my column is because I have two tables with an identical column name and need both for a search page]Try retrieving by index instead of column name:
E.G.
string myResult = results.getString(1); -
Problems with storing EJB Remote in session and retrieving.
We store EJB remote object in session and differnt clients retrieve it from session
before making a business method call. This seems to work in most cases but some
times it gives the exception attached. This happens only in a clustered environment.
What has been observed is that if we put the remote object inside a hashtable
which in-turn is stored in session retrieval from hashtable does not give this
problem.
Any suggestion / solution would be greatly appreciated.
regards,
Rajesh
The exception Stack trace is attached
java.rmi.NoSuchObjectException: Unable to locate EJBHome: 'BalconHome' on server:
't3://176.19.183.6,176.19.183.15:9616
at weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80)
at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:395)
at com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(AccountInfoAccessor.java:362)
at com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311)
at com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88)
at com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65)
at com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
at jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs_mm_tgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:482)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:308)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116)
at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
at com.epicentric.template.Style.execute(Style.java:538)
at com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
at jsp_servlet.__index._jspService(__index.java:560)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:242)
at com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatcherServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
[ejb exception.txt]Hello Rajesh,
Thanks for your sugggestion. Rajesh Karuvat and myself are working on the same
project.
I want to know if there is any specific patch for this problem for weblogic 6.1
sp3.
The reason we can not just try Weblogic sp4 is that we are using epicentric 4.0
that is cvertified with weblogic 6.1 sp3 and not sp4.
I have also opened a case with bea about it. I would reaaly appretiate if you
can check the detials about it. The case number is 376228.
Please do revert back.
Thanks,
Shilpa
Rajesh Mirchandani <[email protected]> wrote:
Try SP4.
Rajesh Karuvat wrote:
we are running Weblogic 6.1 SP3
"Rajesh Karuvat" <[email protected]> wrote:
We store EJB remote object in session and differnt clients retrieve
it
from session
before making a business method call. This seems to work in mostcases
but some
times it gives the exception attached. This happens only in a clustered
environment.
What has been observed is that if we put the remote object insidea hashtable
which in-turn is stored in session retrieval from hashtable does not
give this
problem.
Any suggestion / solution would be greatly appreciated.
regards,
Rajesh
The exception Stack trace is attached
java.rmi.NoSuchObjectException: Unable to locate EJBHome: 'BalconHome'
on server:
't3://176.19.183.6,176.19.183.15:9616
at weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80)
at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:395)
at com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(AccountInfoAccessor.java:362)
at com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311)
at com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88)
at com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65)
at com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
at jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs_mm_tgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:482)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:308)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116)
at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
at com.epicentric.template.Style.execute(Style.java:538)
at com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
at jsp_servlet.__index._jspService(__index.java:560)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:242)
at com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatcherServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Rajesh Mirchandani
Developer Relations Engineer
BEA Support -
Problem with Stored Procedure exection in Oracle DB
Hi,
I am facing some problem while creating and executing a store procedure.
Please help me solving my problem.
Here are the details :
My Store Procedure :
PROCEDURE EMP2
(PROCESSED IN VARCHAR2 ) AS
BEGIN
SELECT * FROM EMPLOYEE WHERE PROCESSED ='NO'
UPDATE EMPLOYEE SET PROCESSED='YES' WHERE PROCESSED='NO'
COMMIT;END EMP;
Now I want to execute this SP with the statement,
EXECUTE EMP2('NO');
But When I execute this statement, it prompts with this error :
Error: java.sql.SQLException: ORA-00900: invalid SQL statement
, SQL State: 42000, Error Code:
Please help me to solve this issue with high priority.
Regards,
Vara.surely this is not the case :)
SQL> create or replace PROCEDURE EMP_PROC
(P_PROCESSED IN VARCHAR2 ) AS
BEGIN
for i in (SELECT * FROM EMP WHERE PROCESSED = P_PROCESSED)
loop
UPDATE EMPLOYEE SET PROCESSED='YES' WHERE PROCESSED='NO' and employee.empno=i.empid;
end loop;
COMMIT;
END;
/ 2 3 4 5 6 7 8 9 10
Procedure created.
SQL> exec EMP_PROC('NO');
PL/SQL procedure successfully completed. -
Do SQL pros write seperate stored procedures to handle Save and update operations?
hi friends,
Currently i'm bit confused with the industry standard of writing store procedures for save and update operations. I have sees people write separate stored procedure to handle save and update operations even they have to write complex queries. Also I have
seen people writing one store procedure to handle both Save and Update operations even when the queries are complicated. when I asked them why they do it, they said why should waste time on writing another query to update instead write one save store procedure
to handle all.
In here there are SQL Pros, Gurus, what would say about this?
what is the actual industry standard with stored procedure to perform save and update operations, do you write separate ones or do both in one?
thanks
I use Visual studio 2012 Ultimate and SQL server 2008 developer edition!>what is the actual industry standard with stored procedure to perform save and update operations
There is no industry standard. Guideline though you want to be happy with the sp-s; same for your peers.
As noted above the MERGE command is like a Swiss Army knife; it can perform INSERT, UPDATE & DELETE
in one (huge) statement.
Make sure you pick good names for the sp-s, document the parameters and comment the logic if any.
Format the stored procedure for readability:
http://www.sqlusa.com/sqlformat/
Kalman Toth Database & OLAP Architect
SELECT Query Video Tutorial 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Problem with storing and retriving a different langauge font in mysql
hi,
i have problem with storing and retriving a different character set in
mysql database ( for example storing kannada font text in database)
it simply store what ever typed in JTextField in database in the
formate ??????????? and it showing ???????? .
please what can i do this problem.
thanks
dayaMySQL does not know about what type of Font you use or store. that is applicatioon specific. All it knows is the character set that you are storing and the data type and data. THere are something you should know when working with database and Java:
1. make sure you know what character set is used for the database table.
2. make sure you know what character set is used by Java (default to UTF-8 ..
sort off - there are few character that it cannot save). You can enforce the
character set being sent to the database by the String's getBytes(String charsetName) method.
3. make sure the application you use to view the table use the correct character set
if it use a different character set, then any character that it does not recogized
will be replaced with a quetion mark '?'....eventhough the data is correct. -
Problem calling stored procedure with user-defined type of input parameters
Hi,
I have to call a stored procedure with IN parameters, but these are user-defined types of input parameters.
function fv_createnews (
pit_groups in T_APPLICATION_USER_GROUPS,
pit_documents in T_DOCUMENTS
return varchar2;
TYPE T_APPLICATION_USER_GROUPS IS
TABLE OF varchar2(500)
INDEX BY binary_integer;
TYPE T_DOCUMENT IS record (
name varchar2(256)
,url varchar2(1024)
,lang varchar2(30)
,foldername varchar2(150)
TYPE T_DOCUMENTS IS
TABLE OF T_DOCUMENT
INDEX BY binary_integer;
How can I do this using the TopLink 10.1.3 API.
I already found following related posts, but I still can' t make it up:
Using VARRAYs as parameters to a Stored Procedure
Pass Object as In/Out Parameter in Stored Procedure
Or do I have to create my own PreparedStatement for this special stored procedure call using Java and Toplink?As the related posts suggest, you will need to use direct JDBC code for this.
Also I'm not sure JDBC supports the RECORD type, so you may need to wrap your stored functions with ones that either flatten the record out, or take OBJECT types. -
I have a problem with the synchronisation of my iPhone and iPad with Outlook 2007 on my 64-bit Windows 7 PC. For several years,
I have had no problems with the synchronisation by cord connection and iTunes between these programmes. However, a few months ago I decided to use Mobile Me. However, there were problems with duplication of calendars and then “rogue events” – which could not be deleted – even if deleted on Outlook and on the iPhone (or both at the same time) – they would just reappear after the next synchronisation. All other synchronisation areas (eg Contacts, Notes etc) work fine.
I have looked for help through the Apple Support Community and tried many things. I have repaired my Outlook. I have repaired my .pst file in Windows. I have re-installed the latest version of iTunes on my PC. I have re-installed the firmware on my iPhone. I have tried many permutations on my iPhone. I have closed down all Mobile Me functions on the iPhone. I have spent upwards of 24 hours trying to solve this problem.
What am I left with? Outlook works seamlessly on my PC. My iPhone calendar now has no events from my calendar, but does not synchronise through iTunes. Nor does it send events initiated on the iPhone to the Outlook. I am at the point of abandoning iPhones and iPads altogether. I need to have a properly synchronising calendar on my phone. Do you have any suggestions?In the control panel goto the "Lenovo - Power Manager" and click the battery tab, there is a maintenance button in there that will let you change the charging profile for your battery. (from memory, so exact wording may be off)
The lower the numbers you use there, the longer the battery *should* last. These batteries degrade faster at higher charge levels, however storing them at too low of levels is also not good for them... I've read that 40% is optimal, but just not realistic if you use your computer.
--- ThinkPad T61 / Win 7 / Core 2 / 4gb RAM / Nvidia / Still used daily --- ThinkPad Edge 15/ i5 / Win 7 / TrueCrypt / 8gb RAM / Hated it, died at 1 yr 1 mo old --- ThinkPad T510 / Win 7 / TrueCrypt / i5 / 8gb RAM / Nvidia / Current primary machine --- ThinkPad X220 / i7 / IPS / 4gb / TrueCrypt / My Road Machine -
Problem with the fiells MEINS(PO Unit ) and MENGE(Quantity) .
Hi experts
I am having problem with the fiells MEINS(PO Unit ) and MENGE(Quantity) of the datasource 2lis_02_acc .
I have created custom cube and have mapped the fiels MEINS to infoobject 0PO_UNIT and MENGE(Quantity) to infoobject 0CPQUAOU.
Now the data is successfully loaded in the cube but the values of the above 2 fields are getting changed.
In r3 the value for MEINS is "AU","EA" , "H" etc but this field value is getting converted to "LE" in the cube and also the field MENGE(Quantity
) in r3 is for example "1" it is getting converted to 3 in the cube. do u have any idea what is the problem.
The rule type is direct assingment and there is no routine .
Any clues.
Thank you.holy devilz wrote:
Hi experts
> I am having problem with the fiells MEINS(PO Unit ) and MENGE(Quantity) of the datasource 2lis_02_acc .
>
> I have created custom cube and have mapped the fiels MEINS to infoobject 0PO_UNIT and MENGE(Quantity) to infoobject 0CPQUAOU.
> Now the data is successfully loaded in the cube but the values of the above 2 fields are getting changed.
> In r3 the value for MEINS is "AU","EA" , "H" etc but this field value is getting converted to "LE" in the cube and also the field MENGE(Quantity
> ) in r3 is for example "1" it is getting converted to 3 in the cube. do u have any idea what is the problem.
> The rule type is direct assingment and there is no routine .
> Any clues.
> Thank you.
Hmm, your system should consider the alternative UOM maintain in the material master.
Each material in SAP has its standard, base unit of measure (stored in MARA-MEINS). To allow using alternative units, those can be maintained per material in table MARM. So, assuming the Base UoM is only considered (for LE), it converts material quantity from one unit to another, most likely from alternative units to the base one. So, changing that settings must solve. http://goo.gl/JuZlm
Alternative steps:
1.Goto MM42 (Assuming there's no BAPI req?)
2. change po unit from basic unit to other -> save OK
3. change po unit from other to basic unit -> save OK
Also, MD63 shows all data in the base unit of measure.
If you want to explore basic steps, goto RSD1 > Additional > Alternative UoM.
Best Regards, @{
Maybe you are looking for
-
HOW TO configure oracle bi discoverer 11.1.3 32 bit window to oracle ebs 11
Hi all , How can we configure oracle bi discoverer 11.1.3(desktop and admin) installed on windows 32 bit with oracle ebs 11i with database 10g installed on sun solaris sparc machine. Kindly send any link which can give me step by step link for this s
-
Incorrect PDF being displayed periodically in the browser
I want to start by thanking anyone who could shed light on this problem. We have a web application that dynamically generates PDF files per a user request in a web application. 98% of the time the proper PDF gets opened in the browser correctly, wh
-
Can someone please help? I can't access my ipad, every time i switch on the ipad i get the message "Not enough storage - This ipad cannot be backed up because there is not enough iCloud storage available. You can manage your storage in Settings" but
-
Solaris 10 Sparc - Linux2.6 x86
I want to port my Solaris 10 Sparc V240 machine's output to be displayed in my x86 CPU installed with JDS Linux2.6. I tried with xhost and also set my DISPLAY variable... but it showed nothing. Can it actually be done? if not why? I could port Solari
-
Custom controller context value attribute
Hello, I have a custom controller with one value attribute. In the wdDoInit() method of the custom controller I can not access this attribute using: wdContext.currentContextElement().setAttrib() Why? The same works without any problems using the comp