Exception Handling in the OBI EE 10.1.3.4
Hi All,
Is it possible to implement the exception handling in the OBI EE 10.1.3.4
For Ex: Instead of displaying the below error, is it possible to display it in the meaningful way
[nQSError: 10058] A general error has occurred. [nQSError: 27002] Near : Syntax error [nQSError: 26012] . (HY000)
SQL Issued: SELECT SALES_FACT.SALES_AMOUNT, TIMESTAMPDIFF(SQL_TSI_DAY, TIMESTAMP ‘1900-01-01 12:00:00’, TIMESTAMP ‘1900-01-01 12:00:00’), TIME_DIM.BUSINESS_DATE FROM SALES
Thanks in Advance
Siva
Hi Deepak,
Thank you for responding to the query that i have raised.
As you mentioned that ORA: errors will help in diagnosing the issue.
Do you mean that it will help in diagnosing the issue at the BMM larey & Physical layer join conditions.
Thanks in Advance
Siva
Similar Messages
-
In the current project my exception handling implementation is as follows :
Exception Handling Layer wise :
DL layer :
catch (Exception ex)
bool rethrow = ExceptionPolicy.HandleException(ex, "Ui Policy");
if (rethrow)
throw;
BL Layer
catch (Exception ex)
bool rethrow = ExceptionPolicy.HandleException(ex, "Ui Policy");
if (rethrow)
throw;
UI Layer
catch (Exception ex)
bool rethrow = ExceptionPolicy.HandleException(ex, "Ui Policy");
if (rethrow)
Response.Redirect("ErrorPage.aspx", false);
We have a tool to check the standards. And tool output is as follows :
The exception Exception should never been thrown. Always Subclass Exception and throw the subclassed Classes.
I need suggestions on how to implement the same according to standards.Your tool is wrong if it says to never throw Exception. This was a common recommendation back in the .NET v1 days but has long since been thrown out. It is perfectly fine to use Exception when you have a general exception that provides no information
that an application can use to make an informed opinion.
The general rules of exception throwing is to throw the most specific exception that makes sense. If there is no specific exception that applies and it would be useful for the caller to handle the exception differently than other exceptions then creating
a custom exception type is warranted. Otherwise throwing Exception is reasonable. As an example you might have an application that pulls back product data given an ID. There is no built in exception that says the ID is invalid. However an invalid ID
is something that an application may want to handle differently than, say, an exception about the product being discontinued. Therefore it might make sense to create an ItemNotFoundException exception that the application can react to.
Conversely there is no benefit in having different exception types for disk full and disk quota met. The application will respond the same in either case.
Michael Taylor
http://blogs.msmvps.com/p3net -
Exception Handling after the Catch Statement
Hi every one,
How to handle the exceptions after Catch Statement.
What does a catch statement can do?
Regards,
JohnyHi,
Check this link:
http://help.sap.com/saphelp_nw70/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/cf/f2bbce142c11d3b93a0000e8353423/content.htm
Regards
Adil -
What is the best way of Exception Handling
There are many ways to handle the exceptions of a program.
1: You could put every exception handler in the most upper abstract classes.
2: You could write a generic exception that handles a lot of things.
3: You could write exceptions handling for every class.
4: you could group the exception handling.
many, many more ways.
Question:
What is the best way to do this?There are many ways to handle the exceptions of a program.
1: You could put every exception handler in the most upper abstract classes.I woldn't do that always, a class may throw an exception if it's not able to handle it prperly, but it may, so it'll catch it. Throw Exception in abract supper clases only when you are sure the children must always throw the exception, not processing it.
2: You could write a generic exception that handles a lot of things.Bad idea, if you always throw an Exception no informtaion is provaided about whta happened, if you throw a NullPointerException and a NumberFormatException in one of your method I (for example) colud handle properly both problems, one likely to be a programming erros, so check my cod eagain, and the other like to be an user error in introduciong some data, so I wold ask him for the data again.
3: You could write exceptions handling for every class.Write exceptions handling for every class that needs it, throwing the exception if at that moment you don't know what to do with it and catching it if yes. Do not employ too many exception handling: execution of try catch blcks is slower than usuall code.
4: you could group the exception handling.I don't undestand this. What do youmean?
Question:
What is the best way to do this? In general thrwo an exception if the class dosen't know what to do with it, the class which uses yours will handle it. If your class can process the Exception, don't be too lazy and process it.
Employ exceptions always you need them but do not abuse; thay made the code execute slower because the VM machine must check if the exceotions occur.
abraham. -
ADF Task Flow Exception Handling
Hi ,
I tried a very simple thing for taskFlow exception handling.
I created a bounded task flow with a page fragment (View1.jsff) and another view which is the TaskFlow ExceptionHandler (error.jsff).
The view1.jsff has a button whose action is bound to the backing bean. In the backingBean method I deliberately do division by 0.
Since this is an unHandled exception, I would have expected the control to come to error.jsff. But, instead I am shown a pop up box with the error message.
Why is the control not getting redirected to error.jsff ?
Thanks.
S.Srivatsa SivanHi Frank , im having the same problem.
I want to handle exceptions that occur while navigating task flows (example: A user navigates to a task flow that he/she does not have view permission)
I tried using a view activity and method activity as the exception handler but none of them works, the exception is still not handles. It does not even navigate to the exception handler on the task flow.
on the view page i have:
<af:panelStretchLayout topHeight="50px" id="psl1">
<f:facet name="top">
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl1">
Error message:
<af:outputText value="#{controllerContext.currentRootViewPort.exceptionData.message}" id="ot2"/>
</af:panelGroupLayout>
</f:facet>
<f:facet name="center">
<af:outputText value="#{my_exception_Handler.stackTrace}" id="ot1"/>
<!-- id="af_one_column_header_stretched" -->
</f:facet>
</af:panelStretchLayout>
I tried getting the error message and stacktrace from the controllerContext via EL like this "#{controllerContext.currentRootViewPort.exceptionData.message}"
and from the controllerContext class in functions that i have declared in my_exception_Handler class like this
" ControllerContext ctx = ControllerContext.getInstance();
ViewPortContext vCtx = ctx.getCurrentViewPort();
if(vCtx.getExceptionData() != null){
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);
vCtx.getExceptionData().printStackTrace(printWriter);
return stringWriter.toString();"
But all this dont even matter because when the exception occurs on the task flow it does not navigate to the default exception handler.
thanks for your interest and help in advance.
Cyborg_0912 -
Exception handling of Transport acknowledgement in asynchronous send in BPM
HI,
A silly question, but your help would be greatly appreciated..
- I have a asynch send step in a BPM for sending data to the target system through RFC
- It has acknoweledgement property of this send step is set to transport acknowledgement
- The exception property of this send step is set to throw a 'RFCException'
- This send step is inside a block
- This block also has an Exception branch which catches this 'RFCException'
- now my RFC channel failed for some known reason, but the flow never went into the Exception branch
IS this behaviour of the 'transport acknowledgement' property of an asynch send step in BPM expected ?
What should I take care so that if my RFC receiver channel throws an exception, the flow of my BPM goes to the exception branch ??- now my RFC channel failed for some known reason, but the flow never went into the Exception branch
IS this behaviour of the 'transport acknowledgement' property of an asynch send step in BPM expected ?
What should I take care so that if my RFC receiver channel throws an exception, the flow of my BPM goes to the exception
branch ??
When an exception is caught by the Transport Acknowledgement it will trigger the Exception branch (if the send step is defined inside a Block with an Exception Branch)
I think you have not defined (and then assigned) a proper Exception Handler for the Block.
Click on the Block and define an Exception Handler......click on the Exception Branch and then select the Exception Handler from the dropdown......if this is not done then the Exception Branch wont be executed.....perform a check on your BPM in IR (using F7) you may get some warnings.
Regards,
Abhishek. -
Exception Handling in packages called from forms
I am running 10g forms that have many calls to packages/procedures in the database. I am seeing hanging processes on the web server (even after forms processes are stopped) and 1 of the causes Oracle listed was not having proper exception handling in the procesdures. Do I need to add an Exception (' when others then null') to my package specs to handle this?
"Do I need to add an Exception (' when others then null') to my package specs to handle this? "
That will hide the problem not handle it. You really need is to find out where the code is failing...
There is a method for logging message for debugging here...
http://oracle-developer.net/display.php?id=424
An another which is less good for a live system (the one above lets you set different levels of importance for logs messages and can be turned on or off for each user) but looks easier to implement in case you might be in a hurry...
Re: Zdebug -- Download a Forms debugging message tool -
Exception handling in jinitiator
hallo,
we are currently using jinitiator 1.3.1.9 and i have a little question concerning the exception handling in it. i don't think, that the handling differes to older version, so maybe one can help me out though he uses an "older" version.
now the problem. we use java functionality either in webmode (jinitiator) and in client-server-mode (wrapper pl/sql unit) and want to pass the java exception trace to the forms, so that we can handle errors in user interaction. we found a way to da that by developing a printstream, which collects trace information in a string. this method works well in client-server-mode but not in webmode. in the first case all the normal trace information is written with the printstream-method println(String). in the webmode case, a different method is used, println(char[]). the strange thing about it is, that the character array contains address information for an object (maybe the string). i my opinion the behaviour is because of the jinitiator. does anyone know about the exception handling and collecting the trace information in jinitiator?? thanks very much in advance.
regards
steffen silberbachhi again,
thanks for answering, but I think you got me wrong or I didn't make myself clearly. I don't want to pass a PL/SQL error to the bean to have it printed out on the console. I want it the other wa around. my problem was to get the stack trace of a java exception and make it accessible to the form to print it out as a message for instance. unfortunately this way is quite impossible to do, because jinitiator has a different exception handling to the sun VM. the jinitiator implements the printStackTrace(*) methods as native calls and obviously the underlying code handles the addresses of the passed trace objects and prints them out the a special console somehow. so if one overwrites the printStack() methods in his own Exception, he gets a problem because of the different exception trace handling in jinitiator. -
BPM - Exception handling in multiline mapping
Hi,
I have in a BPM a block with processing mode ParForEach containing a transformation and then a send step.
If the transformation (mapping) generates an exception for one of the lines of the multiline variable being processed, no subsequent lines are passed to the send step.
I want the process to execute the mapping for each line and then send messages corresponding to lines without error. How can I do?
Thank you
SimonaHi Simona,
I also feel that Michal had suggested the correct solution. Not sure why you are saying that the error gets propagated, if you have defined a proper Exception handling for the inner block.
But regarding your design for "ParForEach", I am not sure whether you really need to carry out a transformation step for each Block instance, in which case you can keep the transformation step before the "ParForEach" block.
Rgds
R Chandrasekhar (RC) -
Exception Handling in C++ generate core
Hello ,
I have a shared lib which is having some code for exception handling ,till the point of exception thrown program is running fine but after the exception get thrown the program is crasing and creating the core .
I am using Solaris 5.9 on intel(x86) using compiler CC (CC: Sun C++ 5.5 2003/03/12 )
I am specifing the Makefile here . If any one have faced the same kind of problem then please help me out.
***********************Makefile *****************************
SHARED_LIBS = \
/opt/SUNWspro/prod/lib/libp/libgc.a \
/usr/lib/libCrun.so.1 \
/opt/SUNWspro/prod/lib/CC4/libC.a \
$(WLESSL)/lib/libgp.a \
$(WLESSL)/lib/sslplus.a
LIB=$(OBJ) $(SHARED_LIBS)
LIB128=$(OBJ128) $(SHARED_LIBS)
LIB_20=$(OBJ_20) $(SHARED_LIBS)
CC_20=/opt/SUNWspro/bin/CC
cc_20=/opt/SUNWspro/bin/cc
CC_OUT_20=-w -KPIC -mt -lpthread -c $< -o $@
# compile defintions
DEF=-DAPACHE -DSOLARIS -DEAPI -D_POSIX_PTHREAD_SEMANTICS -D_PTHREAD -D_REENTRANT
DOMFLAG=-DDOMESTIC_STRENGTH_ENABLED
# this is not needed if apache20/bin/apxs is working properly
APXS_CFLAGS_20=-mt -lpthread
COMPILE=$(cc_20) $(APXS_CFLAGS_20) $(STD_20_INC) $(VER2) -c $(SRC) -o $(OBJDIR_20)/abc_w.o
LOAD=$(cc_20) -G -z lazyload -o $(OBJDIR)/abc_wl_20.so $(LIB_20) $(OBJDIR_20)/abc.o
LOAD128=$(cc_20) -G -o $(OBJDIR)/abc_wl128_20.so $(LIB128_20) $(OBJDIR_20)/abc.o
# the DSO and objs should be placed in this directory
OBJDIR=sol_x86
OBJDIR_20=sol_x86/a20
# WLE include files include tmmach which are platform specific
WLESSLINC=$(WLESSL)/sysincludeHi Santinu,
I saw your question and thought of replying you, but I guess you might have got the solution by now as because the post date of your question is around a year back.
You need to change $LOAD so that id uses CC instead of cc. There's a compatibility issue.
LOAD=$(CC_20) -G -z lazyload -o $(OBJDIR)/mod_wl_20.so $(LIB_20) $(OBJDIR_20)/mod_weblogic.o
LOAD128=$(CC_20) -G -o $(OBJDIR)/mod_wl128_20.so $(LIB128_20) $(OBJDIR_20)/mod_weblogic.o
Hope this Helps.
Thanks
Somak -
Exception handling in stored process, loop IF..ELSE
Hello Guys,
we want to put in exception handling in the loop but get the following error:
Error(43,3): PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following: begin case declare end exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
create or replace
PROCEDURE xxxx
FOR MESSSY IN
select I.*
FROM x I
LOOP
IF upper(CODE)='N' THEN
INSERT INTO T_MESS(MP)
select I.MP_ID
FROM T_ME
ELSIF upper(MESSSY.k2)='L' THEN
DELETE T_MESS WHERE T_MESS.MP = MESSSY.MP;
END IF;
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
A program attempted to insert duplicate values in a column that is constrained by a unique index.
DBMS_OUTPUT.PUT_LINE ('A program attempted to insert duplicate values in a column that is constrained by a unique index.')
--No Rollback
END;
COMMIT;
END LOOP;
END xxxx;
does someone know why?BluShadow wrote:
Well, your code is missing all sorts of bits and we don't have your data or your exact logic to know what it's supposed to be achieving.
That is right, you dont have my data and that is why I was suprised by your comment.
Since the input table might contain a few thousand rows and each of those might need to
be considered N , D, or C and each case has a different handling I can not imagine how this
can be all done with a merge statement.
MERGE
T_METRICPOINT_META with T_METRICSSYSTEM_LOAD where T_METRICSSYSTEM_LOAD .LOAD_DATE=to_char(sysdate)
WHEN MATCHED THEN --we know those are the metric points that have to be loaded today, but we still need to do a IF..ELSE to handle them
WHEN NOT MATCHED THEN -- not considered in todays load
----original code-----
create or replace
PROCEDURE myprocedure AS
BEGIN
--Extracting the records from T_METRICSSYSTEM_LOAD which have todays load date. Corresponding to these MP_System, we extract the MP_IDs from the T_METRICPOINT_META table.
--Comapring these MP_IDs with the MP_IDs from the source(T_METRICPOINT_IMPORT) and extracting only those Metric points which need to be loaded today.
FOR METRICSSYSTEM IN
select I.*
FROM T_METRICPOINT_IMPORT I
where I.LOADDATE = TO_CHAR(SYSDATE) AND I.MP_ID IN
(select a.MP_ID
from T_METRICPOINT_META a INNER JOIN T_METRICSSYSTEM_LOAD b on a.MP_SYSTEM = b.MP_SYSTEM where b.LOAD_DATE=to_char(sysdate))
LOOP
--If mutation code in the source/import data is "N", the record is inserted as it is in the "T_METRICPOINTS" table.
IF upper(METRICSSYSTEM.MUTATIONCODE)='N' THEN --new
INSERT INTO T_METRICPOINTS(MP_ID, ......)
SELECT DISTINCT I.MP_ID,.....
FROM T_METRICPOINT_IMPORT I WHERE I.MP_ID = METRICSSYSTEM.MP_ID
ELSIF upper(METRICSSYSTEM.MUTATIONCODE)='D' THEN --delete
DELETE T_METRICPOINTS WHERE T_METRICPOINTS.MP_ID = METRICSSYSTEM.MP_ID AND T_METRICPOINTS.KEY = METRICSSYSTEM.KEY;
ELSIF upper(METRICSSYSTEM.MUTATIONCODE)='C' THEN --correction
UPDATE T_HISTORYMETRICPOINTS H
SET CHANGE_DATE = to_char(sysdate)
WHERE H.MP_ID=METRICSSYSTEM.MP_ID AND H.KEY = METRICSSYSTEM.KEY;
INSERT INTO T_HISTORYMETRICPOINTS(MP_ID, KEY, .....)
--The distinct here is used, to handle 2 identical records in the input table with correction value "C". This would insert into 1 record in the T_HISTORYMETRICPOINTS table without
--violating the primary key constraint.
select DISTINCT I.MP_ID,I.KEY, ....
FROM T_METRICPOINT_IMPORT I WHERE I.MP_ID = METRICSSYSTEM.MP_ID
--END IF;
END IF;
COMMIT;
END LOOP;
END myprocedure; -
Removing Exception Handling Causes Compiler Error
I am very new to Java. I have a background in other programming languages including Ruby. I am in need of a convenient means to parse XML code. I picked up the code shown at the end of this message on the Internet. In its original form, it works perfectly. I experimented by trying to comment out the try block as you can see. I was surprised to find that in that form it wouldn't compile. In essence, I thought what I was doing was simply removing exception handling. I figured that since the code worked and there were no exceptions being thrown, it would work just fine for experimentation purposes. (I understand that I would not want to do this in production mode.) Can someone please explain to me why removing the exception handling causes the program to fail to compile?
Thanks for any input.
... doug
/* Experimental Code */
/* http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/ */
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import java.io.File;
public class ReadXMLFile {
public static void main(String argv[]) {
try {
File fXmlFile = new File("ReadXMLFile.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
doc.getDocumentElement().normalize();
System.out.println("Root element :" + doc.getDocumentElement().getNodeName());
NodeList nList = doc.getElementsByTagName("staff");
System.out.println("-----------------------");
for (int temp = 0; temp < nList.getLength(); temp++) {
Node nNode = nList.item(temp);
if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;
System.out.println("First Name : " + getTagValue("firstname",eElement));
System.out.println("Last Name : " + getTagValue("lastname",eElement));
System.out.println("Nick Name : " + getTagValue("nickname",eElement));
System.out.println("Salary : " + getTagValue("salary",eElement));
} catch (Exception e) {
e.printStackTrace();
private static String getTagValue(String sTag, Element eElement){
NodeList nlList= eElement.getElementsByTagName(sTag).item(0).getChildNodes();
Node nValue = (Node) nlList.item(0);
return nValue.getNodeValue();
}877757 wrote:
I figured that since the code worked and there were no exceptions being thrown, it would work just fine for experimentation purposes. The compiler doesn't know that your code works. It only knows that some method you call can throw some checked exception, and it requires you to catch it or declare that you don't. -
Hi all,
I'm trying to specify a method activity as an exception handler in the adfc-config. The problem is if I specify a view activity or a bounded task flow as the exception handler then it works fine, but if the exception handler is a method activity then it is not recognized. What could be the cause?. I need to execute a method when an exception occurs.
Version: 11.1.2.0
Edited by: NewBee on Apr 23, 2013 10:37 AMHi,
there should not be a problem with this and I recently did the same with JDeveloper 11g R2 (not sure which version of JDeveloper you use because you did not share this information). I assume you just marked the method activity as an exception handler without any other configuration? If so then set a break point to the managed bean method that you access from the method activity to see if it actually stops there. Also note that not all exceptions are handled by the controller exception handler. E.g an exception during render response phase (typically an exception in a managed bean) is not handled by the controller. Also you need to avoid the managed bean that handles the exception to itself throw one. This however you will see when debugging the bean.
Frank -
How to implement Exception Handling error in IDoc to File and RFC to File
Hi,
We are implementing the two below scenarios :
1. IDOC to File
2. RFC to File
We have to implement the Exception Handling for the above two cases. Kindly could you provide the inputs to implement the Exception Handling for the above two cases.
Please provide the precious inputs to implement this.
Thanks,
RameshHi Ramesh,
The exception handling for idocs
http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7f1543d711d1893e0000e8323c4f/frameset.htm
Exception handling in File to IDoc Scenario
For RFCs
Re: Passing SAP Exceptions to a sync SOAP Call
Error Handling when using RFC
Exception Handling while Calling RFC - BPM
handle exceptions in remote function modules
Regards,
Prateek -
Recommended Practice for Exception handling in JSP portlets
Hi,
This may be a redundant question, but hope to get some feedback on the generally used practice of catching exceptions in a JSP based Portal application.
Is it okay to just make use of the standard JSP errorpage directive in each of the JSP portlets to point to the same errorpage.jsp. If a problem occurs in any of the portlets, the userfriendly message in the errorpage.jsp would be rendered.
Of course there could be some kind of error logging done in the errorpage.jsp to track the error stack. This also means, that you would not want to catch any exceptions inside each of the portlet JSPs but rather let the errorpage directive, be the catch all?
regards
-AnanthMohana,
Pls ignore the voice mail,it was for something else and I was able to talk to Peter as well about this.
Regarding the error/exception handling -
If the errorPage.jsp is used in each of the JSP portlets with the help of the JPS errorPage directive, if a general system failure or major appln. error occurs, you will get the errorPage.jsp containing the user friendly message to show up in each of the half a dozen portlets on the page!!. Is that allright.
You cannot really redirect the entire page using the code inside the JSP portlet. It will only render inside the same portlet. The only way you can do this is to use Javascript.
-Ananth
Maybe you are looking for
-
How do you add visual video controls to widget video in ibooks author?
How do you add video controls to video using ibooks author?
-
How to read files from cq5..
Hi, Here i want to get a pdf file from the "/content/myproj-data/docs/demo.pdf" path and then want to convert this into images...(I am using cq5.6.1) Whenever i started this process using the File I/O stream, i am not able to get the pdf file from th
-
Resource Adapter Deployment Error (Resolved)
This Problem Has Been Resolved. I'm trying to develop an application using Inbound resource adapters on Weblogic 9.2.1 . I have the resource adapter and the MDB packaged separately. The MDB appears to deploy successfully, but the resource adapter doe
-
Is there any way to upgrade iphone5 to 5s in india
is there any way to upgrade iphone5 to iphone5s in india
-
Me_process_po_cust
Hi Guys, I have a question, i have added a field in a user and i want to save it in the purchase order. I thought that the badi that i have to implement is the me_process_pos_cust, but when i try to locate it putting a break point in the method get_i