簡體   English   中英

在Websphere Liberty中啟用jpa和jdbc的問題

[英]Issue enabling jpa and jdbc in Websphere Liberty

我正在按照這些練習來學習自由。

我在Lab 3-Module 2.2 Liberty和JPA(DB2)中遇到問題。 設置完所有JDBC和數據源詳細信息之后,我重新啟動服務器,並且看不到提到dataSource和jdbd驅動程序的兩行。

[AUDIT] J2CA8004I:數據源DB2Connection可作為jdbc / DB2Connection使用。 [AUDIT] J2CA8000I:JDBCDriver的jdbcDriver可用。

我怎么知道jpa和jdb功能是否正確設置?

這是server.xml

<!-- Enable features -->
<featureManager onError="WARN">
    <feature>jsp-2.2</feature>
    <feature>jpa-2.0</feature>
    <feature>jdbc-4.0</feature>
</featureManager>

<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
              httpPort="9080"
              httpsPort="9443" />


<jdbcDriver id="myJDBCDriver">
    <library name="DB2Lib">
        <fileset dir="C:\wlp\db2jdbc" includes="db2jcc4.jar, db2jcc_license_cu.jar"></fileset>
    </library>
</jdbcDriver>
<dataSource jndiName="jdbc/DB2Connection" id="DB2Connection"
    jdbcDriverRef="myJDBCDriver">
    <properties.db2.jcc databaseName="SAMPLE" serverName="igacloud" password="{xor}FhgeOz1tPj08" user="db2admin"></properties.db2.jcc>
</dataSource>

與Classic WebSphere在其管理控制台(數據源面板)中具有“測試連接”功能不同,WebSphere Liberty尚無等效方法。 您是否嘗試過使用簡單的“ Hello World” JPA應用程序測試連接?

CWWKF0012I消息只是在確認已啟用了哪些功能-某些功能依賴於其他功能並自動啟用它們,這就是為什么您看到的功能比server.xml中定義的功能還要多的原因。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM