tag:blogger.com,1999:blog-5874979429188093780.post1674876151790293702..comments2024-03-18T06:46:54.352+01:00Comments on Andrej Baranovskij Blog: Differences of Handling JboException in Oracle ADFAndrej Baranovskijhttp://www.blogger.com/profile/04468230464412457426noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-5874979429188093780.post-60171216958755592032015-03-11T06:26:19.685+01:002015-03-11T06:26:19.685+01:00Hello Andrejus,
I have implemented database commi...Hello Andrejus,<br /><br />I have implemented database commit as AMImpl client interface and doing rollback in bean catch block if JBO error is thrown.<br />If any JBO error occurs, the page becomes invalid and I need to rerun the page to perform other operations. Can you please let me know how can I completely rollback the changes and continue with the current transaction.swathhttps://www.blogger.com/profile/06369206205109044976noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-84081041191158271602013-05-23T12:35:14.373+02:002013-05-23T12:35:14.373+02:00Hi,
What if we customize DCErrorHandlerImpl to dis...Hi,<br />What if we customize DCErrorHandlerImpl to display custom error but for same error we want to show different msg according to different page. How can we achieve this for jsff page in dynamic region ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-83418890685245131002012-12-21T11:23:47.575+01:002012-12-21T11:23:47.575+01:00Hi,Andrejus.
I have used listofcombobox we enter...Hi,Andrejus.<br /><br />I have used listofcombobox we enter wrong data error come from frame work like error is : Invalid values: sssss . my case i want override error message its possible.<br /><br />kindly help me.....<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-22771904053459415292012-01-13T21:17:18.765+01:002012-01-13T21:17:18.765+01:00You can implement your custom method in AM impl cl...You can implement your custom method in AM impl class with try/catch. Rollback in catch block.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-62250275342584172702012-01-13T17:25:14.745+01:002012-01-13T17:25:14.745+01:00What is the best practice, if I want to commit the...What is the best practice, if I want to commit the transaction after invoking the operation. I want that the transaction i committed or rolled back depending on whether the operation was successfully called.Jacobnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-19447864611200344852011-12-04T09:52:08.078+01:002011-12-04T09:52:08.078+01:00Ther exception which is generated is not able to r...Ther exception which is generated is not able to reach the following code in my application....please let me know what I can be missing..??<br /><br /><br /> public TaskFlowId getDynamicTaskFlowId() {<br /> ControllerContext context = ControllerContext.getInstance();<br /> ViewPortContext currentRootViewPort = context.getCurrentRootViewPort();<br /> Exception exceptionData = currentRootViewPort.getExceptionData();<br /> <br /> if (currentRootViewPort.isExceptionPresent()) {<br /> exceptionData.printStackTrace();<br /> <br /> currentRootViewPort.clearException();<br /> <br /> TabContext.getCurrentInstance().removeCurrentTab();<br /> List tabs = TabContext.getCurrentInstance().getTabs();<br /> for (int i = 0; i < tabs.size(); i++) {<br /> TabContext.getCurrentInstance().removeTab(i);<br /> }<br /> <br /> return TaskFlowId.parse(taskFlowIdError);<br /> }<br /> <br /> return TaskFlowId.parse(activeTaskFlowID);<br /> }<br /><br /><br />if (currentRootViewPort.isExceptionPresent())<br /><br /><br />this statement is returning false on presence of exception also....<br /><br />I am trying for fragments case...Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-82932558024791531962011-12-03T16:57:50.662+01:002011-12-03T16:57:50.662+01:00Thats because in your example JboException is thro...Thats because in your example JboException is thrown from ViewController itself, framework is not registering it. However when you throw from Model, then its different.<br /><br />Its common practice to show stack trace error.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-27328047249475785252011-12-03T16:53:01.039+01:002011-12-03T16:53:01.039+01:00Thanks a lot for your co-operation......means ther...Thanks a lot for your co-operation......means there is no way to hide stack trace...<br /><br />But I am able to do it when I am writting my own custom functions .....in managed bean....<br /> public void arthException(ActionEvent actionEvent) {<br /> try {<br /> int a = 10 / 0;<br /> }<br /> catch (ArithmeticException e) {<br /> System.out.println("Exception thrown..." + e);<br /> throw new JboException("Arithmetic Exception", "ARTH", null);<br /> }<br /> }<br /><br /><br />and is able to navigate to appropriate screen by passing ARTH object error code in adf-config. with out stack trace message..Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-49804853952952147022011-12-03T16:49:54.796+01:002011-12-03T16:49:54.796+01:00You will not hide stack trace, I already explained...You will not hide stack trace, I already explained it.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-33548271105009340052011-12-03T16:48:34.331+01:002011-12-03T16:48:34.331+01:00please explain it in detail....I am able to naviga...please explain it in detail....I am able to navigate to different screen but not able to hide the stack trace...Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-43696296065880588862011-12-03T16:41:00.667+01:002011-12-03T16:41:00.667+01:00Just define Error Handler activity (page) on ADF T...Just define Error Handler activity (page) on ADF Task Flow, and you are done.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-60377813829423068132011-12-03T16:39:25.043+01:002011-12-03T16:39:25.043+01:00Then how we will let the user know that the what k...Then how we will let the user know that the what kind of exception has occurred...??<br />I want the use to navigate to different screen on occurence of exception..Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-24480484170951358622011-12-03T16:35:56.371+01:002011-12-03T16:35:56.371+01:00Yes, thats how it works. Because we are doing thro...Yes, thats how it works. Because we are doing throw new JboException("Data Processing Failed"); then ADF reports stack trace. From ADF Model layer we are throwing to ViewController. Thats normal behavior.<br /><br />If you dont want to throw exception, you can just log it in catch block and not re-throw.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-65843593806873069522011-12-03T16:33:45.919+01:002011-12-03T16:33:45.919+01:00public void processData() {
try{
...public void processData() {<br /> try{<br /> int a=10/0;<br /> }catch(Exception e){<br /> throw new JboException("Data Processing Failed");<br /> }<br /> }<br /><br />The code is generating stack trace....now please let me know....<br /><br />But if I remove line throw new JboException("Data Processing Failed"); then no exception is generated...Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-78926860819451861922011-12-03T16:28:18.584+01:002011-12-03T16:28:18.584+01:00What I can say, if you say so :-)What I can say, if you say so :-)Andrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-78317905539601168102011-12-03T16:27:23.756+01:002011-12-03T16:27:23.756+01:00But if we are using try catch in application modul...But if we are using try catch in application module then also ...it is generating stack trace.....Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-60608504423610500172011-12-03T16:27:08.370+01:002011-12-03T16:27:08.370+01:00Here is code where exception is catched, in case o...Here is code where exception is catched, in case of pages: https://lh5.googleusercontent.com/-Ev7aqW3NaKM/TYUPEwJ0lGI/AAAAAAAAE6k/_T9n3Uy27Kw/s1600/6.png<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-86611701681980227512011-12-03T16:26:00.367+01:002011-12-03T16:26:00.367+01:00Of course, unless you will do try/catch in Java co...Of course, unless you will do try/catch in Java code.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-1561129636597578062011-12-03T16:25:30.192+01:002011-12-03T16:25:30.192+01:00Stack trace will be generated always, only in addi...Stack trace will be generated always, only in addition you can intercept error in DCErrorHandler. But you cant hide stack trace.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-40564873718470420052011-12-03T16:23:46.835+01:002011-12-03T16:23:46.835+01:00One with pages....Although...one with fragment is ...One with pages....Although...one with fragment is also generating the same stack trace ...Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-40357438277142868422011-12-03T16:11:31.461+01:002011-12-03T16:11:31.461+01:00There is email in about blog section.
Which sampl...There is email in about blog section.<br /><br />Which sample you are running - one with pages, or one with fragments?<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-5186091274209657872011-12-03T15:56:19.166+01:002011-12-03T15:56:19.166+01:00Hi
How I can send the screen shot....I am not able...Hi<br />How I can send the screen shot....I am not able to find any option on this site to send the image..<br />I sending the details of the exception that I am getting on the console....<br /><br /><br /><br />racle.jbo.JboException: Data Processing Failed<br /> at com.redsamurai.model.HrModuleImpl.processData(HrModuleImpl.java:30)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:597)<br /> at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:638)<br /> at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2136)<br /> at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3063)<br /> at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)<br /> at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)<br /> at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2143)<br /> at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)<br /> at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)<br /> at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)<br /> at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:597)<br /> at com.sun.el.parser.AstValue.invoke(Unknown Source)<br /> at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)<br /> at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:168)<br /> at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:160)<br /> at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:989)<br /> at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:878)<br /> at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:777)<br /> at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:551)<br /> at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:147)<br /> at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)<br /> at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)<br /> at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)<br /> at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)<br /> at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)<br /> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-728056651192868042011-12-03T14:15:53.848+01:002011-12-03T14:15:53.848+01:00Please send me detail screenshots and steps to rep...Please send me detail screenshots and steps to reproduce your problem. I can't help you on so abstract question.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-83058239277678167882011-12-03T13:43:31.765+01:002011-12-03T13:43:31.765+01:00Hi already have tried these two examples....and fa...Hi already have tried these two examples....and facing same issue ...that is not able to handle stack trace....please you try it at your end...Ankithttps://www.blogger.com/profile/13321975576420845417noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-29799477627040689122011-12-03T13:33:22.932+01:002011-12-03T13:33:22.932+01:00Try those posts:
http://andrejusb.blogspot.com/20...Try those posts:<br /><br />http://andrejusb.blogspot.com/2011/03/exception-handler-for-method-calls_19.html<br /><br />http://andrejusb.blogspot.com/2011/03/exception-handler-for-method-calls.html<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.com