JDBC: Connection is close problem

Hi everyone,
Can help me solve this problem, i insert two sql statement into the database using the within a method but i got a connection is close error. Why? can anyone help me to solve this problem. Thanks
Here is my code:
dbc.open();
String sql = "INSERT INTO LoanRecord " +"(borrow_date, total_fine, member_id)"+ " Values ('"+ borrowDate +"', '"+ 0.00 +"', '"+ m.getMemberId() +"')";
dbc.create(sql);
dbc.close();
DBController dbc2 = new DBController("WISE");
dbc2.open();
String sql2 = "INSERT INTO LoanedItem " +"(item_id, due_date, fine)"+
     "Values (" + i.getId() + ", '"+ d_date  +"', '"+ 0.00 +"')";
dbc2.create(sql2);
dbc2.close();I have try to use one dbc but it still give me the error.

Without seeing the contents of dbc.open(), dbc.create() and dbc.close(), it's hard to tell. Are these being down one right after another? If so, why not open a Connection, use it for all the updates and then close it when finished? Also, you might want to consider using PreparedStatements; they would make the code/SQL much more readable. And, finally, you might also consider using batchUpdate().
Jamie

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

  • Jdbc connectivity through applet problem   urgent ASAP

    hi ,
    am trying to connect to the oracle database through applet. it gives a classnotfound exception . the same code works for other applications but not through the applet . why ? any idea to get it worked.I need to use this applet in a jsp file . in jsp file it gives an SQLexception as : java.security.AccessControlException:access denied(java.util.PropertyPermission oracle.jserver.version read)
    how do i get it solved . please help me.
    here is the applet code :
    import java.awt.*;
    import javax.swing.*;
    import java.lang.*;
    import java.util.*;
    import java.sql.*;
    public class Dot extends JApplet
        int xinterval,yinterval;
         private String message = "Initializing";
      //  int xexp=-40,yexp=20;
        Vector result = new Vector();
        Vector result1 = new Vector();
         public void init()
         int max = 100;
         int min = -100;
         xinterval = max/10;
         yinterval = min/10;
         try{     
         Class.forName("oracle.jdbc.driver.OracleDriver");
         Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL","chandu","chandu");
         PreparedStatement ps = con.prepareStatement("select name,expression_level,functional_classification from viewall where subexperiment_id = SRB4delta");
         PreparedStatement ps1 = con.prepareStatement("select name,expression_level,functional_classification from viewall where subexperiment_id = SRB5delta");
        ResultSet rs = ps.executeQuery();
        ResultSet rs1 = ps1.executeQuery();
         while(rs.next()){
              String arr[] = new String [3];
              arr[1]=rs.getString(1);
              arr[2]=rs.getString(2);
            arr[3]=rs.getString(3);
              result.addElement(arr);
    while(rs1.next()){
              String arr[] = new String [3];
              arr[1]=rs.getString(1);
              arr[2]=rs.getString(2);
            arr[3]=rs.getString(3);
              result1.addElement(arr);
         con.close();
         rs1.close();
         rs.close();
    catch (Exception e)
                  setError("SQLException: " + e);
         public void paint (Graphics g)
    if (result == null) {
             g.drawString(message, 5, 50);
             return;
         for(int i = 0 ; i<=10;i++){
              String temp= String.valueOf(xinterval*i);
              String temp1=String.valueOf(xinterval*(10-i));
              g.drawString(temp,500+(50*i),510);
            g.drawString(temp1,480,(50*i));
             temp=String.valueOf(yinterval*i);
              temp1=String.valueOf(yinterval*(10-i));
            g.drawString(temp,480,500+(50*i));
            g.drawString(temp1,(50*i),510);
         g.drawLine(500,0,500,1000);
        g.drawLine(0,500,1000,500);
        Enumeration enum = result.elements();   
        Enumeration enum1 = result1.elements();   
         while (enum.hasMoreElements() & enum1.hasMoreElements()) {
           String arr[] = new String [3];
             String arr1[] = new String [3];
           arr = (String [])enum.nextElement();
          arr1 = (String [])enum1.nextElement();      
         String col = arr[2] ;
         if(col.equals("CC"))
              g.setColor(Color.red);
         else if(col.equals("CF"))
              g.setColor(Color.green);
         else if (col.equals("S"))
              g.setColor(Color.blue);
         else if (col.equals("T"))
              g.setColor(Color.gray);
         else if (col.equals("U"))
              g.setColor(Color.pink);
         else if (col.equals("M"))
             g.setColor(Color.magenta);
         else if (col.equals("E"))
            g.setColor(Color.yellow);
         else
             g.setColor(Color.black);
        int xexp = Integer.parseInt(arr[1]);
         int yexp = Integer.parseInt(arr1[1]);
        g.drawString("test",500,600);
         if(yexp<0 & xexp>0)
          g.fillOval(500+((xexp/10)*50),500-((yexp/10)*50),8,8);
         if(yexp<0 & xexp<0)
                  g.fillOval(500+((xexp/10)*50),500-((yexp/10)*50),8,8);
         if(yexp>0 & xexp>0)
                  g.fillOval(500+((xexp/10)*50),500-((yexp/10)*50),8,8);
         if(yexp>0 & xexp<0){
                  g.fillOval(500+((xexp/10)*50),500-((yexp/10)*50),8,8);
        private synchronized void setError(String mess) {
         result = null;     
         message = mess;     
         repaint();
    }

    In contrast to what many people say in this forum, it is possible to have an unsigned applet access a database. You don't even have to manipulate the client's policy-file. The requirement is that the database is located on the same machine as the applet is downloaded from.There are however other things that can break this possibility. One is the database-driver itself.
    In the case of Oracle we have tried using different versions of the driver. When using version 8.1.7 or 9.0.1 things work nicely, but when switching to version 9.2 it stops working. There is a question on OTN [1]. Let's see what Oracle has to say about it.
    [1] Problem connecting using Oracle JDBC drivers

  • Crystal Reports's JRC. How to close JDBC connection?

    Hi!
    I have simple CR JRC application under Oracle AS 10.1.2.0.2, made from Crystal's sample codes.
    It works fine, but there is little problem: after closing vievwer's page JDBC connections stays alive.
    How can I close them?
    Here is my 2 jsp:
    ---------- Page1.jsp -----------------
    "<%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="com.crystaldecisions.reports.sdk.*" %>
    <%@page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%
    // open the report rpt file
    String REPORT_NAME = "directs_q_d1.rpt";
    String Login =request.getParameter("p1");
    String Password =request.getParameter("p2");
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(REPORT_NAME, 0);
    reportClientDoc.getDatabaseController().logon(Login,Password);
    ParameterFieldController paramFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    paramFieldController.setCurrentValue("", "reportname", new String("DIRECTS_QUARTERLY"));
    session.setAttribute("reportSource", reportClientDoc.getReportSource());
    reportClientDoc.close();
    response.sendRedirect("CrystalReportViewer.jsp");
    %>
    and
    ----------- CrystalReportViewer.jsp ------------------------
    <%//Crystal Report Viewer imports.%>
    <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page import="com.crystaldecisions.reports.sdk.*" %>
    <%
    //Refer to the Viewers SDK in the Java Developer Documentation for more information on using the CrystalReportViewer
    //API.
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setOwnPage(true);
    viewer.setOwnForm(true);
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    viewer.setHasRefreshButton(false);
    viewer.setEnableDrillDown(false);
    viewer.setDisplayGroupTree(false);
    viewer.setHasToggleGroupTreeButton(false);
    viewer.setHasViewList(false);
    viewer.setHasLogo(false);
    //Get the report source object that this viewer will be displaying.
    Object reportSource = session.getAttribute("reportSource");
    viewer.setReportSource(reportSource);
    //Render the report.
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    viewer.dispose();
    %>
    -------------------------------------

    Oh, i'm sorry :) It was a "time-out" tag in CRconfig.xml. Tipic closed.

  • Problem closing sockets when using OCI8 JDBC connections

    Hi,
    We have a java thread that maintains a socket connection with a Telnet client. We are finding that this thread is unable to successfully close this connection with Socket.close(). The reason that close() fails appears to be that the same thread is creating an (OCI8 driver) JDBC connection via another Java object. If we don't create the JDBC connection within this thread the socket closes correctly.
    Has anybody else experienced such problems?
    We believe that this problem might be related to a BugRat report #391.
    Cheers.
    Max
    null

    Sounds like a mis-match between the JDBC Drivers and the installed Oracle Client.
    The JDBC Drivers with JDeveloper 9.0.3 should be the 9.0.1.3 versions (included with the iAS Admin Client and iAS 9.0.2)
    Also note, the JDBC driver used by OC4J is "classes12dms.jar", not "classes12.jar"
    Hope this helps,
    Rob

  • Jdbc connection leak problem in wls 8.1 sp1

    Fellows!
    I have problem finding a jdbc connection leak and hope to get some tips from
    a som friendly person who has some experience about this.
    The application contains some 100 classes and CMP beans.
    All connections are fetched with datasource.getConnection and are realesed
    in finally() immediately after the sql-query is done.
    Except for the entity beans of course which has the transaction required
    attribute set.
    Any ideas much appreciated!
    Best regards from the top of Europe - Luleå.
    Here the first snow has been falling and thin ice has freezed on the gulf of
    bothnia.
    Stefan

    Stefan Johansson wrote:
    Fellows!
    I have problem finding a jdbc connection leak and hope to get some tips from
    a som friendly person who has some experience about this.
    The application contains some 100 classes and CMP beans.
    All connections are fetched with datasource.getConnection and are realesed
    in finally() immediately after the sql-query is done.
    Except for the entity beans of course which has the transaction required
    attribute set.Hi. I don't understand this last 'except'. All jdbc code in bean methods
    should be defining a connection as a method variable, obtaining it from
    a TxDataSource in a try block, used completely, and closed as the only/first
    thing in the finally block. We will handle the close() correctly, it won't
    hurt the tx if there is one, and it will do the right thing if there isn't one.
    How do you know there's a leak? Usually our leak-detection shows where the connection
    was made, so you can find out why it wasn't closed...
    Joe
    >
    Any ideas much appreciated!
    Best regards from the top of Europe - Luleå.
    Here the first snow has been falling and thin ice has freezed on the gulf of
    bothnia.
    Stefan

  • Language problem with my jdbc connection

    Hello,
    i'm having a problem with my jdbc connection.
    the problem is that i'm connecting to MS- Access db the have arabic tables, and columns, it was working fine on a windows XP environment prepared for arabic language, but when i had to move to windows vista it did not work and it gave me an exception.
    i'm using netbeans 6.1 IDE, and the exception is
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3110)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
    when i printed the select statement and the exception it gave me:
    SELECT [??? ???????], [??? ??????], [??? ?????], [??? ?????], [????? ???????????] FROM EDU_DIVISION; [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect.
    the question marks are very weird to appear!!!!!!
    here is the code:
    public void edu_branch() {
            sucpy = 0;
            eflag = 0;
            asql = "SELECT [\u0643\u0648\u062F \u0627\u0644\u062C\u0627\u0645\u0639\u0629], [\u0643\u0648\u062F \u0627\u0644\u0643\u0644\u064A\u0629], [\u0643\u0648\u062F \u0627\u0644\u0642\u0633\u0645], [\u0643\u0648\u062F \u0627\u0644\u0634\u0639\u0628\u0629], [\u0627\u0633\u0645 \u0627\u0644\u0634\u0639\u0628\u0629], [\u0627\u0633\u0645 \u0627\u0644\u0634\u0639\u0628\u0629 \u0628\u0627\u0644\u0627\u0646\u062C\u0644\u064A\u0632\u064A\u0629], [\u0627\u0644\u0643\u0648\u062F \u0627\u0644\u0645\u062E\u062A\u0635\u0631] FROM EDU_BRANCH;";
            Connection connection;
            Statement statement;
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                connection = DriverManager.getConnection("jdbc:odbc:info");
                System.out.println("Connection to Access file is created...");
                statement = connection.createStatement();
                statement.execute(asql);
                System.out.println("Executing query : " + asql);
                aset = statement.getResultSet();
                if (aset != null) {
    //------------------------------Oracle operations--------------------------------------------------------------------                  
                    while (aset.next()) {
        can you help me please

    arabic language
    SELECT [??? ???????], [??? ??????], [??? ?????], [??? ?????], [????? ???????????] FROM EDU_DIVISION; >[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect.
    the question marks are very weird to appear!!!!!!It failed to understand your unicode sql.
    it was working fine on a windows XP environment prepared for arabic language, but when i had to move to windows vista it did not workStrange. Maybe you need to compare the differences of some system properties on both hosts, for instance, sun.io.unicode.encoding, file.encoding, user.region, and so on.

  • Problem w. transaction notSupported / releasing JDBC connections

              We are making a call from our EJB client to a stateless session EJB (1) with transaction attribute 'Required' for all methods. From this EJB (1) we get a JDBC connection from the pool and do some JDBC calls (no updates). We then make a call to a method in another stateles session EJB (2) with transaction attribute 'NotSupported' for all methods. In EJB2 we get a JDBC connection from the pool and do some JDBC calls (no updates). Something goes wrong and we catch a SqlException. We then throw a EJBException. So far everything is OK. But now we get a SqlException from the transaction: 'java.sql.SQLException: Connection is currently associated with xid: 970661671558_182.Rollback attempted in the scope of a different transaction'. It seems like the container tries to perform a rollback on the EJB tat doesn't support transactions. Shouldn't the transaction have been suspended when we entered the method in EJB2? Our problem is that the JDBC connection we got from the pool doesn't get released even though we closed it in a finally-statement in both EJB:s. So after some time we are out of free JDBC connections in our connection pool. Does anyone know why this happens?
              /Per
              

              We are making a call from our EJB client to a stateless session EJB (1) with transaction attribute 'Required' for all methods. From this EJB (1) we get a JDBC connection from the pool and do some JDBC calls (no updates). We then make a call to a method in another stateles session EJB (2) with transaction attribute 'NotSupported' for all methods. In EJB2 we get a JDBC connection from the pool and do some JDBC calls (no updates). Something goes wrong and we catch a SqlException. We then throw a EJBException. So far everything is OK. But now we get a SqlException from the transaction: 'java.sql.SQLException: Connection is currently associated with xid: 970661671558_182.Rollback attempted in the scope of a different transaction'. It seems like the container tries to perform a rollback on the EJB tat doesn't support transactions. Shouldn't the transaction have been suspended when we entered the method in EJB2? Our problem is that the JDBC connection we got from the pool doesn't get released even though we closed it in a finally-statement in both EJB:s. So after some time we are out of free JDBC connections in our connection pool. Does anyone know why this happens?
              /Per
              

  • ResultSet problem with a jdbc connection pool implementation

    Hi
    I'm trying to use jdbc connection pool in my java application (js2e 1.4.0_01)
    from the example at http://www.developer.com/tech/article.php/626141
    In my main() code, in addition to JDBCConnection, JDBCConnectionImpl and JDBCPool classes, i use
    JDBCConnection conn;
    conn = new JDBCConnection(dbName);
    // make a statement
    sqlString = "SELECT........."
    ResultSet rs = null;
    rs = conn.sendRequest(sqlString, rs);
    // print result
    while (rs.next()) {
    Unfortunately i get an error like "ResultSet is closed" in the line corresponding to rs.next. The error disappears if i remove the line
    stmt.close();
    in the method sendRequest of the JDBCConnectionImpl class.
    1) Does anybody knows the solution?
    2) How to close all connections?
    Thanks you in advance.

    Hi ,
    You are closing the statement and then trying to use resultset , which is not going to work .So close then statment after using resultset .Ideally the code should be like this
    try {
    conn = // get the connection
    pstmt = conn.prepareStatement(sql);
    rs = pstmt.executeQuery();
    while ( rs.next()){
    // do something
    catch (Exception ex) {
    finally {
    try {
    if (rs != null)
    rs.close();
    if (pstmt != null)
    pstmt.close();
    if(conn!=null )
    conn.close();

  • How to close open JDBC connections

    Hi people. I´m Using Jdev 10.1.3.2 and OAS 10g.
    In my application when a User closes the browser or click in logout, the JDBC connection remains active on the server.
    I wonder what the best measure to close these connections on logout of the system?
    Thanks Willian

    You might want to read the chapter about how ADF BC handles the database connections and what variables you have to control it:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcservices.htm#CHDJDBJB
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcampool.htm#sm0306
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/deployment_topics.htm#CHDFJADJ

  • MSSQLServer jdbc connect problem on ODI 11G R2

    I have a MS SQL Server jdbc connect problem on ODI 11G R2 / Windows server 2008 64 bits.
    Tried, one by one, all versions of Microsoft drivers.
    Sqljdbc4.jar copied to : %appdata%\odi\oracledi\userlib\
    The Topology connect syntax is :
    driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL : jdbc:sqlserver://<host>:1433
    => All the topology tests end with time-outs.
    Installed 10G ODI.
    Works with 1.4 java and sqljdbc.jar version 2 jdbc driver.
    Times out with version 3 and/or Sqljdbc4.jar + JAVA_HOME & ODI_JAVA_HOME set to 1.6 path.
    also tried, with no success (time-outs) on either 10g or 11g :
    com.inet.tds.TdsDriver
    jdbc:inetdae7://<host>:1433?database=<DB>
    same results for :
    net.sourceforge.jtds.jdbc.Driver
    jdbc:jtds:sqlserver://<host>:1433
    Any suggestions for a fix?
    Many thanks in advance.

    Hello,
    ODI (11g) Studio is certified on Windows 32 bit only, not on 64bit.
    However you may still install it and configure ODI Studio to run with a 32 bit java.
    Details pls see Master Note For ODI 11g Install Issues And Questions (Doc ID 1214428.1).
    To connect to SQL Server:
    # Check and make sure the authentication mode of your Microsoft SQL Server Server is set to "SQL Server and Windows" or "Mixed", otherwise Oracle Data Integrator (ODI) is unable to connect to the database.
    # Before you create the Oracle Data Integrator (ODI) Dataserver in Topology Manager > Physical Architecture, stop all ODI processes, and place the JDBC Driver file in the ODI's userlib and "/drivers" folder.
    For ODI Studio (Local No Agent)
    %APPDATA%\odi\oracledi\userlib
    %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<user>\Application Data).
    Standalone Agent
    ODI_HOME\oracledi\agent\drivers
    Note: If you decide to use the DataDirect driver that comes with ODI 11g install/ embedded in ODI 11g
    weblogic.jdbc.sqlserver.SQLServerDriver
    Then you don't need to worry about this step.
    # Make sure that the database is the default database of the user account employed by ODI for connection, and that the password is correct.
    # Verify (in your Microsoft SQL Server Server network configuration) that TCP/IP has been enabled on port 1433.
    For more details see How To Set Up JDBC Driver Connections For The Microsoft SQL Server For ODI (Doc ID 423914.1)
    If you try sqljdbc.jar, you need to configure ODI_JAVA_HOME to jdk1.5
    sqljdbc4.jar, jdk1.6 (since ODI 11g requires jdk1.6, I'd suggest sqljdbc4.jar)
    More see Compatibility Matrix For Java Machines And JDBC Drivers Used With ODI (Doc ID 807235.1)
    Hope that helps other people who run into this,
    Edited by: user742480 on Apr 4, 2011 12:06 PM

  • Xa-problems when releasing jdbc connection

    We have a very strange problem with our WL setup.
    Weblogic 8.1.4 (2 cluster nodes)
    Oracle 9i stand alone db (although tested on RAC with 2 nodes)
    The application architecture is quite complicated, with several EJB-applications that communicate via JMS and RMI. Everything (except logging) runs under xa-transactions that span multiple applications. We use both xa (for everything but logging) and non-xa jdbc connection pools (Oracle thin driver).
    When we release a jdbc connection then the following node manager log entry is written:
    <Mar 13, 2006 11:11:02 AM UTC> <Error> <JDBC> <BEA-001112> <Test "SELECT 1 FROM DUAL" set up for pool "myPoolXA" failed with exception: "oracle.jdbc.xa.OracleXAException".>
    <Mar 13, 2006 11:11:02 AM UTC> <Error> <JDBC> <BEA-001035> <The following error has occured: XA operation failed : java.lang.NullPointerException
    at weblogic.jdbc.wrapper.VendorXAResource.rollback(VendorXAResource.java:78)
    at weblogic.jdbc.jta.DataSource.rollback(DataSource.java:1047)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:1358)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:687)
    at weblogic.transaction.internal.ServerSCInfo.startRollback(ServerSCInfo.java:729)
    at weblogic.transaction.internal.ServerTransactionImpl.localRollback(ServerTransactionImpl.java:1909)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRollback(ServerTransactionImpl.java:2592)
    at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:385)
    at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:364)
    at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:279)
    at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:140)
    at com.xx.myapp.ejb.MessageMgmt_s1i1u8_EOImpl.processMessage(MessageMgmt_s1i1u8_EOImpl.java:56)
    at com.xx.myapp.ejb.MessageMgmt_s1i1u8_EOImpl_CBV.processMessage(Unknown Source)
    at com.xx.myapp.ejb.TextMessageReceiverBean.onMessage(TextMessageReceiverBean.java:120)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    As we understand the message this means that the jdbc resource wrapper crashes with a NPE.
    Are there any hints on this situation ?
    Regards
    Nikolaus Rumm

    Additional information:
    We use Hibernate as the persistence layer. The problem arises when the application detects a business problem and calls setRollbackOnly() on the session bean's ejb context, followed by a "throw ApplicationException" (extends java.lang.Exception).
    When we use unchecked exceptions for business exceptions (which violates the EJB spec) everything works fine.

  • App Server 8.1 JDBC Connection problem

    Dear Expert,
    Cu are using Sun Java System Application Server Enterprise Edition 8.1. Cu created one jdbc connection pool and datasource. They are called
    jdbc/RM
    From the App Server Admin Console -> Connection Pool, cu can "Ping" the database via the connection pool.
    Cu did the configuration on web.xml and sun-web.xml
    web.xml
    <resource-ref>
    <description>Oracle Database Connection - Rawmart</description>
    <res-ref-name>jdbc/RM</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    sun-web.xml
    <resource-ref>
    <res-ref-name>jdbc/RM</res-ref-name>
    <jndi-name>jdbc/RM</jndi-name>
    </resource-ref>
    In customer class,
    220: protected void initDataSource() throws NamingException {
    221: initContext = new InitialContext();
    222: envContext = (Context) initContext.lookup("java:comp/env");
    223: String dataSource = rConfigObject.getConfigValue("DATASOURCE");
    224: rDataSource = (DataSource) envContext.lookup(dataSource);
    225: }Exception occurs on line no. 222 already.
    From server.log, we get
    ================
    #|2005-06-03T11:36:11.562+0800|WARNING|sun-appserver-ee8.1|javax.enterprise.system.stream.err|_ThreadID=10;|
    javax.naming.NameNotFoundException: No object bound for java:comp/env [Root exception is java.lang.NullPointerException]
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:161)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at com.ns.DBObject.initDataSource(DBObject.java:222)
    at com.ns.DBObject.connectPool(DBObject.java:213)
    at com.ns.DBObject.<init>(DBObject.java:91)
    at com.ns.DBObject.getInstance(DBObject.java:122)
    at com.ncharter.NCContextListener.contextInitialized(NCContextListener.java:28)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4010)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4525)
    ===============
    Do you have any ideas on this problem? Thanks.
    Regards,
    Angus

    Try asking the Customer to fire up the JNDI browser in the admin console and try to browse the JNDI tree.
    What class is the InitialContext.lookup() happening in? Is that getting executed in the servlet class or a standalone client?
    thanks.

  • Getting JDBC Connection exception... what is the problem

    I have connection problem and I get the following... Do you have any idea what it might be? Many thanks.
    [java] org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    [java] The last packet successfully received from the server was 82 milliseconds ago. The last packet sent successfully to the server was 82 milliseconds ago.
    [java] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
    [java] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)
    [java] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
    [java] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666)
    [java] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:698)
    [java] at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:133)
    [java] at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:137)
    [java] at se.kth.ite.mss.KurserUtil.getSenasteValdaKurser(KurserUtil.java:71)
    [java] at org.apache.jsp.minasidor.kurser.nyaKurser_jsp._jspService(nyaKurser_jsp.java:91)
    [java] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    [java] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    [java] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    [java] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    [java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    [java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    [java] at se.kth.ite.portal.ContextLoggingFilter.doFilter(ContextLoggingFilter.java:53)
    [java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    [java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    [java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    [java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    [java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    [java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    [java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    [java] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    [java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    [java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    [java] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    [java] at java.lang.Thread.run(Thread.java:680)
    [java] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    [java] The last packet successfully received from the server was 82 milliseconds ago. The last packet sent successfully to the server was 82 milliseconds ago.
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    [java] at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
    [java] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1118)
    [java] at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:107)
    [java] at com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4553)
    [java] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1330)
    [java] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2312)
    [java] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
    [java] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
    [java] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    [java] at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
    [java] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
    [java] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
    [java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
    [java] at java.sql.DriverManager.getConnection(DriverManager.java:185)
    [java] at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:205)
    [java] at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:150)
    [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:836)
    [java] at org.apache.commons.dbcp.datasources.SharedPoolDataSource.registerPool(SharedPoolDataSource.java:210)
    [java] at org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:169)
    [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:701)
    [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:676)
    [java] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
    [java] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
    [java] ... 29 more
    [java] Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [java] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1764)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
    [java] at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206)
    [java] at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:958)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1203)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1230)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1214)
    [java] at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:92)
    [java] ... 53 more
    [java] Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [java] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323)
    [java] at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217)
    [java] at sun.security.validator.Validator.validate(Validator.java:218)
    [java] at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
    [java] at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
    [java] at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
    [java] at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
    [java] ... 61 more
    [java] Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [java] at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
    [java] at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
    [java] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318)
    [java] ... 67 more

    >
    I have connection problem and I get the following... Do you have any idea what it might be?
    >
    It might be that you didn't post any code (using \ tags) for anyone to look at.
    People can't debug code that they can't see.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Test JDBC connection problem

    Hi all,
    I got a very weird problem when I click Test Connection Button.
    I installed xml publisher Enterprise 5.6.2 in the server, I attempt to configure Jdbc connection in this server. once I click the Test Connection Button after I input all information, all information will be cleaned in this server, i can not get any message if the connection works well.But if i use url like http://serverIP:15101/xmlpserver/ to login xml publisher on other machine, I will get successful or error message.
    who has same experience in JDBC configuration?how to solve it ,thanks in advance.

    Apologies ... not really sure what the issue is. I assume you are talking about setting up the JDBC connection for a data source?
    In that case the entries would be something like:
    connection string: jdbc:oracle:thin:@host.company.com:1525:ora10g
    un: oe
    pw oe
    driver class: oracle.jdbc.driver.OracleDriver

Maybe you are looking for

  • Can not view data in Dimension Data Viewer

    Hello Forum, Has anyone run into this one yet? with OWB10gr2 we have created a dimension called store, it has a simple hiearchy" store-->category-->primary category-->Busines Unit The dimension validates and deploys sucessfully - we have seen the not

  • JDBC adapter and message split

    Hello, does anybody know how I can make a split of a document created by the JDBC adapter and that should look like <resultset>   <row>      <column-name1>column-value</ column-name1>      <column-name2>column-value</ column-name2>      <column-name3

  • Timestamp question in RS02

    Hi experts,        If I use the transaction RS02 how can I know the timestamp that are using..? because I see that in our development system the screen have Timestamp (UTC).... but if I access the QA environment I see that in that transaction in the

  • Forms Builder-hierarchical tree(expanding and collapsing nodes)

    hi friends, can anyone help me with populating my hierarchical tree form by using codes for collapsing and expanding? for instance when_button_pressed: tree_control.expand_all(tree_control.v_item_name); //this is for expanding all the nodes in the tr

  • Inspecting the current selection using the HTML5 SDK

    I have been banging my head against the wall trying to get what I thought would be something very simple working. What I want to do is have an InDesign panel, the contents of which changes based on the current selection on the page. Now, I can access