Cannot connect with SQL Server driver using Top Link with ADF/JSF
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.
I'm not sure on the error, but you may be able to pass the "selectMethod" and "cursor" as a JDBC property in your connection pool. Since this is a DataSource / JTA issue you may want to post it to the general OC4J forum.
Otherwise as a workaround you could instead use a non-JTA DataSouce, or use TopLink internal connection pooling, or try another JDBC driver.
Similar Messages
-
Greetings,
I have been having some issues with various areas in a SharePoint 2013 farm. While working my way through a bazillion errors in the event logs, I have found the following error. It looks to be happening every hour; almost exactly 5 minutes after
every hour.
"Cannot connect to SQL Server. A_PROD_SP01 not found. Additional error information from SQL Server is included below.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
I also find, a health analyzer rule that is failing at the same time:
Availability: One or more servers is not responding.
However, there isn't any server listed in the Failing Servers section.
Any thoughts?
Thank you,
BobHi Bob,
For your issue, it can be caused by that the SharePoint database access account might not have the necessary permissions to communicate with the SQL Server. Please grant correct permissions to the database access account:
You must be a member of the Farm Administrators group to perform this task.
Assign the database access account:
On the Central Administration home page, click Security and in the
General Security section click Configure service accounts.
On the Service Accounts page, in the Credential Management section, in the upper drop-down list click the correct Web application pool for your Web application.
In the Select an account for this component drop-down list, click the domain account that you want to associate with this Web application pool, or click
Register new managed account to associate a new domain account with this application pool.
Click OK to save changes.
Reference:
https://technet.microsoft.com/en-in/library/ee513066(v=office.14).aspx
http://blogs.technet.com/b/wbaer/archive/2009/10/06/intermittent-database-server-connectivity-and-microsoft-sharepoint-products-and-technologies.aspx
Best Regards,
Eric
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How do I make a connection to SQL Server Express using SQL Developer 1.5.3?
How do I make a connection to SQL Server Express using SQL Developer 1.5.3, if it's possible at all?
Also, I received a SQL Server dump file of some sort. Is there any way to read this file in SQL Developer and migrate the db to Oracle? Unfortunately I don't have raw DDL and DML for this database--just some sort of a binary dump file from SQL Server.
Thanks.
DanaAre you using SQL Developer 1.5.3 or 1.5.4?
If using an older version (i.e. 1.5.3), then you'll have to add a DLL to your environment. This is [ntlauth.dll].
If you don't find this DLL in your SQL Developer directory, then obtain the JDBC SQL SERVER Pluggin (jtds-1.2.2-dist.zip) from:
http://sourceforge.net/project/showfiles.php?group_id=33291&package_id=25350
Copy the ntlmauth.dll in the ...\\...\ide\lib directory (no need to register it).
Note: this approach should work if using DQL Developer 1.5.3 and SQL Server Express 2008
Regards,
M. R. -
Cannot connect to SQL SERVER with Always on availability group listener name
Hi everyone,
I have setup always an availability group listener for sql server on port 1433, have opened the port in firewall , remote connections are enabled in the sql server, but still I am not able to connect to the sqlserver instance with the help
of the availability group listener name.
I get the following error.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.(provider:
TCP Provider, error: 0 - The wait operation timed out.)"} System.Exception {System.Data.SqlClient.SqlException
Have gone through several blogs for the solution but none of them helped.
Please let me know if anyone has fixed the issue.
Regards,
DivyaPrior to making SS connection, can you establish the connection with a networking tool?
SS connectiviy trouble shooting:
http://technet.microsoft.com/en-us/library/ms378845.aspx
http://stackoverflow.com/questions/5919524/not-able-to-telnet-sql-port-1433-locally-or-remotely
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/227f431a-4274-4d95-b605-67541d78ef03/test-sql-connection-with-telnet?forum=sqldataaccess
Kalman Toth Database & OLAP Architect
Free T-SQL Scripts
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Error while connecting to SQL Server 2000 using Heteregenous Services 11g
Hope this is the right thread to post on! We have been given the challenge of connecting to and reading data from a SQL Server 2000 database.
Our Infrastructure guys have set up the network access.
The SQL Server DB is set to windows NT Authentication only (N.B. NOT Mixed Mode) as there is an application running against the DB locally that will not run under Mixed Mode.
Our Oracle partner has download and installed the 11g Heteregenous Services. all works fine until the point we try to create the DBLink and then connect to the SQL Server DB when we get:
SQL> CREATE DATABASE LINK infoteam1.sco.infoteam.co.uk CONNECT TO "sco.infoteam.co.uk/infoteam" IDENTIFIED BY "########" USING 'dg4msql';
Database link created.
SQL> select * from "systables"@infoteam1.sco.infoteam.co.uk;
select * from "systables"@infoteam1.sco.infoteam.co.uk
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Driver][SQL Server]Login failed for user
'sco.infoteam.co.uk/infoteam'. Reason: Not associated with a trusted SQL Server
connection.[Oracle][ODBC SQL Server Driver]Invalid connection string attribute
ORA-02063: preceding 2 lines from INFOTEAM1.SCO.INFOTEAM.CO.UK
The question is can we (and if so how)?) connect to the SQL Server using an NT Windows Authorised account?
JeremyHi,
Please look at MOS note
ORA-28500: Generic connectivity using ODBC DSN over mapped drive fails [ID 105210.1]
Ora-28500 with Ms Sqlserver - Not associated with a trusted SQL Server connection [ID 333775.1]
Regards,
Edited by: gjilevski1 on Aug 31, 2010 8:23 AM -
Cannot connect to SQL server in ODI
Hi,
I am new to ODI & Im currently trying to access SQL server DB using ODI.
I have downloaded the sql server jdbc driver 2.0 & placed the sqljdbc4.jar in driver folder of ODI_HOME.
On creating the data server & testing connection, it says 'Successful Connection.'
However, when I try to create a physical schema, it throws the following error.
java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.graphical.frame.a.jz.dQ(jz.java)
at com.sunopsis.graphical.frame.a.jz.bE(jz.java)
at com.sunopsis.graphical.frame.bo.bA(bo.java)
at com.sunopsis.graphical.frame.a.jz.en(jz.java)
at com.sunopsis.graphical.frame.a.jz.<init>(jz.java)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sunopsis.graphical.frame.bb.b(bb.java)
at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Unknown Source)
I tried reading many posts & blogs but I dont know what I am missing here.
Can someone please help me with this?
Thanks,
RubellahHi,
As the previous comments, please provide more information, error message of this issue.
To connect to the Database Engine, you can follow this link:
http://technet.microsoft.com/en-us/library/ms345332.aspx
Thanks.
Tracy Cai
TechNet Community Support -
Cannot connect to SQL Server databases
All of a sudden I can't connect to SQL server databases from
my local machine. The databases are on a web server. It just
started happening, and I never had a problem with it before. I
can't connect to them in the coldfusion administrator, and I can't
connect to them using ODBC DSN's either. Has anyone ever run into
this before? I didn't change anything in the cf admin, and I
certainly didn't change any logins or passwords in SQL
Server.I've been experiencing a similar problem. Everything was fine
but I had to reboot CF 8.01.
After the reboot all the datasources are very slow to respond
and we get lots of errors of the form :
Timed out trying to establish connection
A non-SQL error occurred while requesting a connection from
blah
Timed out trying to establish connection
A non-SQL error occurred while requesting a connection from
blah
Everything is working but very slow on database queries. This
happened a couple of months ago when we last
rebooted and then it went away.
Going to have a look for a new JDBC driver from adobe and see
if that helps .... -
No suitable driver with SQL Server Driver
Hi,
i'm making a jsp page that it use a JDBC Connection to a SQL Server with SQL Server 2000 Driver for JDBC.
I put in JDeveloper Project Settings, Configurations\Development\Libraries, the reference to msbase.jar, msutil.jar and mssqlserver.jar. Alse i put the reference to Oracle JDBC libraries.
The code in jsp page to reference the driver, obtain the DataSource and get the connection is the following:
java.sql.DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
javax.naming.Context ic = new javax.naming.InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/SQLServerDS");
java.sql.Connection con = ds.getConnection();
I defined the DataSource in data-sources.xml, wich look like:
<data-source class="com.evermind.sql.DriverManagerDataSource" location="jdbc/SQLServerCoreDS" password="<pass>" username="<user>" url="jdbc:microsoft:sqlserver://<server>:1433" xa-location="jdbc/xa/SQLServerXADS" inactivity-timeout="30" connection-driver="com.microsoft.jdbc.sqlserver.SQLServerDriver" name="SQLServerDS" ejb-location="jdbc/SQLServerDS">
<property name="DatabaseName" value="Northwind"/>
<property name="SelectMethod" value="direct"/>
</data-source>
This compile ok, but when i run the page appears the following error (SQLException):
No suitable driver
After looking so much, i don't find the cause of the problem.
Can anyone helpme?
Thanks
Javier S.Hi Javier,
Although I don't work with JDeveloper, as far as I know, for OC4J, I believe you need to put the relevant JAR files in the "j2ee/home/lib" subdirectory of the OC4J installation. Unfortunately, since I don't work with JDeveloper, I can't tell you where that would be -- sorry :-(
I suggest that you try asking also in the JDeveloper forum (in case you haven't already :-)
Hope this helps you.
Good Luck,
Avi. -
Cannot connect to SQL Server 2008 R2 Express
I have a database application that connects to the Northwind sample db in MS Access and lets the user perform CRUD operations.
Now I want to add the same for MS SQL Server, however, I have trouble connecting to it using this connection string:
I changed the server properties in SQL Server Management Studio to allow windows and SQL Server authentication, yet, I still get this exception when trying to open the connection:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I thought it might be because the server is not allowing remote connections and followed this guide to allow remote connections:
http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/
But the SQL Server windows service won't start. The Browser works fine, but the server doesn't do anything.
When trying to start it I get this error:
The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details.
The event log says:
2011-07-07 17:02:55.35 spid51 Starting up database 'Northwind'.
2011-07-07 17:02:59.98 spid51 Starting up database 'Northwind'.
2011-07-07 17:03:03.68 spid53 Starting up database 'Northwind'.
2011-07-07 17:03:07.01 spid55 Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
2011-07-07 17:03:07.30 spid55 Using 'xpstar.dll' version '2009.100.1600' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
2011-07-07 17:03:07.76 spid55 Starting up database 'pubs'.
2011-07-07 17:03:08.89 spid55 Starting up database 'pubs'.
2011-07-07 17:03:09.30 spid55 Starting up database 'pubs'.
2011-07-07 17:04:11.37 spid55 Starting up database 'pubs'.
2011-07-07 17:08:17.28 spid52 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
2011-07-07 17:08:17.35 spid52 Using 'xplog70.dll' version '2009.100.1600' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
However, when starting SQL Server Management Studio, I can normally work with the databases, perform CRUD operations, etc.
I was wondering if it might be a connection string issue.
I'm using this string:
@"Server=lolcalhost;Database=Northwind;User ID=BEN-A350C47E32F;Password=;Trusted_Connection=False;";
I added the Northwind database as data source to the project and the connection string is in the app.config:
<connectionStrings>
<add name="NwindConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Nwind.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
using this code to access it:
constringServer = ConfigurationManager.ConnectionStrings["NwindConnectionString"].ToString();
but when using this string I get an ArgumentException:
Keyword not supported: 'provider'.
I'd appreciate any help that would let me connect to the server from a program.Here is an active Sql connection string we use currently from our app.config file:
<connectionStrings>
<clear/>
<add name="ServerConnectionString" connectionString="Data Source=SqlBox;Initial Catalog=YourCatalog;User Id=Username; Password=password;" providerName="System.Data.SqlClient"/><br/> </connectionStrings>
here is one for Sql Express:
<add name="LocalConnectionString" connectionString="Data Source=MachineName\SqlExpress;Initial Catalog=YourCatalog;Integrated Security= true;" providerName="System.Data.SqlClient"/> -
BPC 7.0 Install error - Cannot connect to SQL server
Hi,
I am in the process of installing BPC 7.0 and encountered the following error after filling the "Advanced settings" details on the server info screen:
*Cannot connect SQL server.
Please check the SQL server connection or check System Admin ID to access the sql server.*
I know that the System Admin ID I provided in the previous (service type accounts) screen is correct. What am I missings? Appreciate the help asap!BPC installation user has to be SysAdmin into SQl Server.
Also make sure that SQL Server was installed having Windows authentication enable otherwise the connection to SQL Server can not be establish.
Into Application Server (the server where you are trying to install BPC) open Management Studio and see if you can connect to SQL Server.
Are you using special ports or instances fro SQL Server?
Please make sure you are providing all these information into BPC setup.
Regards
Sorin Radulescu -
Cannot connect to sql server after re installing IIS 6?
I re installed IIS 6, after the restart i couldn't connect to sql server engine nor seeing it when using browse for me, i was trying to install team foundation server, at first it could see that i have an sql server running after re installing IIS it can't
see it also. I'm using windows server 2003 SP2. Also i cannot remotely access it after the re installationJust type the IP or name of the server (localhost) and try to connect.. SSRS 2005 requires IIS but how does it relate to SQL Server connection?
What error are you getting? Make sure that SQL Server is running up.
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Cannot connect to SQL Server 2008 Express
I install SQL Server 2008 Express on Windows 7 and make sure SQL Server(SQLEXPRESS) service is running. Then I write a program via Visual C++ & ADO, and try to connect to the local SQL Service instance by using the following SQL connection string:
“Provider=sqloledb;Data Source=(local);Integrated Security=SSPI;”
But the connection fails. I try the same code on a computer with SQL Server 2008 Professional installed and it works without problems.
Please advise. Thanks.Hi chcw,
Are you got any error message/information while connect to SQL Server express instance faild via VC++ & ADO? If so, please post them for further investigation.
Please also check the windows firewall. Firewall systems help prevent unauthorized access to computer resources. If a firewall is turned on but not correctly configured, attempts to connect to SQL Server might be blocked. For more information, please see:
http://technet.microsoft.com/en-us/library/cc646023.aspx
If you have any feedback on our support, please click
here.
Regards,
Elvis Long
TechNet Community Support -
Reading BLOB from SQL Server 2005 using DB Link from Oracle 10g
Hi All,
I am trying to read a table's data from SQL Server 2005 using ODBC DB Link created in Oracle 10g (10.2.0.3/4) database. I am not using oracle gateway.
I am able read all data except for the BLOB data from SQL server 2005. It gives error given below when I try to execute query SELECT * from T_TRANSACTION_DATA@sdeslink inside a stored procedure:
ORA-22992: cannot use LOB locators selected from remote tables
Kindly help how to read BLOB from SQL server 2005 inside Oracle 10g.
Best Regards!
IrfanIrfan,
If you can read the blob data using 10.2 HSODBC then there should be no problem using the 11g gateway.
I recommend you download the latest version which is 11.2.0.3 available from My oracle Support as -
Patch 10404530: 11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER
This is a full version and does not need a previous version to have bene installed. When installing it needs to be in a completlely separate ORACLE_HOME from the existing 11.2 install.
For the Ora-22992 problem have a look at this note in My Oracle Support -
Ora-22992 has a workaround in 10gR2 (Doc ID 436707.1)
Regards,
Mike -
2012 r2 rds deployment cannot connect to sql server after reboot
We have a ha connection broker setup with 2 connection brokers and everything was working fine up untill the servers were rebooted for updates. Now users cannot connect to thier collections and I have an error in the event log that the deployment could not
connect to the sql database.
at this point I am assume that the issue is related to security. I am able to query the database as admin from the effected servers and other services that use other databases in the same sql instance are no5 having issues.
I have checked the security group that both cb servers should be in and they are in the group and the group has sysadmin and dbo within sql
any ideas?
Please remember to mark my replies as answers if they helpHi,
Thank you for posting in Windows Server Forum.
Can you please create the database manually with below command and verify.
PS C:\> Set-RDConnectionBrokerHighAvailability –DatabaseConnectionString
"DRIVER=SQL Server Native Client 11.0;SERVER=<SQL Server
Name>;Trusted_Connection=Yes;APP=Remote Desktop Services Connection Broker;
DATABASE=<DB Name>" -DatabaseFilePath "C:\DbFiles\<DbName>.mdf"
-ClientAccessName "<DNS RR Name>"
Grant DBO permissions to the service account on the RDS server and try to run your wizard again.
More information.
RD Connection Broker High Availability in Windows Server 2012
http://blogs.msdn.com/b/rds/archive/2012/06/27/rd-connection-broker-high-availability-in-windows-server-2012.aspx
Hope it helps!
Thanks.
Dharmesh Solanki
TechNet Community Support -
SCCM Install fails. cannot connect to SQL server. "the network was not found"
Hi,
I'm installing SCCM 2012. i have a 2 server boxes. 1x sccm and 1x dedicated SQL. sccm installation is stuck @ connecting to DB.
SQL server is 2012 with SP2, static 1433 port used.installation account used is already sysadmin, sccm computer account also added into SQL local admins. ports 1433, 4022, 445 are already FW open in between SCCM box and SQL Box?
error pop up" "the network was not found"
Pls advise.if MS is really doing good job then such things (scCm on remote sql) should be easy for us with proper docs. Cheers!
The docs are "proper". They give you all the technical details needed. They assume however that you know how to translate the stated requirements, like the ports necessary (as documented at
http://technet.microsoft.com/en-us/library/hh427328.aspx ), into the environment you are working in. They cannot give you a click by click guide because that would only be applicable to
generic lab environments.
Sorry that that may sound a bit harsh, but it is reality. They simply have no idea what customer networking environments actually look like as the possibilities are simply unbounded. They must rely on the implementer being able to take the core technical
requirements and implement them for the uniqueness of the environment they are working in. In most cases, this is generally straight-forward, but there is a great deal of variety in the real-world.
Jason | http://blog.configmgrftw.com | @jasonsandys
Maybe you are looking for
-
After 3 years of happily using iTunes store all of a sudden I can no longer connect. There is no error message, the attempted connection just hangs. Why?
-
Why is itunes taking so long to download movies
My internet connection appears to be working great, but the movies are taking far too long....7 hrs for a 1.1GB movie
-
Hi All, Could you please anybody assist me, My requirement is to identfying Idoc segment which contains 'Source List' (ME01)information. For example: Segment E1MARAM Contains Material Master data. If anybody knows please assist me. Thanks in advance.
-
Retina MBP 13 inch - have owned it for 12 days. Closed it at 6pm w over 50% battery life, at 11pm it won't turn on, charger doesn't even light up. Not the outlet. That happened today. Only other issue, was on day 10 it froze bcs "VLC failed to quit,"
-
Failed to load jsp with jstl 1.0 when deployed to Weblogic 11g
The same war is successfully run on weblogic 10.X but failed to run on weblogic 11.x JSTL version is 1.0 Compilation of JSP File failed: Exception occurred while processing '/u02/tech/product/otm620/otmapp/weblogic/domains/otm/servers/gc3-scdemo/tmp/