weblogic10, sqlserver 2000, jtds驱动, jtds SSO Failed: Native SSPI library not loaded.

http://hiok.blog.sohu.com/65893231.html

ERROR: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
2.10.2007 18:30:10 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
ERROR: could not get database metadata
java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
    at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:611)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:331)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.java:39)
    at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)
    at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:217)
    at org.logicalcobwebs.proxool.ProxoolDataSource.getConnection(ProxoolDataSource.java:97)
    at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
    at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27)
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:127)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
....

Caused by: java.io.IOException: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
    at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1894)
    at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:584)
    ... 61 more

2.10.2007 18:30:10 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
ERROR: could not complete schema update


需要把ntlmauth.dll放到classpath下 

不知道是不是因为版本问题导致,更换到1.2版本也报错,把  ntlmauth.dll 丢到 j2sdk1.4.2/jre/bin目录下
错误消失。

ntlmauth.dll在 jtds-1.2.2-dist.zip/x86/SSO中

--------------

一、找到它:startWebLogic.cmd

%your_domain%/bin/startWebLogic.cmd

二、在set CLASSPATH=%SAVE_CLASSPATH%前面加上
set PRE_CLASSPATH=%WL_HOME%/server/lib/jtds-1.2.2.jar;

三、在set CLASSPATH=%SAVE_CLASSPATH%后面加上
set CLASSPATH=%PRE_CLASSPATH%;%CLASSPATH%

四、把jtds-1.2.2.jar拷到
C:/bea/wlserver_10.0/server/lib

-----------------

配置datasource的时候

Database Type选择other;
Driver Classname设置为:net.sourceforge.jtds.jdbc.Driver

你可能感兴趣的:(weblogic,SSO,database,System,sqlserver,library)