SQL Server 的数据源在 websphere 中不起作用

发布于 2024-12-26 07:55:14 字数 2061 浏览 3 评论 0原文

我们在项目中使用 websphere 应用程序服务器并希望连接到 sql 服务器。在我们的 websphere 中,我们配置了一个数据源,并且 websphere 中的连接测试正常。在我们部署的应用程序中,连接不起作用。我们得到这个异常:

Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: Single-Sign-On is only supported on Windows. Please specify a user name.DSRA0010E: SQL State = 08001, Error Code = 0
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
    at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:608)
    at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:670)
    at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2111)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:2320)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1600)
    at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2036)
    at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1713)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2496)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1063)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:700)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:668)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:635)
    at de.volkswagen.dps.server.core.database.ConnectionFactory.createDatasourceConnection(ConnectionFactory.java:45)
    ... 40 more

我们使用这个驱动程序:jtds-1.2.4.jar,我们从获得这里

有人知道如何解决这个问题吗?

We are using in our project a websphere application server and want to connect to a sql server. In our websphere we have configured a datasource and the testing of the connection in the websphere works. In our deployed application the connection does not work. We get this exception:

Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: Single-Sign-On is only supported on Windows. Please specify a user name.DSRA0010E: SQL State = 08001, Error Code = 0
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
    at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:608)
    at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:670)
    at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2111)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:2320)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1600)
    at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2036)
    at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1713)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2496)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1063)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:700)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:668)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:635)
    at de.volkswagen.dps.server.core.database.ConnectionFactory.createDatasourceConnection(ConnectionFactory.java:45)
    ... 40 more

We use this driver: jtds-1.2.4.jar which we got from here

Have anybody an idea how to solve the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

场罚期间 2025-01-02 07:55:14

看起来像是一个安全问题。

通过测试连接,可以使用SSO(单点登录),但不能在已部署的应用程序中使用。

您需要确保设置 JAAS 身份验证别名并配置数据源以使用它,该别名包含用于身份验证的用户名和密码。

在管理控制台中打开数据源,右侧有一个用于创建 JAAS 别名的链接,并且有一个组合框告诉数据源使用它。

Looks like a security issue.

With Test Connection a SSO (Single sign on) can be used, but not in the deployed app.

you need to make sure you setup a JAAS authentication alias and configure your Datasource to use it, that alias comtains the username and password to be used for authentication.

Open the Datasource in the admin console and there is a link on the right to create the JAAS alias and tHere are combo boxes to tell the datasource to use it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文