avatar
JDBC & Firewall# Java - 爪哇娇娃
b*d
1
I used to use JDBC to connect to SQL server. It worked well. Recently, I
reinstalled my computer(including Jdk1.3 Microsoft SQL 2000 Jdbc driver), and
firewall is stalled into the server with SQL database.
When I run the Java program, it can not work. The error messages are as
follows:
I wonder if the server is configured with firewall, can I still use the JDBC
to access the server?
Thanks a lot!
DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver:
driver[
avatar
f*h
2
it seems the jvm can't find the jdbc driver. make sure it is in your classpath.

【在 b*********d 的大作中提到】
: I used to use JDBC to connect to SQL server. It worked well. Recently, I
: reinstalled my computer(including Jdk1.3 Microsoft SQL 2000 Jdbc driver), and
: firewall is stalled into the server with SQL database.
: When I run the Java program, it can not work. The error messages are as
: follows:
: I wonder if the server is configured with firewall, can I still use the JDBC
: to access the server?
: Thanks a lot!
: DriverManager.initialize: jdbc.drivers = null
: JDBC DriverManager initialized

avatar
m*t
3

classpath.
I think his jdbc driver is fine, as you can see in the log message it's
registered and instantiated. The NoClassDefError was caused by something else
(which is weird indeed).
To bigbaldhead, looks like you have to punch a hole in your firewall for port
1433. You might want to reconsider your architecture, though. It's not a
good idea to expose your db server.
JDBC
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
[...]

【在 f********h 的大作中提到】
: it seems the jvm can't find the jdbc driver. make sure it is in your classpath.
avatar
w*c
4
look for msutil.jar and make sure it's in ur classpath or ext dir

and
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
DriverManager.getConnection("jdbc:microsoft:sqlserver://128.196.***.***:1433;d
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd

【在 b*********d 的大作中提到】
: I used to use JDBC to connect to SQL server. It worked well. Recently, I
: reinstalled my computer(including Jdk1.3 Microsoft SQL 2000 Jdbc driver), and
: firewall is stalled into the server with SQL database.
: When I run the Java program, it can not work. The error messages are as
: follows:
: I wonder if the server is configured with firewall, can I still use the JDBC
: to access the server?
: Thanks a lot!
: DriverManager.initialize: jdbc.drivers = null
: JDBC DriverManager initialized

avatar
b*d
5
I check it again and find msutil.jar msbase.jar mssqlserver.jar are all in the
classpath.

JDBC
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
DriverManager.getConnection("jdbc:microsoft:sqlserver://128.196.***.***:1433;d
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
com.microsoft.jdbc.base.BaseDriver.setupExceptionHandling(Unknown

【在 w********c 的大作中提到】
: look for msutil.jar and make sure it's in ur classpath or ext dir
:
: and
: driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
: DriverManager.getConnection("jdbc:microsoft:sqlserver://128.196.***.***:1433;d
: driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd

avatar
b*d
6
I reinstall SQL Jdbc driver and set the classpath again. Now that part works,
but I have the new problem.
Thank everyone.

the
driver),
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
DriverManager.getConnection("jdbc:microsoft:sqlserver://128.196.***.***:1433;d
driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd

【在 b*********d 的大作中提到】
: I check it again and find msutil.jar msbase.jar mssqlserver.jar are all in the
: classpath.
:
: JDBC
: driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
: DriverManager.getConnection("jdbc:microsoft:sqlserver://128.196.***.***:1433;d
: driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jd
: com.microsoft.jdbc.base.BaseDriver.setupExceptionHandling(Unknown

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。