2 Replies Latest reply on Feb 19, 2008 6:20 PM by james_sutherland

    Cannot connect with SQL Server driver using Top Link with ADF/JSF

    518706
      I have a TopLink/ADF/JSF project that I'm starting using JDeveloper 10.1.3. The database is MS SQL Server. I went through and created all of the Top Link mappings, etc. but when I try to run my project under the OC4J instance built in to JDeveloper I get the error message below. I've tried putting SelectMethod=cursor everywhere I can think of, but nothing seems to help?

      Log Dump:

      [TopLink Info]: 2006.06.16 02:49:46.253--ServerSession(1679)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)

      [TopLink Config]: 2006.06.16 02:49:46.269--ServerSession(1679)--Connection(1680)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--connecting(DatabaseLogin(

      platform=>SQLServerPlatform
      user name=> "zeke"
      connector=>JNDIConnector datasource name=>jdbc/ZekeDB
      ))
      [TopLink Severe]: 2006.06.16 02:49:48.925--ServerSession(1679)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--Local Exception Stack:

      Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException

      Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.Error Code: 0

      at oracle.toplink.exceptions.TopLinkException.<init>(TopLinkException.java:46)
      at oracle.toplink.exceptions.DatabaseException.<init>(DatabaseException.java:51)
      at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:276)
      at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:115)
      at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
      at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:221)
      at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:273)
      at oracle.toplink.threetier.ConnectionPool.buildConnection(ConnectionPool.java:81)
      at oracle.toplink.threetier.ConnectionPool.startUp(ConnectionPool.java:304)
      at oracle.toplink.threetier.ServerSession.connect(ServerSession.java:431)
      at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:511)
      at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:317)
      at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:372)
      at oracle.toplink.util.SessionFactory.getSharedSession(SessionFactory.java:103)
      at oracle.toplink.util.SessionFactory.getSharedSession(SessionFactory.java:82)
      at oracle.toplink.util.SessionFactory.acquireSession(SessionFactory.java:114)
      at com.mascocs.web.monitor.admin.datamodel.ZekeAdminSessionFacadeBean.findAllApps(ZekeAdminSessionFacadeBean.java:128)

      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:585)
      at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
      at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:55)
      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
      at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
      at ZekeAdminSessionFacadeLocal_StatelessSessionBeanWrapper0.findAllApps(ZekeAdminSessionFacadeLocal_StatelessSessionBeanWrapper0.java:165)

      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:585)
      at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:504)
      at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1796)
      at oracle.adf.model.generic.DCGenericDataControl.invokeMethod(DCGenericDataControl.java:248)
      at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:216)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1287)
      at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
      at oracle.adf.model.generic.DCGenericDataControl.invokeOperation(DCGenericDataControl.java:266)
      at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:318)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:625)
      at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.invokeMethodAction(JUMethodIteratorDef.java:160)

      at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.initSourceRSI(JUMethodIteratorDef.java:542)

      at oracle.adf.model.binding.DCIteratorBinding.callInitSourceRSI(DCIteratorBinding.java:1420)
      at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1403)
      at oracle.adf.model.binding.DCIteratorBinding.setRangeSize(DCIteratorBinding.java:2641)
      at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2484)
      at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2257)
      at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:104)
      at oracle.adf.controller.v2.lifecycle.Lifecycle$8.execute(Lifecycle.java:210)
      at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
      at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java)
      at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$4.after(ADFPhaseListener.java:331)
      at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:97)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:211)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
      at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
      at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
      at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.

      at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
      at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection(Unknown Source)
      at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:237)
      at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:199)

      at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1333)

      at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:324)
      at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:95)
      at oracle.j2ee.connector.ConnectionPoolImpl$FixedWaitPoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1449)

      at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:782)
      at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1532)

      at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1477)

      at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1423)

      at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:244)

      at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:198)
      at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:197)
      at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:140)
      at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:112)
      ... 77 more

      2006-06-16 14:49:48.941 ERROR J2EE EJB8006 [ZekeAdminSessionFacade:public java.util.List com.mascocs.web.monitor.admin.datamodel.ZekeAdminSessionFacadeBean.findAllApps()] exception occurred during method invocation: javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException

      Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.Error Code: 0; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException

      Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.Error Code: 0

      2006-06-16 14:49:50.816 WARNING rowIterator is null
      2006-06-16 14:49:50.831 WARNING rowIterator is null
      Process exited.