Using JSP & JDBC driver for SQL Server 2000 on Red Hat
I successfully have a .jsp app running on windows server 2000 using JDBC
driver for SQL Server 2000. Which I installed in order to the following
Red Hat:
http://msdn.microsoft.com/MSDN-FILES/027/001/779/install.htm
I moved the .jsp app over to the Red Hat 9 server running Tomcat, while
keeping the MS SQL 2000 on windows. The issue I have is setting up the
JDBC driver for SQL Server 2000 on the Red Hat server.
I created a folder called /usr/java/MSSQLdriver and unzipped the tar file with
the driver for SQL Server 2000. And ran the install.ksh script.
The /usr/java/MSSQLdriver/lib has the following files within it:
msbase.jar, msutil.jar, & mssqlserver.jar
I chmod 0777 each of the *.jar files.
I then went into /etc/profile.d/tomcat.sh and adding the following:
CLASSPATH=.;/opt/msSQLjdbc/lib/msbase.jar;/opt/msSQLjdbc/lib/msutil.jar;/opt/msSQLjdbc/lib/mssqlserver.jar
Each time I login and pull up the termial I get the following error:
bash: /opt/msSQLjdbc/lib/msbase.jar: cannot execute binary file
bash: /opt/msSQLjdbc/lib/msutil.jar: cannot execute binary file
bash: /opt/msSQLjdbc/lib/mssqlserver.jar: cannot execute binary file
And can't connnect to the database within the .jsp app.
Is there anyone out there using DBC driver for SQL Server 2000 on the Red Hat server?
Michael
Sorry, I needed to correct some information of where the drivers were installed.
I created a folder called /usr/java/MSSQLdriver/new and untar the Microsoft file with the driver for SQL Server 2000. I ran the install.ksh script "sh install.ksh"
installed the driver into the default directory "/opt/msSQLjdbc".
The /opt/msSQLjdbc/lib has the following files within it:
msbase.jar, msutil.jar, & mssqlserver.jar
Michael
Similar Messages
-
JDBC driver for SQL Server 2000 with windows authentication
Does anyone know of a JDBC driver for SQL Server 2000 that supports Windows Authentication, that is that a username and password does not need to be supplied when connecting to the database.
You can use the JDBC-ODBC-Bridge.
ODBC provides windows-authentication.
Hope it helps.
Freddy -
Microsoft jdbc driver for sql server 2000 error
I try to connect to a sql server database;
After execution of:
C:\Sun\Creator\bin\runide.exe -cp:a =.;"C:\Programmi\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar";"C:\Programmi\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar";"C:\Programmi\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar"
(where "programmi" is "Program Files" in Italian)
I can make a connection to sql server.
When I try to see the "tables" in database I have this error:
[Microsoft][SQLServer 2000 Driver for JDBC]Error setting up static cursor cache
I have tryed to found some resolution and I found only this:
http://forum.java.sun.com/thread.jsp?thread=444136&forum=48&message=2007122
Can you see if it apply on source of IDE and eventually correct?I'm using the new version and I can't update a row
satRowSet.setDataSourceName("java:comp/env/jdbc/Northwind");
satRowSet.setCommand("SELECT * FROM dbo.Sat");
satModel.setWrappedData(satRowSet);
satRowSet.setConcurrency(java.sql.ResultSet.CONCUR_UPDATABLE);
satRowSet.setHoldability(java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT);
satRowSet.setAutoCommit(true);
satRowSet.setReadOnly(false);
satRowSet.execute();
satRowSet.next();
try{
this.satRowSet.absolute(1);
this.satRowSet.updateRow();
} catch (Exception ex) {
this.textArea1.setValue(ex.getMessage());
ex.printStackTrace();
java.sql.SQLException: [Sun][SQLServer JDBC Driver]Invalid operation for the current cursor position.
at com.sun.sql.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.sun.sql.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.sun.sql.jdbc.base.BaseResultSet.validateCursorPosition(Unknown Source)
at com.sun.sql.jdbc.base.BaseResultSet.getString(Unknown Source)
at com.sun.sql.rowset.JdbcRowSetXImpl.getString(JdbcRowSetXImpl.java:842)
at com.sun.sql.rowset.JdbcRowSetXImpl.getString(JdbcRowSetXImpl.java:941)
at untitled.Page1.setFields(Page1.java:133)
at untitled.Page1.beforeRenderResponse(Page1.java:147)
at com.sun.jsfcl.app.FacesBean.beforePhase(FacesBean.java:227)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:192)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:191)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:582)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
at java.lang.Thread.run(Thread.java:534) -
Question about load Microsoft JDBC driver for Sql server 2000
Hello,
I have some problem while trying load the sqlserver2000 jdbc driver
My program is a third party application and it works with the other type 4 JDBC driver well. So I tried to use Microsoft SQL server 2000 JDBC driver instead.
I installed JDBC driver and set up the classpath.
My error message is:
"Driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver' could not be loaded"
Is above message means that my classpath setup correctly but the application could not load the class or the application could not find the jar file which containes the driver class?
By the way, the third party application I was using to load this JDBC driver does not certified to use microsoft JDBC driver. But I don't think it matter?
Thanks for your help
Hui LuHello,
I have some problem while trying load the
sqlserver2000 jdbc driver
My program is a third party application and it works
with the other type 4 JDBC driver well. So I tried to
use Microsoft SQL server 2000 JDBC driver instead.
I installed JDBC driver and set up the classpath.
My error message is:
"Driver class
'com.microsoft.jdbc.sqlserver.SQLServerDriver' could
not be loaded"
That is an unusual message. Presumably you did not see "NoClassDefFoundError". If you see that it means the class could not be found.
Is above message means that my classpath setup
correctly but the application could not load the class
or the application could not find the jar file which
containes the driver class?
By the way, the third party application I was using to
load this JDBC driver does not certified to use
microsoft JDBC driver. But I don't think it matter?
It could. Perhaps the app expects a certain functional level and the driver doesn't support that. And so it bails with the message that you see.
Or it could mean that you have do something special because it has its own class path, and the driver is not in that. -
Test JDBC Driver For SQL Server 2000 Failed
Hi:
I have trouble setting up the database connection using jdbc driver in the studio, could anyone help me please? I have MS SQL 2000 MSDE installed on my local machine. I downloaded and installed the JDBC Driver for MSSQL 2000 from Microsoft.
I put the following jar files into the/lib/ext/ directory
msbase.jar
mssqlserver.jar
msutil.jar
In Studio 4.1 EE, I went to Runtime>Databases>Drivers, Add a new Driver with these information:
Name: MSSQL Driver
Driver: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
URL Prefix: jdbc:microsoft:sqlserver://localhost:<PORT>[;DatabaseName=<DB>]
Next I run the Test Driver...
Database URL: jdbc:microsoft:sqlserver://<machineName>\\<instanceName>;DatabaseName=<xxx>
User: <username>
Password: <password>
I receieved the a popup box and message in the output window:
Internal test driver incomplete. the driver may not support the required DatabaseMetadata methods. take a look at the Output Window for details.
Warning: No tables were found. Check your database.
Warning: No views were found. Check your database
Warning: No procedures were found. Check your database.
Your replies are greatly appreciated.
Perrycom.microsoft.jdbcx.sqlserver.SQLServerDataSource is a very old direct driver. I'd recommend using the DataDirect 3.2 driver. It can be found at:
http://www.datadirect-technologies.com/products/jdbc/jdbcindex.asp -
Problem using type 4 driver for SQL Server 2000
Hi..
I'm getting the following error message when i attempt to connect to SQL Server 2000:
"Cannot open user default database. Using master database instead"
I am passing the proper connection url and the user name and the password.However,my application does not connect to the SQL Server.I have tried using JTurbo and Weblogic drivers.
All tables in this database have been imported using DTS and hence have "dbo" as their owner.I do not have administrator privileges on the db server.
Is there a workaround to this problem by changing some settings for ownership of the db objects?
I have already tried using :
EXEC sp_changedbowner <username>
for databases where I am not a user and it still doesn't work for these as well.
Thanks,
Jay.It might be in your DSN. Give that a check, it could be that the DSN has a default db selected and also a userID/Pwd that's incorrect for that db. Just thinking out loud.
B -
Is this a bug in JDBC driver for SQL Server 2000?
Hi, all:
I encountered a strange problem today.
My struts/jsp application throws an error while executing the following SQL:
SELECT id,moduleName,pageLevel,ent_name,style_name,type,hits,startDate,expireDate,expireAction,active,dealtime FROM v_ad WHERE style_id=1 ORDER BY id DESC
The error message is:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid column name 'style_id'.
However, the column "style_id" does exist in view "v_ad", and if I execute this query in SQL Server Query Analyzer, it runs rightly with my expected result.
I wonder if this is a bug of JDBC, and if this is really a bug, how should I deal with this problem?
Any help would be thankful!Sounds like you may not have connected to the right database on the server.
Check the default database for the username/passwd combo you are logging in with. -
Add microsoft's jdbc driver for sql server 2000 to wls6.1 appear error!
Hi,
According to wls's guide,I modify wls's start script(startWeblogic.bat),add
jdbc driver path to CLASSPATH,
Howere,I create connect pool,Erorr report:
No suitable driver find!
This show jdbc driver isn't at System classpath.
So , how do I??
regds
tksset WL_HOME=f:\java\bea\weblogic6.1
set
CLASSPATH=%WL_HOME%\server\ext\jdbc\sqlserver\msutil.jar;%WL_HOME%\server\ex
t\jdbc\sqlserver\mssqlserver.jar;%WL_HOME%\server\ext\jdbc\sqlserver\msbase.
jar;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar;%
CLASSPATH%
"Sree Bodapati" <[email protected]> дÈëÏûÏ¢ÐÂÎÅ
:[email protected]..
Can you show me the CLASSPATH you are using?
sree
"simon" <[email protected]> wrote in message
news:[email protected]..
Hi,
According to wls's guide,I modify wls's startscript(startWeblogic.bat),add
jdbc driver path to CLASSPATH,
Howere,I create connect pool,Erorr report:
No suitable driver find!
This show jdbc driver isn't at System classpath.
So , how do I??
regds
tks -
Microsoft JDBC driver for SQL server 2000
Hi Guys,
can you share your experiences using the MS-JDBC driver ?
How it performs and how much is it stable compared to
other non-free products (e.g DataDirect / I.Net / ...) ?
Is it, according to you, quite mature to be used in a
production environment with heavy loads ?
Many thanks
MaxWe tried it with websphere and had some problems (I don't recall exactly what they were) but ended up going with IBMs embedded driver for our J2EE project. It seems to work very well, but, of course, you couldn't use it for just a regular java client.
-
Does anyone know of a JDBC driver for SQL Server 2000 that supports Windows Authentication?
Meaning a username and password does not need to be supplied when connecting to the database.
Thanks,
James.Yes.
JDBC-ODBC. -
Has anybody used the microsoft JDBC 2.0 driver for sql server 2000?
Hi,
Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from the
microsoft website?When I try using it with WL 6.1 sp1 it says it can't load the
driver.I try viewing the class file from the jar file using the jar utility it
gives an unknown Zip format error.Anybody has any solution for this ?If anybody
has managed to work with this microsoft driver i will be grateful if they provide
me with a solution.
Thanks
ThomasHello Thomas,
You may want to download the driver again and install it again.
heres a sample xml tag in the config.xml:
<JDBCConnectionPool
DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="3" MaxCapacity="12" Name="MSpool"
Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
Targets="myserver"
URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
ensure that you follow the instructions from Microsoft. For using 2000
driver you will need to have
Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
Install_dir/lib/mssqlserver.jar in the CLASSPATH.
hth
sree
"Thomas" <[email protected]> wrote in message
news:3c91ec0e$[email protected]..
Hi,
Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
the
microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
the
driver.I try viewing the class file from the jar file using the jar utility
it
gives an unknown Zip format error.Anybody has any solution for this ?If
anybody
has managed to work with this microsoft driver i will be grateful if they
provide
me with a solution.
Thanks
Thomas -
Thin driver for SQL server 2000
Hi,
Is there a thin driver for SQL server 2000?
If so where can i find it?
I searched the net but in vain.
thanx in advance
ParthaDid you try the search engine available at the java soft site
http://industry.java.sun.com/products/jdbc/drivers
I used this engine some time ago and found that the thin driver at http://www.inetsoftware.de was the best fit for our project.
hope this helps.
regards,
Abhishek. -
Microsoft Jdbc driver for SQL Server memory leak
I'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about memory leak issue in Microsoft Jdbc driver for SQL Server?
Appreciate your helpI'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about memory leak issue in Microsoft Jdbc driver for SQL Server?
Appreciate your help -
JDBC driver for SQL Server Compact Edition
Hi,
I'm trying to run pc java application on Pocket Pc (Mobile 5.0) with SQL Server Compact edition.
The error message is:
java.lang.UnsatisfiedLinkError: java/sql/DriverManager.getCallerClassLoader()Ljava/lang/ClassLoader;
at java.sql.DriverManager.getConnection(Unknown Source)...
Should I use a special jdbc driver for SQL Server Compact Edition? Is there one?
MixxoHi,
I got an answer from msdn forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2307542&SiteID=1.
There is no jdbc driver for SQL Server Compact Edition. OleDB and ADO.net are available. Now I need to know how to use them (in Java)...
Thanks, Mixxo -
Is there a free JDBC Driver for SQL Server 7 available? If so, where? I created a server program that listens to a port and inserts records based on information it receives. It uses sun's JDBC:ODBC Bridge but it crashes randomly (sometimes weeks, sometimes days, sometimes hours after starting program). Each time it crashes it generates a error log file like this:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f821e1
Function name=RtlEnterCriticalSection
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.driverConnect(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.xxxxx.data.DataAccess.connect(DataAccess.java:20)
at com.xxxxx.xxx.server.Broadcaster.insertOrder(POSServer.java:71)
at com.xxxxx.xxx.server.ClientListener.run(POSServer.java:298)
Dynamic libraries:
0x00400000 - 0x00405000 C:\WINNT\system32\java.exe
0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0C000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
0x6D420000 - 0x6D4F0000 C:\Program Files\JavaSoft\JRE\1.3.1_02\bin\hotspot\jvm.dll
Local Time = Mon May 06 10:36:33 2002
Elapsed Time = 124
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.3.1_02-b02 mixed mode)
Or this:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f821e1
Function name=RtlEnterCriticalSection
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.freeConnect(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLFreeConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.close(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
Dynamic libraries:
0x00400000 - 0x00405000 C:\Program Files\JavaSoft\JRE\1.3.1_02\bin\javaw.exe
0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0C000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
Local Time = Mon May 06 10:13:59 2002
Elapsed Time = 137
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.3.1_02-b02 mixed mode)
I think this error occurs because I'm using sun's JDBC:ODBC Bridge. I'm hoping that using a different driver will solve the problem.
Thanks,
DanI used Sun's jdbc odbc driver for a while, with no problems, with Sql Server 7. But anyways, if you want a free type 4 driver, you can get the freetds driver at
https://sourceforge.net/projects/jtds/
Maybe you are looking for
-
Losing Network Connection Constantly
Tonight my 3G Network keeps losing speed and complete connection when I try download a new app or simply watch a video on YouTube, what's going on? This is new to me.
-
I spent an hour at a Verizon corporate store about a year ago to get a new Galaxy S4. After waiting the standard 1 hour time out, I purchased the phone on the new Edge program. My wife who was with me also traded in her iPhone 4 for the 5 on the edg
-
Safari not providing rss news anymore
Hello all One day, Safari stop providing news in my rss feed. I didn't happen because of an update, it didn't happen because of a computer clean-up or anything. One morning, I was waiting for my daily rss and nothing came in. Since that time, everyti
-
View defination privileges on Procedures for any user
Hello, I was looking for some query where i can view the defination or select the procedures of any schema for example we have procedures owned by ML schema, other users such as fft, fft_read etc wants to view the defination of the procedures or sele
-
Designer 6i - Forms Generator - Name in Database
Using Designer 6i and Forms Generator, then Name entered in Name in Database of a Module Component Table Usage is not used in the validating code genereated. It is still the original name of the lookup table used. Some ideas? Name in Database ist use