Java Connecting с MicrosoftSqlServer 2005.
- IDE Используется: Eclipse helios
- Используемый драйвер: sqljdbc.jar
- .dll используется: sqljdbc_auth.dll из x86папка.
- .dll добавлена в системную папку system32.
- Ping успешно подключил затмение к SQL Server 2005 с использованием sqljdbc.jar
Сообщение об ошибке:
15:45:48,218 ERROR [STDERR] Jan 28, 2011 3:45:48 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
15:46:02,671 ERROR [STDERR] com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
ПРИВЕТ ВСЕМ,
Я ИСПОЛНИЛ ЭТО В КОМАНДЕ ПОДСКАЗКА: Я ПОЛУЧАЮ ЭТУ ОШИБКУ СЕЙЧАС:
C:\>java -cp .;"C:\sqljdbc_1.2\enu\sqljdbc.jar" -Djava.library.path="C:\sqljdbc_
1.2\enu\auth\x86" mfirst
Exception in thread "main" java.lang.NoClassDefFoundError: mfirst
Caused by: java.lang.ClassNotFoundException: mfirst
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)
Could not find the main class: mfirst. Program will exit.