Scaclability of jdbc vs ADF BC
Hi,
Which is faster, jdbc or ADF BC? I have spatial query inside the view object. It seems that it takes very long to execute this. Can we still speed it up by using JDBC call inside ApplicationModuleImpl class instead of View Object?
ADF BC uses JDBC to access the DB.
Turn on logging for ADF BC to see the query that is being sent to the DB and then check if it is doing something wrong and you need to tweak it.
Similar Messages
-
JBO-26061: Error while opening JDBC connection : ADF Related Problem?
I would like to ask whether there is an impact when you set the PS_TXN and PS_TXN_SEQ database objects for a ADF Application?(http://chrismuir.sys-con.com/node/1067419/mobile)
The Datasources are all good when tested in the admin server for connectivity. The connection is somewhat intermittent.
I’m seeing this error in the logs:
[NOTIFICATION] [J2EE JSP-00008] [oracle.j2ee.jsp] [tid: [ACTIVE].ExecuteThread: '213' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: nadeesha_75314] [ecid: 000003_ji^BBd5o6wVmZMG001r0u000eaO,0:1] [APP: CRMApplication_201210181330#V3.3] [dcid: ce18b6ae9d1d3aad:44d00d73:13a8abb0db4:-8000-000000000001821d] [URI: /CRMApplication/faces/cxcare/CustomerCare.jspx] [arg: The following exception occurred:] unable to dispatch JSP page: The following exception occurred:.[[
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:972)
at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1112)
at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6372)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:286)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:562)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:410)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8651)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4405)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2391)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2203)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3101)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:460)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:431)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:426)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:476)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:855)
at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:476)
at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
at oracle.adf.model.BindingContext.put(BindingContext.java:1230)
at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:173)
at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:964)
at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1210)
at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1113)
at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1073)
at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1076)
at oracle.adf.model.BindingContext.get(BindingContext.java:1042)
at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:305)
at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1486)
at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1564)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.getDataControl(JUCtrlActionBinding.java:556)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.internalCheckPermission(JUCtrlActionBinding.java:2028)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:726)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at sun.reflect.GeneratedMethodAccessor1079.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
<Oct 22, 2012 3:13:48 PM IST> <Warning> <JDBC> <BEA-001153> <Forcibly releasing inactive connection "weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@7e16" back into the connection pool "REPTSTDS_NODE1", currently reserved by: null.>
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:972)
at oracle.jbo.server.DBTransactionImpl.getInternalConnection(DBTransactionImpl.java:1360)
at oracle.jbo.server.DBSerializer.setup(DBSerializer.java:137)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:283)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:264)
at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5672)
at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5543)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:372)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8651)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4405)
at oracle.jbo.common.ampool.ApplicationPoolImpl.manageReferencingState(ApplicationPoolImpl.java:1415)
at oracle.jbo.common.ampool.ApplicationPoolImpl.recycleReferencedInstance(ApplicationPoolImpl.java:2477)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2298)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2203)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3101)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:460)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:431)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:426)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:476)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:855)
at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1616)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2433)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2378)
at oracle.adf.model.binding.DCBindingContainer.getOrderedVOUsageList(DCBindingContainer.java:4771)
at oracle.adf.model.binding.DCDataControl.reportException(DCDataControl.java:397)
at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:412)
at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:467)
at oracle.adf.model.binding.DCControlBinding.reportException(DCControlBinding.java:202)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.reportException(JUCtrlActionBinding.java:2006)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1650)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2141)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:730)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at lk.dialog.ccbs.view.cxcare.bean.CustomerCareInterfaceBean.getCxCLVScore(CustomerCareInterfaceBean.java:848)
at lk.dialog.ccbs.view.cxcare.bean.ContractBean.displayCLVLogos(ContractBean.java:130)
at lk.dialog.ccbs.view.cxcare.bean.ContractBean.allInitMethodForContract(ContractBean.java:720)
at lk.dialog.ccbs.view.cxcare.bean.SearchBean.initAllMethods(SearchBean.java:364)
at lk.dialog.ccbs.view.cxcare.bean.SearchBean.cbMobileSearchAL(SearchBean.java:95)
at sun.reflect.GeneratedMethodAccessor1517.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:279)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogic:pool:REPTSTDS, props = {}.
Nested Exception: java.lang.RuntimeException: Failed to setAutoCommit to true for pool connection.
at weblogic.jdbc.wrapper.PoolConnection.init(PoolConnection.java:49)
at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:252)
at weblogic.jdbc.pool.Driver.connect(Driver.java:163)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:652)
at weblogic.jdbc.jts.Driver.connect(Driver.java:127)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:355)
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:939)
at oracle.jbo.server.DBTransactionImpl.getInternalConnection(DBTransactionImpl.java:1360)
at oracle.jbo.server.DBSerializer.setup(DBSerializer.java:137)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:283)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:264)
at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5672)
at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5543)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:372)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8651)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4405)
at oracle.jbo.common.ampool.ApplicationPoolImpl.manageReferencingState(ApplicationPoolImpl.java:1415)
at oracle.jbo.common.ampool.ApplicationPoolImpl.recycleReferencedInstance(ApplicationPoolImpl.java:2477)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2298)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2203)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3101)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:460)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:431)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:426)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:476)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:855)
at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1616)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2433)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2378)
at oracle.adf.model.binding.DCBindingContainer.getOrderedVOUsageList(DCBindingContainer.java:4771)
at oracle.adf.model.binding.DCDataControl.reportException(DCDataControl.java:397)
at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:412)
at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:467)
at oracle.adf.model.binding.DCControlBinding.reportException(DCControlBinding.java:202)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.reportException(JUCtrlActionBinding.java:2006)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1650)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2141)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:730)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at lk.dialog.ccbs.view.cxcare.bean.CustomerCareInterfaceBean.getCxCLVScore(CustomerCareInterfaceBean.java:848)
at lk.dialog.ccbs.view.cxcare.bean.ContractBean.displayCLVLogos(ContractBean.java:130)
at lk.dialog.ccbs.view.cxcare.bean.ContractBean.allInitMethodForContract(ContractBean.java:720)
at lk.dialog.ccbs.view.cxcare.bean.SearchBean.initAllMethods(SearchBean.java:364)
at lk.dialog.ccbs.view.cxcare.bean.SearchBean.cbMobileSearchAL(SearchBean.java:95)
at sun.reflect.GeneratedMethodAccessor1517.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:279)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
at weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:601)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:656)
at weblogic.jdbc.jts.Driver.connect(Driver.java:127)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:355)
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:939)
... 100 more
## Detail 0 ##Probably you should check first the settings of your DataSource. My guess is that the DS hands out a borked or dead connection. The DS should be set to check the state of the connection on reserve. There are also some timing related settings...
Sascha -
Future support for using PL/SQL core business logic with ADF BC
We want to migrate our large Forms client/server (6i) application to ADF, possibly using a migration tool like Ciphersoft Exodus.
One scenario could be to use ADF BC and ADF-Faces or a different JSF-Implementation for presentation and business layer but keep our heavy PL/SQL-businesslogic inside the Oracle database in packages, triggers, functions and procedures.
This scenario could be chosen due to the huge amount of interconnected logic inside the database (10 years of development; no technical components; any package may access any table and more of this kind of dependencies). The business logic nowadays held in Forms client will be moved mainly into the database as a prerequisite to this scenario.
Choosing this "keep-logic-in-DB"-scenario we need a good support by ADF BC to do so. We know and prototyped that it is possible to call some PL/SQL via JDBC from ADF BC and it is possible to use stored procedure calls for standard business entity data access (ins, del, upd, ..). But this does not solve our problems. We want to reuse core business logic coded in PL/SQL. This is much more than change the ADF standard behavior for an update with an own PL/SQL-call.
Now my question:
Will there be a kind of sophisticated support to use ADF BC in combination with database-kept logic?
If so, when will this happen and how will the common problems of transactional state inside the database and inside the ADF BC be solved? Any plans or ideas yet?
Many other clients do have similar applications built in Forms and PL/SQL and would be glad to hear about a path of direction.
I've read the technical article 'understanding the ADF BC state management feature' which you have contributed to. One current limitation is pointed out there: Using PL/SQL with ADF BC limits ADF AM pooling to 'restricted level' which reduces scalability.
Are you aware of additional main problems/tasks to solve when using PL/SQL heavily with ADF BC, which we have to think about?
Thank you for any response.
IngmarMy main problem is two 'concurrent' areas holding state in an application system based on DB-stored PL/SQL-logic in combination with ADF BC.
For a new System everything can be made ok:
Sure, it is possible to build a new system with the business logic included in ADF BC only. All long-living state will be handled in the BC layer ( including support for UnitsOfWork longer than the webside short HTTP-requests and HTTP-sessions and longer than the database transactions.
For an old system these problems arise:
1. DB data changes not reflected in BC layer:
Our PL/SQL-logic changes data in tables without notifying the ADF BC layer (and its cache). To keep the data in ADF BC entity objects identical to the changed database content a synchronization is needed. BC does not know which part of the application data has been changed because it has not initiated the changes through its entity objects. Therefore a full refresh is needed. In a Forms4GL environment the behavior is similar: We do frequently requeries of all relevant (base)tables after calling database stored logic to be sure to get the changed data to display and to operate on it.
-> Reengineering of the PL/SQL-logic to make the ADF BC layer aware of the changes is a big effort (notifying BC about any change)
2. longer living database transactions
Our PL/SQL-logic in some areas makes use of lengthy database transactions. The technical DB-transaction is similar to the UnitOfWork. If we call this existing logic from ADF BC, database state is produced which will not be DB-committed in the same cycle.
This reduces scalability of ADF BC AM pooling.
Example:
a) Call a DB-stored logic to check if some business data is consistent and prepare some data for versioning. This starts a DB-transaction but does not commit it.
b) Control is handed back to the user interface. Successful result of step a) is displayed
c) User now executes the versioning operation
d) Call another DB-stored logic to execute the versioning. DB-transaction is still open
e) Business layer commits the transaction automatically after successful finishing step d). Otherwise everything from a) to e) is rolled back.
-> redesign of this behavior (= cutting the 1to1 relation between LogicalUnitOfWork and the technicalDatabaseTransaction is a big effort due to the big amount of code. -
Problem with deployment to Tomcat &JBoss
Hi,
I have an application with BC4J & UIX & Struts when I run the application from JDeveloper (OC4j) every thing OK
but when I deploy the application to tomcat or JBoss I get the following exception:
oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:oracle.sql.TIMESTAMPTZ@e20459
at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:739)
at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:85)
at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1063)
at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:1513)
at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:2159)
at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1031)
at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2558)
at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2461)
at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:1686)
at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:1589)
at oracle.jbo.server.QueryCollection.getRowCount(QueryCollection.java:1439)
at oracle.jbo.server.ViewRowSetImpl.getRowCount(ViewRowSetImpl.java:1693)
at oracle.jbo.server.ViewObjectImpl.getRowCount(ViewObjectImpl.java:5311)
at net.accad.redmoon.UserData.<init>(UserData.java:48)
at net.accad.redmoon.Access.doLogin(Access.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at oracle.cabo.servlet.event.MethodEventHandler.handleEvent(Unknown Source)
at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source)
at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source)
at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source)
at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source)
at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source)
at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source)
at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source)
at oracle.cabo.servlet.UIXServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:44)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:169)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
I prepaired my Tomcat & JBoss with ADF runtime installer,
And I had deploy the following library with my application:
-JSP Runtime
-Struts Runtime
-Servlet Runtime
-ADF UIX Runtime
-Oracle XML Parser v2
-BC4J Runtime
-ADF Controller Runtime
-ADF Model Runtime
-BC4J Oracle Domain
-Oracle JDBC
-J2EE
-ADF Web Runtime
-BC4J Client
Merry XMass
Omar DawodSorry I forgot this:
JDeveloper 9.0.5.2
JBoss 4.0
Tomcat 5.0.28
Omar Dawod -
ADF 11g application on Weblogic 10.3 + JDBC connection to Oracle XE
Hello! i'm using Jdev 11g (not tp4) and i have Adf applicarion which uses BC4J, thereofre in jdev exists connection to DB.
When i start my application in Jdev, it starts Weblogic and deploys my application. And all works fine!
When i want to execute my Weblogic as standalone server, using Weblogic domain Administration console, i deploy my application as WAR archive
before deploy, i've been created JDBC DataSource in Weblogic server, using Weblogic webinterface (connection test was OK)
and now, when i start my application, entering application Url in internet explorer, i see that exception has ariced, her is the stack trace
{color:#0000ff}<17-Oct-2008 18:30:49 o'clock EEST> <Error> <HTTP> <xc002600109> <AdminServer> <ACTIVE ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1224257449182> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@1410e0d - appName: 'nano', name: 'nano.war', context-path: '/nano', spec-version: '2.5', request: weblogic.servlet.internal.ServletRequestImpl@8f5e03[
GET /nano/faces/untitled3.jsp?_adf.ctrl-state=1797442774_7 HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: oracle.uix=0^^GMT+3:00; JSESSIONID=wShvL4vT9h40V7TSNH9D84p3v4h48S992vJyWK6p0hnWflfZVpc2!652912999; ADMINCONSOLESESSION=r440L4XpGDJhhX3G1slmFdSzV3xSH51xGzhy912nTnpP2Zv1yVrQ!652912999
Pragma: no-cache
Cache-Control: no-cache
]] Root cause of ServletException.
java.lang.NullPointerException
at oracle.adf.model.bc4j.DCJboDataControl.findVariable(DCJboDataControl.java:2934)
at oracle.adf.model.binding.DCVariableImpl.resolveSourceVariable(DCVariableImpl.java:69)
at oracle.adf.model.binding.DCVariableImpl.getVariableKind(DCVariableImpl.java:162)
at oracle.jbo.common.VariableManagerImpl.doGetVariables(VariableManagerImpl.java:125)
at oracle.jbo.common.VariableManagerImpl.getVariablesOfKind(VariableManagerImpl.java:259)
at oracle.jbo.common.VariableManagerImpl.getVariables(VariableManagerImpl.java:253)
at oracle.jbo.common.VariableValueManagerImpl.doPassivateVariables(VariableValueManagerImpl.java:499)
at oracle.jbo.common.VariableValueManagerImpl.getPassivatableVariables(VariableValueManagerImpl.java:439)
at oracle.adf.model.binding.DCBindingContainer.buildFormToken(DCBindingContainer.java:4523)
at oracle.adf.model.binding.DCBindingContainerState.buildStringBuffer(DCBindingContainerState.java:56)
at oracle.adf.model.binding.DCBindingContainerState.toString(DCBindingContainerState.java:590)
at oracle.adf.model.binding.DCBindingContainer.getStateToken(DCBindingContainer.java:4293)
at oracle.adfinternal.controller.application.model.SaveStateTokenListener.afterPhase(SaveStateTokenListener.java:54)
at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.afterPhase(ADFLifecycleImpl.java:529)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchAfterEvent(LifecycleImpl.java:118)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchAfterPagePhaseEvent(LifecycleImpl.java:166)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchAfterPagePhaseEvent(ADFPhaseListener.java:122)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:68)
at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:51)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:203)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
{color:#000000}i have learned about deployment descriptors and i have made additional files and changed web.xml file:
{color:#ff0000}web.xml:
{color:#000000}....{color}
{color} <resource-ref>
<description>Nano Datasource</description>
<res-ref-name>Nano_DB_connection</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
{color:#ff0000}weblogic.xml:{color}
<?xml version = '1.0' encoding = 'windows-1252'?>
<weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<resource-description>
<res-ref-name>Nano_DB_connection</res-ref-name>
<jndi-name>Nano_DB_connection</jndi-name>
</resource-description>
</weblogic-web-app>
{color:#ff0000}weblogic-jdbc.xml:{color}
<?xml version = '1.0' encoding = 'windows-1252'?>
<jdbc-data-source xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-jdbc.xsd" xmlns="http://www.bea.com/ns/weblogic/jdbc-data-source">
<name>Nano_DB_connection</name>
<jdbc-driver-params>
<url>10.5.25.169</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>chaosdb</value>
</property>
<property>
<name>servername</name>
<value>10.5.25.169</value>
</property>
<property>
<name>portnumber</name>
<value>1521</value>
</property>
<property>
<name>sid</name>
<value>XE</value>
</property>
</properties>
</jdbc-driver-params>
<jdbc-data-source-params>
<jndi-name>Nano_DB_connection</jndi-name>
<scope>Application</scope>
</jdbc-data-source-params>
</jdbc-data-source>
in BC4J project Model.jpx tells that bc4j uses connection named Nano_DB_connection.
in Weblogic datasource name is the same
Question: how to bind my application in weblogic to existed connection/datasource in weblogic?
how Jdev deploys and configures Weblogic server, that it works fine, but when i start THE SAME server manually, deploy application using JDEV the application execution failed (see above exception)
maybe i should use EAR profile instead of WAR, to deploy all connections and other stuff to weblogic?
{color:#ff0000}please help!!!{color}
{color}{color}Hi,
Did you configure your application module to use a JDBC data source? To do this, right-click the app module in the navigator, select Configurations and in the dialog that comes up change the connection type to JDBC Data Source and enter your data source name - which should be the same as the data source you created on the weblogic server.
Also, I do suggest you create an EAR file - this is what we've tested and certified with. You can find more details in the deployment chapter of the fusion developer's guide: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/deployment_topics.htm#CHDJJDDG.
Hope this helps
Blaise -
Executable JAR using ADF displays JBO-26061: Error while opening JDBC conn.
I'm trying to create a simple Java Desktop Application (ADF) in JDeveloper 11g (11.1.2.3.0) which will run on Windows XP (SP3) simply by clicking the JAR file. I have encountered many problems and found solutions but I am now completely stuck. Currently when I execute the JAR I get (oracle.jbo.DMLException) JBO-26061: Error while opening JDBC connection.
Inside JDeveloper it runs perfectly but I want it to run without JDeveloper. If I run the executable string JDeveloper displays when you click run, this also works fine.
Here's what I've done -
Created a demo app using the 'Building a Java Swing application with Oracle ADF' tutorial as a proof of concept.
Created a deployment profile 'Client Jar Deployment Profile'
Create a new file group to include all the JAR files.
Create a manifest.mf listing all the JAR files - making sure not to exceed 70 bytes on each line and every new line starts with 2 spaces and at the end of the line there is no trailing spaces.
Made sure the jps-config.xml and cwallet.sso is included in the META-INF folder of the JAR.
I've deployed the JAR file to a folder which contains all the associated JAR files, made sure the manifest.mf is pointing to the correct files and executed my jar (double clicked it) after a short pause (2-3 seconds) that's when the error pops up.
Here is the error stack
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:218)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:45)
at oracle.jbo.server.ConnectionPoolDataSource.getConnection(ConnectionPoolDataSource.java:72)
at oracle.jbo.server.ConnectionPoolDataSource.getConnection(ConnectionPoolDataSource.java:61)
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:968)
at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1147)
at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6838)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:298)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9053)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
at oracle.adf.model.binding.DCBindingContainer.setDataControl(DCBindingContainer.java:571)
at oracle.jbo.uicli.jui.JUPanelBinding.useDefaultDataControl(JUPanelBinding.java:912)
at oracle.jbo.uicli.jui.JUPanelBinding.setup(JUPanelBinding.java:125)
at view.Form.setBindingContext(Form.java:370)
at view.Form.main(Form.java:425)
Here is my manifest
Manifest-Version: 1.0
Class-Path: adf-controller-security.jar adf-dt-at-rt.jar adf-share-bas
e.jar adf-share-ca.jar adf-share-security.jar adf-share-support.jar a
dfdt_common.jar adflibrary.jar adflogginghandler.jar adfm.jar adfshar
embean.jar adftransactionsdt.jar bc4j-mbeans.jar bc4jimdomains.jar ca
che.jar commons-cli-1.0.jar commons-el.jar db-ca.jar dms.jar dvt-jcli
ent.jar dvt-utils.jar fmw_audit.jar forms-1.0.6.jar groovy-all-1.6.3.
jar identitystore.jar inspect4.jar jacc-spi.jar javatools-nodeps.jar
javax.activation_1.1.0.0_1-1.jar javax.jsp_1.2.0.0_2-1.jar javax.mail
_1.1.0.0_1-4-1.jar javax.management.j2ee_1.0.jar javax.management_1.2
.1.jar javax.security.jacc_1.0.0.0_1-1.jar javax.servlet_1.0.0.0_2-5.
jar jdev-cm.jar jdev-rt.jar jewt4.jar jmf.jar jmxframework.jar jmxspi
.jar jps-api.jar jps-common.jar jps-ee.jar jps-internal.jar jps-manif
est.jar jps-unsupported-api.jar jsp-el-api.jar ldapjclnt11.jar list.t
xt mdsrt.jar META-INF model ojdbc6dms.jar ojdl.jar ojmisc.jar oracle-
el.jar oracle.ucp_11.1.0.jar oraclepki.jar orai18n-mapping.jar orai18
n.jar oramds.jar ordhttp.jar ordim.jar osdt_cert.jar osdt_core.jar os
dt_ws_sx.jar osdt_xmlsec.jar resourcebundle.jar runtime12.jar share.j
ar xml.jar xmlef.jar xmlparserv2.jar
Main-Class: view.Form
All of these JARs are in the same folder as my JAR.
Here's the tutorial i followed - http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_19/jdtut_11r2_19.html
Any help would be greatly appreciated. Perhaps I'm misunderstanding and Java/ADF applications are not supposed to work without the WLS.
Many thanks,
Christian.
Edited by: ChrisDugdale on Nov 15, 2012 2:41 AMThat's excellent advice, changing the connection type, I tried this before, it still gives the same error so I didn't think it had much to do with my problem but what I didn't notice is it gives a more meaningful error stack - see below, compared to my original error stack, i think you're on to something good! So, clearly the password isn't being packaged into the JAR, now I thought this might be happening which is why I added "DeployPassword" in the connections.xml file but that hasn't made a difference. I can see the connections.xml in my JAR if i expand it in the META-INF folder, so I know that's included ok, along with jps-config.xml/adf-config.xml/adfm.xml/cwallet.sso/MANIFEST.MF also in the META-INF folder (inside the JAR)
I can see the password element contains no value, but I tried changing this before with no luck. I'll try again.
connections.xml -
<?xml version = '1.0' encoding = 'UTF-8'?>
<References xmlns="http://xmlns.oracle.com/adf/jndi">
<Reference name="FOD" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="FOD" xmlns="">
<Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
<RefAddresses>
<StringRefAddr addrType="sid">
<Contents>DEVSHED</Contents>
</StringRefAddr>
<StringRefAddr addrType="subtype">
<Contents>oraJDBC</Contents>
</StringRefAddr>
<StringRefAddr addrType="port">
<Contents>1521</Contents>
</StringRefAddr>
<StringRefAddr addrType="hostname">
<Contents>moe</Contents>
</StringRefAddr>
<StringRefAddr addrType="user">
<Contents>fod</Contents>
</StringRefAddr>
<SecureRefAddr addrType="password"/>
<StringRefAddr addrType="DeployPassword">
<Contents>true</Contents>
</StringRefAddr>
<StringRefAddr addrType="oraDriverType">
<Contents>thin</Contents>
</StringRefAddr>
</RefAddresses>
</Reference>
</References>
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:207)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:580)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:313)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)
at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:66)
at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:52)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:129)
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:978)
at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1147)
at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6838)
at oracle.jbo.server.DBTransactionImpl2.connect(DBTransactionImpl2.java:130)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:213)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9053)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
at oracle.adf.model.binding.DCBindingContainer.setDataControl(DCBindingContainer.java:571)
at oracle.jbo.uicli.jui.JUPanelBinding.useDefaultDataControl(JUPanelBinding.java:912)
at oracle.jbo.uicli.jui.JUPanelBinding.setup(JUPanelBinding.java:125)
at view.Form.setBindingContext(Form.java:370)
at view.Form.main(Form.java:425)
Caused by: java.sql.SQLException: ORA-01005: null password given; logon denied
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:689)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:452)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:384)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:811)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:678)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:238)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:144)
at oracle.jbo.server.URLConnectionHelper.getConnectionFromDriver(URLConnectionHelper.java:50)
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:195)
... 31 more
## Detail 0 ##
java.sql.SQLException: ORA-01005: null password given; logon denied
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:689)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:452)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:384)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:811)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:678)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:238)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:144)
at oracle.jbo.server.URLConnectionHelper.getConnectionFromDriver(URLConnectionHelper.java:50)
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:195)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:580)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:313)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)
at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:66)
at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:52)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:129)
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:978)
at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1147)
at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6838)
at oracle.jbo.server.DBTransactionImpl2.connect(DBTransactionImpl2.java:130)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:213)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9053)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
at oracle.adf.model.binding.DCBindingContainer.setDataControl(DCBindingContainer.java:571)
at oracle.jbo.uicli.jui.JUPanelBinding.useDefaultDataControl(JUPanelBinding.java:912)
at oracle.jbo.uicli.jui.JUPanelBinding.setup(JUPanelBinding.java:125)
at view.Form.setBindingContext(Form.java:370)
at view.Form.main(Form.java:425)
----- Level 1: Detail 0 -----
java.sql.SQLException: ORA-01005: null password given; logon denied
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:689)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:452)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:384)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:811)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:678)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:238)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:144)
at oracle.jbo.server.URLConnectionHelper.getConnectionFromDriver(URLConnectionHelper.java:50)
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:195)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:580)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:313)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)
at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:66)
at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:52)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:129)
at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:978)
at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1147)
at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6838)
at oracle.jbo.server.DBTransactionImpl2.connect(DBTransactionImpl2.java:130)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:213)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9053)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4697)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
at oracle.adf.model.binding.DCBindingContainer.setDataControl(DCBindingContainer.java:571)
at oracle.jbo.uicli.jui.JUPanelBinding.useDefaultDataControl(JUPanelBinding.java:912)
at oracle.jbo.uicli.jui.JUPanelBinding.setup(JUPanelBinding.java:125)
at view.Form.setBindingContext(Form.java:370)
at view.Form.main(Form.java:425) -
Dynamic JDBC Credentials and using ADF Region ERROR
Hi,
I used solution by Steve Muench, Dynamic JDBC Credentials (for ADF Faces Rich Client)
(129. 11g Dynamic JDBC Credentials for Model 1, Struts, Trinidad, and ADF Faces Rich Client 11.1.1.0.0 06-AUG-2008), but it works not correct in case of using ADF Dynamic Region (or simply ADF Region).
I have added in ViewControllerJSFRichFaces a page (main.jspx) including ADF Dynamic Region consisting of 2 simple tasks flows. Action of the Login button, if login and password are correct, redirect to main.jspx
There are to cases.
1) Login and password are correct:
In this case all work fine.
2) Login and password are not correct:
It does not work. redirect to login.jspx does not occur as it is expected, but the following page (main.jspx) is loaded, herewith thrown exception: oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
I would be very grateful you for help.Hi,
hard to say from your description if this is a bug or an implementation problem. Note that errors that occur in regions are not handled by the exception handler of the the parent page and require special handling within the region. In other words, if the problem is in the region then it needs to be handled in here. I think the right strategy here is to not show the region until a valid connection exist. Is the login performed from the parent page ?
Frank -
ADF: Gracefully handling JDBC connection errors? Part II
Hi gang
I while back I posted a forum post to find a solution to "display a specific web page when the JDBC connection drops out on our ADF application, specifically the following error: oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection"
...you can see the original post here:
Re: ADF: Gracefully handling JDBC connection errors?
For the life of me I can't get this to work now. It appears I can't redirect to another page during the call to reportException. I've had a play with different methods of redirecting, as seen in the following code sample:
public class ErrorHandlerImpl extends DCErrorHandlerImpl {
public ErrorHandlerImpl() {
super(true);
@Override
public void reportException(DCBindingContainer dCBindingContainer, Exception exception) {
// try {
String message = exception.getMessage();
if (message.indexOf("JBO-26061") >= 0) {
// Method 1
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot viewRoot =
fc.getApplication().getViewHandler().createView(fc, "faces/errorPage.jspx");
fc.setViewRoot(viewRoot);
fc.renderResponse();
// Method 2
// FacesContext fc = FacesContext.getCurrentInstance();
// fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "goError");
// fc.responseComplete();
// Method 3 - required IOExcepition handler
// FacesContext.getCurrentInstance().getExternalContext().redirect("faces/errorPage.jspx");
} else
super.reportException(dCBindingContainer, exception);
// } catch (IOException e) {
}... with no success.
Has anyobody any other solutions or advice on getting this to work?
Your help appreciated.
Thanks & regads,
CM.
PS. JDev 11gR1 ADF BC + ADF Faces RCHi Frank
Yep, I' tried redirect, that was method 3 (you can see all 3 methods I've attempted, last 2 are commented out).
With the declarative ADFc exception handler, problem is it's a catch all, not specifically for JBO-26061. Can you think of a way I can tailor fit it for JBO-26061 with a custom message "Database down"?
In addition the exception handler is not consistently called. As example, if you're moving between pages rather than operating on 1 page, the standard af:messages error dialog is shown if the db connection has been dropped, rather than navigating to the exception handler page. As such it seems the DCErrorHandlerImpl.reportExceptions is the better chokepoint to work from.
Cheers,
CM. -
ADF: Gracefully handling JDBC connection errors?
Hi gang
We've a use case to display a specific web page when the JDBC connection drops out on our ADF application, specifically the following error:
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
I've been researching solutions to this and came up with a near solution of placing the following entry in the application's web.xml file:
<error-page>
<exception-type>oracle.jbo.DMLException</exception-type>
<location>/MyErrorPage.jsp</location>
</error-page>This works okay but is a blunt mechanism as it captures all DMLExceptions which includes insert/update/delete failures, as well as the JDBC connection drop out.
Has anybody come up with a better solution for handling JDBC connection drop outs?
Thanks & regards,
CM.
PS. (JDev 11g build 5188, ADF BC + ADF Faces RC)Thanks John, that's the solution. For some reason I'd forgotten that DCErrorHandlerImpl exists in the controller layer, not the model layer, so it makes perfect sense to override it and do the redirect.
Here's what I came up with:
@Override
public void reportException(DCBindingContainer dCBindingContainer,
Exception exception) {
try {
String message = exception.getMessage();
if (message.indexOf("JBO-26061") >= 0) {
FacesContext.getCurrentInstance().getExternalContext().redirect("faces/ErrorPageJDBCFailure.jspx");
} else
super.reportException(dCBindingContainer, exception);
} catch (IOException e) {
}The following OTN post shows some other methods to do the redirect: JSF forward Vs redirect
Cheers!
CM. -
How to create db conn for JDBC-ODBC Bridge for MS Access in ADF APP?
Sir,
How to create db conn for JDBC-ODBC Bridge for MS Access in ADF APP?
RegardsHello Every Body!
I succeeded in getting connect to the ms access database in adf application in jdeveloper as below:
First in control panel to to admin tools and go to data source(odbc) and create system dsn as bellow pic
Then go to jdeveloper resources ide conn and then database and new database conn and then select jdbc-odbc briddge and then give custom jdbc url as bellow pic
Cheers
tanvir -
ADF Bindings CRUD with either JDBC or Hibernate
Does anyone know of an example CRUD application that uses ADF Bindings and either Hibernate or JDBC.
The site...
http://technology.amis.nl/blog/index.php?p=765
uses ADF Bindings and Hibernate, but does not update a database.
I have attempted to do this myself, but when my add/edit page loads, all of my af:inputtext controls display labels instead of input boxes.
There are several ADF Biding examples for both Toplink and ADF BC, but if anyone can point me in the direction of examples for JDBC and/or Hibernate, I would appreciate it.I have created the target datacontrol for ADF Binding.
In my DataContorls.dcx file, my datacontrol (a JavaBeanDataControl, not an AdapterDataControl) has its SupportsUpdates attribute = "false".
When I create a form, the #{bindings.<my_property>.updateable} expression returns false, making it so my af:inputText controls cannot take input data. If I manually set SupportUpdates="true", my #{bindings.<my_property>.updateable} expression still returns false.
If anyone knows how to set it so I can make it so I can update my java objects, I think I will be set.
Any help would be appreciated. -
ADF Bc third party JDBC Driver java.sql.SQLException: No suitable driver
Hello all
I am using JT400.jar file to connect to AS/400 data base in my JSF/ADF Application.
We are using shared library for all non oracle jar files . and my application fails with error message
## Detail 0 ##
java.sql.SQLException: No suitable driver
During runtime. even though i am importing the required jar files from shared library settings in server.xml / application.xml
When i don't have the entry in shared library for this jar file it will fail during deployment time it self, but with shared library link it works during deployment but fails during runtime
it will work during runtime if i add my jar file to BC4J/lib folder. but team responsible for mintaining application server don't accept adding non oracle jar files to oracle installation folders
i have also posted this in jdev forum
Please Advise
ThanksThanks for reply
i am using Sqlserver 2000 as back end
import java.sql.*;
import java.net.*;
public class MysqlConnect{
public static void main(String[] args) {
System.out.println("MySQL Connect Example.");
Connection conn = null;
// String url = "jdbc:mysql:/localhost:3306/";
String url = "jdbc:microsoft:sqlserver/GTEXC/";
String dbName = "java";
// String driver = "Sun.Jdbc.Odbc.JdbcOdbcdriver";
String userName = "root";
String password = "root";
try {
Driver d=(Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
conn = DriverManager.getConnection(url+dbName,userName,password);
System.out.println("Connected to the database");
conn.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
} -
ADF panel opening too many JDBC Thin Client database sessions.
Hi All,
I have several ADF Panels, which allows the user to run a few simple queries against an Oracle database done using ADF view objects and ADF view links and ADF application module.
Each ADF panel as I said contains several View Link queries, and links under the form of Jbuttons to other ADF Panels running other ADF View Links.
Running the ADF Panel as described here opens up to 21 database sessions displaying as “JDBC Thin Client” when I look them up from v$session.
Why do I end up with that many database sessions.
Why doesn’t it just use one or two database sessions to run all these View Links? It seems that it is opening one database session for each of these view links.
How can I change this destructive behavior? I only one to see one or two database sessions for the entire ADF panel no matter how many ADF View Links it contains.
Your suggestions are most appreciated.
Thanks.
Bobby A.Thanks for your response.
I took a quick look at the docs you pointed me to. It seems that I can set some parameters in bc4j.xcfg of each application module Home to control number of database connections that the application module will create. In that case maybe you can recommend which parameters and what value they should be set to.
Your response will be most helpful as my background is rather in database admin and not java.
Thanks.
Bobby A. -
JDBC Thick connection using ADF
Hi All,
I am doing Thick Oracle connection using ADF but i am getting this error...
java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
following is my code..
try {
Class.forName("oracle.jdbc.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:oci8:@dbndevp", "mfonline", "mfonline");
System.out.println(con.isValid(1));
} catch (Exception e) {
e.printStackTrace();
So how can i do it in ADF......
-Thanks
Edited by: Santosh Vaza on Dec 31, 2010 6:14 PMSuppose i have a backing bean class then how would i get connection to database, Suppose that i am using 2 connections to 2 different database.Case 1: If you are using ADF Business Components (or some other framework that implements "business services" layer)
In this case ADF BC implement the "business services" layer in the application architecture and they are responsible for the interaction with the DB. You should encapsulate there all the program logic that interacts directly with the DB. You can invoke ADF BC methods from managed beans but you should not implement any direct DB operations in managed beans (in particular you should not open DB connections, parse and execute SQL statements in managed beans). If you need to work with 2 different databases, then you have to define 2 different ApplicationModules (with connections to these databases). There is an important disadvantage - ADF BC does not support global transactions (e.g. XA-compatible transactions), so if you need distrubuted transactions, then either you could use DB-links (if both databases are Oracle ones) or you will need a different framework.
Case 2: If you are not using any framework that implements "business services" layer
In this case you should not use DriverManager, but you could get DB connections from JDBC DataSources. In this way you would benefit from the connection pooling of the DataSources and you would avoid the heavy overhead of creating and closing DB connections. (When you close a DB connection acquired from a DataSource, in fact it is not closed but it is just checked back into the DataSource's connection pool).
Dimitar -
ADF BC standalone app and JDBC data source
Hi,
I have created a small ADF BC (swing) application that is not using ANY application server. It's just a small rich client app. It's using a table on an Oracle database. In JDeveloper I have set the Connection Type in the AppModule to JDBC URL and thsi works just fine.
However, using that method makes it impossible to deploy the app sinice the JDBC URL is hardcoded. I thought changing the Connection Type to JDBC DataSource would solve my problem. But now I get the message that the JNDI data source could not be found.
What do I need to do to make this work? I just want to have the app not being bound to a specific database/host.
Thank you for any help!
/Bruno
(oracle.jbo.common.ampool.ApplicationPoolException) JBO-30003: The application pool (oracle.model.AppModuleLocal) failed to checkout an application module due to the following exception:
----- LEVEL 1: DETAIL 0 -----
(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-27200: JNDI failure. Unable to lookup Data Source at context FWRK
----- LEVEL 2: DETAIL 0 -----
(oracle.jbo.DMLException) JBO-27200: JNDI failure. Unable to lookup Data Source at context FWRK
----- LEVEL 3: DETAIL 0 -----
(javax.naming.NoInitialContextException) Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initialHi,
as mentioned in the original post there is no application server involved. It's a standalone rich client application which is running locally on the client computer. It just needs to read some data from a database.
/Bruno
Maybe you are looking for
-
What is the spool, what is its role in background job scheduling
Hi, I want to know what is meant by Spool request and spool number generated. Tell about transaction SP01. How it is linked to Background job scheduling. thanks. sam.
-
Itunes cannot open because another user is using it, please ask them to clo
I'm on a network with my sister and little brother, but none of us will be using itunes and when I try to get in it, it says that "Itunes cannot open becuase it is currently being used by another user, please have them close out to continue" or somet
-
Alltel 8130 and Nissan Bluetooth Car Kit
HELP!!! New Nissan Altima with Bluetooth Car Kit. I am able to pair no problem, make and receive call without a hitch. Downloaded phone book with ease. The problem is whenever I use the phone with the car kit after I exit the car the phone locks u
-
Upgraded to ios 8.1 still 3g problem persists
i have upgraded my iphone 5 to ios 8.1 still 3g dosen't work.............. The problem still persists...
-
Unable to turn on Advanced Search for viewing PDFs (v9.1) through IE7
Our company is currently using Acrobat 9.1 and Internet Explorer 7. We have multiple PDF document sets set up to be searched using index files. The Index feature can only be accessed using the Advanced Search option of Acrobat Reader or Pro 9.1. When