首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Websphere for中为Hana找到有效的JDBC驱动程序(实现类)

无法在Websphere for中为Hana找到有效的JDBC驱动程序(实现类)
EN

Stack Overflow用户
提问于 2019-05-06 12:33:10
回答 2查看 791关注 0票数 0

我正在尝试将Websphere find v16.0.0.4连接到HANA数据源,但我无法找到正确的驱动程序。

目前在我的server.xml中有以下内容:

代码语言:javascript
复制
<xml version="1.0" encoding="UTF-8">
<server description="o01-cls-pega-static-prpc02-appsrv03">

    <!-- Enable features -->
    <featureManager>
        <feature>webProfile-7.0</feature>
        <feature>localConnector-1.0</feature>
        <feature>jdbc-4.1</feature>
        <feature>ssl-1.0</feature>
        <feature>servlet-3.1</feature>
        <feature>ejb-3.2</feature>
        <feature>ejbLite-3.2</feature>
        <feature>ejbRemote-3.2</feature>
        <feature>jndi-1.0</feature>
        <feature>jms-2.0</feature>
        <feature>jaxws-2.2</feature>
        <feature>jaxb-2.2</feature>
        <feature>restConnector-2.0</feature>
        <feature>wmqJmsClient-2.0</feature>
        <feature>jmsMdb-3.2</feature>
    </featureManager>
    <httpEndpoint id="defaultHttpEndpoint"
                  host="localhost"
                  httpPort="28740"
                  httpsPort="28741" />

    <!-- JDBC Hana Driver -->
    <jdbcDriver id="myHanaDriver" javax.sql.DataSource="com.ibm.ws.jdbc.jdbcDriver">
        <library>
            <fileset dir="${wlp.user.dir}/shared/resources/hana" includes="*.jar" id="HANALib"/>
        </library>
    </jdbcDriver>
    <!-- HANA JDBC Databases -->
    <dataSource
              type="javax.sql.DataSource"
              containerAuthDataRef="PegaDBUserSAPHANA"
              id="hanaDataSource"
              jdbcDriverRef="myHanaDriver"
              jndiName="jdbc/hanaDataSource">
    <properties serverName="localhost" port="35315"/>
    </dataSource>
    <applicationManager autoExpand="true"/>
</server>

这是我得到的错误:

代码语言:javascript
复制
[5/6/19 14:24:24:735 CEST] 00000038 LogService-156-com.ibm.ws.jdbc 
E CWWKE0701E: FrameworkEvent ERROR Bundle:com.ibm.ws.jdbc(id=156) org.osgi.framework.ServiceException: 
Exception in com.ibm.ws.resource.internal.ResourceFactoryTrackerData$1.getService()
Caused by: java.lang.RuntimeException: java.sql.SQLNonTransientException: 
DSRA4000E: A valid JDBC driver implementation class was not found for the jdbcDriver jdbcDriver[myHanaDriver] using the library com.ibm.ws.classloading.sharedlibrary_587. [/opt/wlp/usr/shared/resources/hana/ngdbc.jar]
Caused by: java.sql.SQLNonTransientException: 
DSRA4000E: A valid JDBC driver implementation class was not found for the jdbcDriver jdbcDriver[myHanaDriver] using the library com.ibm.ws.classloading.sharedlibrary_587. [/opt/wlp/usr/shared/resources/hana/ngdbc.jar]
Caused by: java.lang.ClassNotFoundException: com.ibm.ws.jdbc.jdbcDriver

任何一个能帮助我的人,得到我所需要的正确的实现类?

EN

回答 2

Stack Overflow用户

发布于 2019-05-06 13:09:39

javax.sql.DataSource="com.ibm.ws.jdbc.jdbcDriver"配置错误是正确的。这应该指向JDBC驱动程序对javax.sql.DataSource的实现,例如javax.sql.DataSource="com.sap.dbtech.jdbcext.DataSourceSapDB",或者对于许多JDBC驱动程序,如果完全忽略此配置属性,则较新版本的often (但不是这个问题所询问的旧的16.0.0.4级别)通常能够推断出正确的实现类。

票数 0
EN

Stack Overflow用户

发布于 2019-05-07 11:16:02

我现在已经开始工作了,我把这个: javax.sql.DataSource="com.ibm.ws.jdbc.jdbcDriver“变成了javax.sql.ConnectionPoolDataSource="com.sap.db.jdbcext.ConnectionPoolDataSourceSAP”

和type="javax.sql.DataSource“进入type="javax.sql.ConnectionPoolDataSource”。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56005328

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档