Java.sql.SQLException:[SAP_NWMss][SQLServer JDBC Driver][SQLServer]
Hi,
When i am tring to open UWL iview from my portal. I am getting following exception.
java.sql.SQLException:[SAP_NWMss][SQLServer JDBC Driver][SQLServer]
But no where i am connecting to SQL database in my portal. Please help me in this context.
Regards,
Davood.
Hi Uday,
I created an instance SQL01 for DB. I see this instance as running. The TCP/IP port of this instance is 1433.
When I am trying to install NW 7.0 from install.bat C:\usr\sap\F48\install, I get this error. I tried connecting to the database directly (using Query Analyzer) and I am able to login with the user id and password provided in the log file.
Please let me know how to proceed.
Regards
Nikhil
Similar Messages
-
Java.sql.SQLException: Error accessing jdbc driver
Hi,
We are using WebLogic Server 7.0 as Application Server.
We now create a connection pool named regPool and
a Tx datasource named regDS.
When we get the connection from the datasource, exception occurred.
java.sql.SQLException: Error accessing jdbc driver: driverURL =
jdbc:weblogic:pool:regPool, props = {enableTwoPhaseCommit=false,
jdbcTxDataSource=true, connectionPoolID=regPool}
at
weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:323)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:377)
at weblogic.jdbc.jts.Driver.connect(Driver.java:129)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
:265)
So I guess that why we can't use CMP for finding data. Here is the error when we call the finder.
javax.ejb.FinderException: Exception in findAllEmr while preparing or
executing statement: 'null'
java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
Exception = Access not allowed
java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
Exception = Access not allowed
at
weblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:694)
According to the exception message, it looks
like the connection fail between WLS and Oracle 9.2.
Here is a scenario I think you should need to know.
I change the table-name in the weblogic-cmp-rdbms-jar.xml
to a name that doesn't exist in the database.
Then, re-package the EJB, copy it to server and restart the server.
A exception occurred that says the table doesn't exist.
So, in this case, it looks like the datasource works and
connection is fine.
Any recommendation will be appreciated.
Jimmy ChangHi!
I am a default user to the databse server. I connect to the database with '\' as the username and blank passoword(I mean with Network authentication may be).When I am trying to create connection using
con = DriverManager.getConnection("jdbc:oracle:thin:@DRACINAL2:BSAJ", "/","" )
it gives me followint error
ava.sql.SQLException: Null user or password not supported in THIN driver
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
void oracle.jdbc.dbaccess.DBError.check_error(int)
oracle.jdbc.dbaccess.DBConversion oracle.jdbc.ttc7.TTC7Protocol.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
void textPack.GenTextFile.main(java.lang.String[])
How should I go about it?
Thanks for your help.
-Sreekanth Varidhireddy -
Java.sql.SQLException: Cannot load JDBC driver class 'null'
Hi,
I am a beginner of using jdbc, i use the tomcat4.1.x, mysql3.23.54 and it's jdbc driver 2.0.14. I place the drive <in jar file> in tomcat/commons/lib and configure the server.xml, web.xml and some testing coding. But there are some error like the following:
java.sql.SQLException: Cannot load JDBC driver class 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at foo.DBTest.init(DBTest.java:18)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:48)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
of course its some of the error code and there are more.
Why I have this problems and how can I fix it? Can someone help me??
Thanks,
Tong
I place my test.jsp at tomcat/webapps/DBTest and DBTest.java at tomcat/webapps/DBTest/WEB-INF/classes/foo
additional of the tomcat/conf/server.xml
<Resource name="TestDB" auth="Container" type="javax.sql.DataSource" description="MySQL TestDB"/>
<ResourceParams name="TestDB">
<parameter><name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter><name>maxActive</name><value>10</value></parameter>
<parameter><name>maxIdle</name><value>1</value></parameter>
<parameter><name>maxWait</name><value>10000</value></parameter>
<parameter><name>username</name><value>javauser</value></parameter>
<parameter><name>password</name><value>javadude</value></parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
</parameter>
</ResourceParams>
tomcat/webapps/DBTest/WEB-INF/web.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<description>MySQL Test App</description>
</web-app>Post the part of your code that loads the driver and connects. My guess is you are using a variable for the name of the driver and the variable has not been set to anything(intially set to null).
Thanks
Cardwell -
Java.sql.SQLException: Cannot load JDBC driver
THis topic has been discussed many many times but I still not able to connect to Oracle 8i from my servlet using Tomcat 4.1.12 on hp-ux and java1.3
I always got: java.sql.SQLException: Cannot load JDBC driver class 'null'
In server.xml:
<Context Path="/MyApp" docBase="MyApp" debug="0" reloadable="true" >
<Resource name="jdbc/ora" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/ora" >
<parameter>
<name>username</name>
<value>myname</value>
</parameter>
<parameter> <name>password</name>
<value>mypassword</value>
</parameter>
<parameter> <name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@myhostname:1521:ora</value>
</parameter> </ResourceParams>
</Context>
In MyApp/WEB-INF/web.xml:
<resource-ref>
<res-ref-name>jdbc/ora</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
The Oracle jdbc jar file classes12.jar is under common/lib in Tomcat's home. read Permission is there.
In the servlet:
init(ServletConfig config):
Context init = new InitialContext();
Context ctx = (Context) init.lookup("java:comp/env");
dataSource = (DataSource) ctx.lookup("jdbc/acdb");
doPost(..)
the error occured at :
synchronized (dataSource){
con = dataSource.getConnection();}
Thanks in advance!Everything looks correct to me, except for one thing.
In your web.xml you have this:
<res-ref-name>jdbc/ora</res-ref-name> In your server.xml, you have this tag, which matches your web.xml:
<ResourceParams name="jdbc/ora" > But in your Java code, you've got this:
dataSource = (DataSource) ctx.lookup("jdbc/acdb"); When I've successfully set up a Web app data source, all three names had to agree. You either need to change your Java lookup name to "jdbc/ora" or change the web.xml and server.xml to "jdbc/acdb".
See if that does it. Everything else sounds correct to me. - MOD -
Okay, I'm by no means a cold fusion expert. But I have been teaching myself over the last year since our website was built off of Cold Fusion. So I need help because I am trying to build a site where people can enter in their e-mail address, and name (first and last) for a sweepstakes that we have on our catalog.
I have create a table called "Sweepstakes" so on my MS SQL 2005 Web Box there is a table under the database called "dbo.sweepstakes". I have replicated basically everything that a original database that was already created to capture user's email address for catalog request and what have you. The original database to capture user's request catalogs from us is called "dbo.InfoRequest" (just a FYI) and this was the database I basically replicated in a way.
So after saying all this, I continue to receive this error message and I can not figure out why. So here is the error message that I am getting.
This is the error when trying to load the database from the "webview" basically. We have an Admin Console to the website and in their, there is a section to list the contents of a specific database. So if you requested a catalog, you put in your name, email address, etc on to the website and when you hit submit on the website it insert it into the database called "dbo.InfoRequest". So when the Spring comes and I want to get a list of people that have request a catalog, I go to our website's admin console and inside there, there is a "List Catalog Request". When you click on it, it loads a file called "ListCatalogRequest.cfm" and it displays the "dbo.InfoRequest" database on the screen in a table format basically. So I am trying to replicate that for this sweepstakes we are having on our website / catalog but without using the "dbo.InfoRequest" database. Since we are doing a drawing, I'd rather it be in it's own database for viewing a drawing. So I have copied the "ListCatalogRequest.cfm" file and renamed it to "ListSweepstakesEntrys.cfm" and changed a couple of things in the file to point to the "dbo.Sweepstakes" that I created this morning and here are the results when you bring up the "ListSweepstakesEntrys.cfm" file.
If you need the results and / or code from either "ListSweepstakesEntrys.cfm" or "IISAdminSecurity.cfm" please let me know.
THANK YOU FOR ALL YOUR HELP IN ADVANCE!
--- ListSweepstakesEntrys.cfm ---
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'Sweepstakes'.
The error occurred in E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity.CFM: line 298
Called from E:\data\webs\m_k_tweb2007\admin\ListSweepstakesEntrys.cfm: line 2
Called from E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity.CFM: line 298
Called from E:\data\webs\m_k_tweb2007\admin\ListSweepstakesEntrys.cfm: line 2
296 : WHERE
297 : Username = '#Client.Username#'
298 : AND Password = '#Client.Password#'
299 : AND Active = 'Y'
300 : AND UserType = 'A'
SQL SELECT [Sweepstakes] AS TableAccessLevel, MinimumSecurity, IDNumber FROM AdminUsers WHERE Username = 'username' AND Password = 'password' AND Active = 'Y' AND UserType = 'A'
DATASOURCE M_k_tWeb2007
VENDORERRORCODE 207
SQLSTATE 42S22
Resources:
* Check the ColdFusion documentation to verify that you are using the correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
Remote Address 24.XX.XX.XX
Referrer http://m_k_t.com/admin/admin.cfm
Date/Time 24-Feb-10 07:32 AM
Stack Trace
at cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298) at cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2) at cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298) at cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'Sweepstakes'.
at macromedia.jdbc.base.BaseExceptions.createException(Unknown Source)
at macromedia.jdbc.base.BaseExceptions.getException(Unknown Source)
at macromedia.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at macromedia.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at macromedia.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at macromedia.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at macromedia.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
at macromedia.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at macromedia.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at macromedia.jdbc.base.BaseStatement.executeInternal(Unknown Source)
at macromedia.jdbc.base.BaseStatement.execute(Unknown Source)
at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:212)
at coldfusion.sql.Executive.executeQuery(Executive.java:753)
at coldfusion.sql.Executive.executeQuery(Executive.java:675)
at coldfusion.sql.Executive.executeQuery(Executive.java:636)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:500)
at cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:63)
at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:255)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:1925)
at cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
at coldfusion.CfmServlet.service(CfmServlet.java:107)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)OK, this is more a SQL question than a CF question, but not to worry.
You say this:
I have create a table called "Sweepstakes"
My emphasis.
But your query is this:
SELECT [Sweepstakes] AS TableAccessLevel, MinimumSecurity, IDNumber FROM AdminUsers WHERE Username = 'username' AND Password = 'password' AND Active = 'Y' AND UserType = 'A'
The question I pose to you is: does a SELECT statement in SQL take the name of a table?
Hint: no.
Best you revise your SQL docs, I think.
Adam
PS: it's "ColdFusion", not "Cold Fusion". Not that it really matters :-) -
Hi
I am trying to implement the bulk data transfer from source(DB) and target(Excel File) but i am getting the below error.
can some please help me on that.
Knowledge USED:
LKM SQL TO SQL
IKM SQL INCREMENTAL UPDATE
CODE:
create table C$_0Sheet1
* C1_TEST NUMBER(15)*
ODI-1228: Task SrcSet0 (Loading) fails on the target MICROSOFT_EXCEL connection Ms_EXCE_TGT.
Caused By: java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax error in CREATE TABLE statement.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
at sun.jdbc.odbc.JdbcOdbc.SQLPrepare(JdbcOdbc.java:4830)
at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:475)
at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:443)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter$OnDisconnectCommandExecutionHandler.invoke(OnConnectOnDisconnectDataSourceAdapter.java:200)
at $Proxy2.prepareStatement(Unknown Source)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.doInitializeStatement(SQLCommand.java:83)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.getStatement(SQLCommand.java:117)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.getStatement(SQLCommand.java:111)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:158)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)Hi
i refereed the blog and i modified the same but still it is throwing an error.
ODI-1228: Task SrcSet0 (Loading) fails on the target MICROSOFT_EXCEL connection TGT_Excel_TEST.
Caused By: java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax error in CREATE TABLE statement.
Code:
create table C$_0POSITION_DEFINITION_ID
C1_POSITION_DEFINITION_ID NUMBER(15) ,
C2_ID_FLEX_NUM___________ NUMBER(15)
The above code is executed in the sql developer and it's successfully created the table.
Edited by: 985498 on May 16, 2013 3:54 AM -
The full error Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'LittleBobbyTables'. (table name withheld)
This is an intermittent failure, the code occassionally works fine, then does not. At first I suspected a DNS issue, but it doesn't seem to be the case since test DSN's to AName record (server name), Cname alias, and IP address DSN all work... so now I am wondering if it is a load issue - and my question -
How do I test this hypothesis? How do I monitor load on this DSN or what CF services should I monitor on the server.Also, we are on CF 9 (9,0,0,251028), Win Ser 2008, separate Win Ser 2008 w/ SQL 2008r2
I just reviewed http://forums.adobe.com/message/3396333 and saw a few different ideas to investigate re: maintaining connections (connection pools) and concurrent connections.
The 2 tables kicking errors are core tables, so I'll look into connections as a possible issue.
But, I am still interested in ideas on how I would monitor this problem (currently working on setting up an ODBC Log to review.
Thanks in Advance, -
Java.sql.SQLException: ORA-01031: insufficient privileges
Hi I'm using oracle 8.1.6 here is a small code
import java.sql.*;
import oracle.jdbc.driver.*;
class JDBCVersion
public static void main (String args [])
throws SQLException
// Load the Oracle JDBC driver
DriverManager.registerDriver
(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@DEV","test","test");
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData ();
// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
it gives an exception
java.sql.SQLException: ORA-01031: insufficient privileges
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1597)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:354)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at JDBCVersion.main(JDBCVersion.java:12)
has anyone got an idea.. what's happening..TNS is set .. and if i use thin driver.. instead of oci.. it runs fine.. infact on oracle user env .. it runs ok.. but with any other unix user.. it gives this exception.. i tried .. using the same env variables in oracle user too..
thanks a lot
-alokI think it's not oracle privileges ... as i have tried with dba privilege and without dba privileges, the same thing runs as oracle (unix) user.. but not by any other user.... any clues??
-alok
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alok Gupta:
Hi I'm using oracle 8.1.6 here is a small code
import java.sql.*;
import oracle.jdbc.driver.*;
class JDBCVersion
public static void main (String args [])
throws SQLException
// Load the Oracle JDBC driver
DriverManager.registerDriver
(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@DEV","test","test");
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData ();
// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
it gives an exception
java.sql.SQLException: ORA-01031: insufficient privileges
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1597)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:354)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at JDBCVersion.main(JDBCVersion.java:12)
has anyone got an idea.. what's happening..TNS is set .. and if i use thin driver.. instead of oci.. it runs fine.. infact on oracle user env .. it runs ok.. but with any other unix user.. it gives this exception.. i tried .. using the same env variables in oracle user too..
thanks a lot
-alok<HR></BLOCKQUOTE>
null -
Exception in thread "main" java.sql.SQLException: Io exception: Connection
Hello
I created a java program to connect to a oracle database 10g
I got the following error:
Exception in thread "main" java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093632)(ERR=12514)(ERROR_STACK=(ERROR=(CODE=12514)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:418)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at dbAccess.main(dbAccess.java:10)
here the code
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
if (args.length<=0) {System.out.println("You need to provide the user and password");System.exit(0);}
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@dathvader2003:1521:orcl", args[0], args[1]);
// @machineName:port:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
Any helps?
Many thanksThis is the exactly code
import java.io.PrintStream;
import java.sql.*;
import oracle.jdbc.driver.OracleDriver;
class dbAccess
dbAccess()
public static void main(String args[])
throws SQLException
if(args.length <= 0)
System.out.println("You need to provide the user and password");
System.exit(0);
DriverManager.registerDriver(new OracleDriver());
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@dathvader2003:1521:orcl", args[0], args[1]);
Statement statement = connection.createStatement();
for(ResultSet resultset = statement.executeQuery("select BANNER from SYS.V_$VERSION"); resultset.next(); System.out.println(resultset.getString(1)));
statement.close();
} -
3010 : 07001 : java.sql.SQLException: [Microsoft][ODBC Excel Driver] Too few parameters. Expected 4.
java.sql.SQLException: [Microsoft][ODBC Excel Driver] Too few parameters. Expected 4.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(Unknown Source)
at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.h.y(h.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
ANY solutions?thanks to the friends in another forum..i could identify the reason..
http://www.thatsjava.com/jdbc/77269/
regards
B -
Hi Guys,
I need some help, I've already set up my datasource. It was working when i had only 1 EJB module.
But when i added another ejb module to be loaded. I started having this kind of problem:
##<Oct 11, 2007 9:07:17 AM GMT+08:00> <Error> <Deployer> <djao> <AdminServer> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1192064837780> <BEA-149231> <Unable to set the activation state to true for the application 'Test.ear'.
weblogic.application.ModuleException: Exception activating module: EJBModule(MyEntityEJBs.jar)
Unable to deploy EJB: MyEntity from MyEntityEJBs.jar:
Cannot obtain connection after 30 seconds. : java.sql.SQLException: Data Source jdbc/DataSource does not exist.
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:422)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:381)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:71)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:63)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Cannot obtain connection after 30 seconds. : java.sql.SQLException: Data Source jdbc/DataSource does not exist. NestedException Message is :Cannot obtain connection after 30 seconds. : java.sql.SQLException: Data Source jdbc/DataSource does not exist.
at weblogic.ejb.container.cmp11.rdbms.PersistenceManagerImpl.verifyDatabaseType(PersistenceManagerImpl.java:251)
at weblogic.ejb.container.cmp11.rdbms.PersistenceManagerImpl.setup(PersistenceManagerImpl.java:148)
at weblogic.ejb.container.manager.BaseEntityManager.setupPM(BaseEntityManager.java:295)
at weblogic.ejb.container.manager.BaseEntityManager.setup(BaseEntityManager.java:244)
at weblogic.ejb.container.manager.DBManager.setup(DBManager.java:172)
at weblogic.ejb.container.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:1379)
at weblogic.ejb.container.deployer.EntityBeanInfoImpl.activate(EntityBeanInfoImpl.java:232)
at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:1270)
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:405)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:381)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:71)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:63)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Can anyone help me with this pls? Im sure that my datasource exist, I could even test the connection in the admin console.
DanielAre you sure you have your datasource in place? You can test connection pools, but not datasources.
-
ADF Bc third party JDBC Driver java.sql.SQLException: No suitable driver
Hello all
I am using JT400.jar file to connect to AS/400 data base in my JSF/ADF Application.
We are using shared library for all non oracle jar files . and my application fails with error message
## Detail 0 ##
java.sql.SQLException: No suitable driver
During runtime. even though i am importing the required jar files from shared library settings in server.xml / application.xml
When i don't have the entry in shared library for this jar file it will fail during deployment time it self, but with shared library link it works during deployment but fails during runtime
it will work during runtime if i add my jar file to BC4J/lib folder. but team responsible for mintaining application server don't accept adding non oracle jar files to oracle installation folders
i have also posted this in jdev forum
Please Advise
ThanksThanks for reply
i am using Sqlserver 2000 as back end
import java.sql.*;
import java.net.*;
public class MysqlConnect{
public static void main(String[] args) {
System.out.println("MySQL Connect Example.");
Connection conn = null;
// String url = "jdbc:mysql:/localhost:3306/";
String url = "jdbc:microsoft:sqlserver/GTEXC/";
String dbName = "java";
// String driver = "Sun.Jdbc.Odbc.JdbcOdbcdriver";
String userName = "root";
String password = "root";
try {
Driver d=(Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
conn = DriverManager.getConnection(url+dbName,userName,password);
System.out.println("Connected to the database");
conn.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
} -
Have Oracle SOA 11.1.1.5 composite that does insert/update on SQL Server table. Using DBAdapter to connect to SQL Server for this insert/update. Number of instances is huge so every now and then getting the below error. Have another composite that does that same but in Oracle Table but never run into the below issues it's only with SQL Server database giving the below errors very often. Any idea on how to resolve this issue what could be the cause
don't know why it throws this error *Descriptor name: [UpdateSQLServer.TableName]. Caused by java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Object has been closed..* is there any issue with DBAdapter for SQL Server or is it a load issue as I don't see this with oracle tables
CompositeNameService 16415534 remoteFault com.oracle.bpel.client.BPELFault:
faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{ summary=Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'update' failed due to: DBWriteInteractionSpec Execute Failed Exception. update failed.
Descriptor name: [UpdateSQLServer.TableName]. Caused by java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Object has been closed..
Please see the logs for the full DBAdapter logging output prior to this exception.
This exception is considered retriable, likely due to a communication failure. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your
deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and
jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. ,
detail=[FMWGEN][SQLServer JDBC Driver]Object has been closed. ,code=0} Any help is appreciated.
ThanksHi,
Currently "Test Connections On Reserve" is unchecked but wondering what benefit will it give if I make it selected anyways if it fails still the Process will error out or does it holds the process till the connection is available and then continues. Will there be a performance hit. As currently the volume is very high and if selecting the above then for each instance it will check first if connection is available and does it affect on the performance or anything else
Also "Connection Reserve Timeout:" is set to 10 seconds.
Thanks -
Toplink Error java.sql.SQLException: No suitable driver Ms Sql Server 2005
Hi All,
My requirement is to insert document to Ms SQL 2005 DB, the field type for document is IMAGE. I have configured Oracle TopLink - 10g Release 3 (10.1.3.3.0) for performing the operation.
While inserting it is giving me error saying "Internal Exception: java.sql.SQLException: No suitable driverError Code: 0".
The content of sessions.xml is as below
<toplink-configuration>
<session>
<name>default</name>
<project-xml>META-INF/sqlMap.xml</project-xml>
<session-type>
<server-session/>
</session-type>
<login>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<connection-url>jdbc:sqlserver://10.183.106.145:1433</connection-url>
<platform-class>oracle.toplink.platform.database.SQLServerPlatform</platform-class>
<user-name>venkat</user-name>
<encryption-class-name>oracle.toplink.internal.security.JCEEncryptor</encryption-class-name>
<encrypted-password>64CC4E712821442C6A30649B23033675</encrypted-password>
</login>
</session>
</toplink-configuration>
Similar error getting while running from OC4J container. Also tried providing different values to <connection-url></connection-url> example jdbc:sqlserver://10.183.106.145:1433;databasename=master. Also tried by replacing <connection-url> with <datasource>. Let not able to pass through. Not able to figure-out what is the values for <connection-url> ..
Can anybody help me in resolving this error
Regards
Venkata MadhuTry connecting directly through JDBC, it seems that your JDBC driver is not accepmting your URL.
In TopLink you may also need to use direct connecting (DatabaseLogin.useDirectDriverConnect()).
James : http://www.eclipselink.org -
Hi everyone,
I have the following jsp page:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<sql:setDataSource driver="jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;user=sa;password=sa" var="dSource"/>
<sql:query var="contacts" dataSource="${dSource}">
SELECT TOP 10 FROM Person.Contact
</sql:query>
<table border="1">
<c:forEach var="row" items="${contacts.rows}">
<tr>
<th>
Contact ID
</th>
<th>
First Name
</th>
<th>
Middle Name
</th>
<th>
Last Name
</th>
</tr>
<tr>
<td>
<c:out value="${row.ContactID}" />
</td>
<td>
<c:out value="${row.FirstName}" />
</td>
<td>
<c:out value="${row.MiddleName}" />
</td>
<td>
<c:out value="${row.LastName}" />
</td>
</tr>
</c:forEach>
</table>
</body>
</html>
When I run it, got the following exception:
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 20
17: </head>
18: <body>
19: <sql:setDataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" dataSource="jdbc:microsoft:sqlserver://localhost:1433;databaseName=AdventureWorks;" user="sa" password="sa" var="dSource"/>
20: <sql:query var="contacts" dataSource="${dSource}">
21: SELECT TOP 10 FROM Person.Contact
22: </sql:query>
23:
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.index_jsp._jspService(index_jsp.java:102)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
But when I write a servlet with doGet as below:
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet MyServlet</title>");
out.println("</head>");
out.println("<body>");
String connectionUrl = "jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;user=sa;password=sa";
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = DriverManager.getConnection(connectionUrl);
String SQL = "SELECT TOP 10 * FROM Person.Contact";
stmt = con.createStatement();
rs = stmt.executeQuery(SQL);
while (rs.next()) {
out.println(rs.getString(4) +" "+ rs.getString(6) + "<br/>");
catch (Exception e) {
e.printStackTrace();
} finally {
if (rs != null) {
try {
rs.close();
} catch (Exception e) {
if (stmt != null) {
try {
stmt.close();
} catch (Exception e) {
if (con != null) {
try {
con.close();
} catch (Exception e) {
out.println("</body>");
out.println("</html>");
} finally {
out.close();
Everything is ok.
I'm using Netbean 6.7.1, Tomcat 6.0.18, JDK 5.0. And I already tried to put the sqljdbc.jar to the lib folder of Tomcat or the JAVA_HOME\jre\lib\ext but no luck.
Please give advice.The issue is with your usage of the sql:setDataSource tag. You should either specify a driver and url attributes, or* a datasource attribute.
The datasource attribute follows the syntax: url[,[driver][,[user][,password]]] (ref Section 10.1.1 of the JSTL1.1 spec)
You were using the datasource attribute, but not including the driver within it.
So one of the following should work:
<sql:setDataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=AdventureWorks;" user="sa" password="sa" var="dSource"/>or
<sql:setDataSource dataSource="jdbc:microsoft:sqlserver://localhost:1433;databaseName=AdventureWorks;,com.microsoft.sqlserver.jdbc.SQLServerDriver,sa,sa" var="dSource"/>----------
As an aside your code example doesn't seem to match with the error message:
In your code:
<sql:setDataSource driver="jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;user=sa;password=sa" var="dSource"/>From the error message:
<sql:setDataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" dataSource="jdbc:microsoft:sqlserver://localhost:1433;databaseName=AdventureWorks;" user="sa" password="sa" var="dSource"/>These two are not the same. Not sure if that is caused by a forum bug, or you trying various things. But the fact they don't match doesn't help :-).
cheers,
evnafets
Maybe you are looking for
-
Dynamic Column Name on Interactive Report
Hi all, Is it possible to assign a SQL result to a Column name on an interactive report? I have been able to do this on a standard SQL Report though the use of page items but have not had much luck with interactive reports. Any help is appeciated. Th
-
Changing my Apple ID - what happens to my iTunes purchases
I am getting rid of an old email account that is by default became my Apple ID (and username for the iTunes/App store). Will my purchases from the App store and iTunes get wiped out from my devices?
-
Right-Indenting the last paragraph line in a Table Of Contents entry
Hi, I'm using CS4 In Design. I'm trying to format the paragraph styles for my Table of Contents. I have the tab leaders working, everything looks good except that I have entries that have multiple lines, and I can't find a way to format the TOC parag
-
Hello, Anyone know of an easy approach to getting a JavaFX maven project working in Netbeans ? I've got JavaFX+Maven working and JavaFX+Netbeans ... but not all three together... Any tips/pointers apprectiated... Given the Netbeans has fantastic Java
-
When is PI going to be available for WL6, anyone have any idea? We want to use PI, but are using WL6, I couldn't believe it when I saw that the new release of PI 1.2 requires 5.1. What can we do??? Thanks Rich