簡體   English   中英

Websphere自由概要文件jdbc / jpa配置

[英]websphere liberty profile jdbc/jpa configuration

全部,這是我的配置...

<dataSource jndiName="jdbc/sample" id="sampleDS"      jdbcDriverRef="sampleJDBCDriver" type="javax.sql.DataSource" supplementalJDBCTrace="true" containerAuthDataRef="myuserId">
    <properties databaseName="SAMPLE" serverName="localhost" portNumber="50000" user="dbuser" password="password"></properties>
</dataSource>   
<jdbcDriver id="sampleJDBCDriver" libraryRef="db2lib" javax.sql.DataSource="javax.sql.DataSource" javax.sql.ConnectionPoolDataSource="javax.sql.ConnectionPoolDataSource" javax.sql.XADataSource="javax.sql.XADataSource"></jdbcDriver>
<library id="db2lib">        
    <fileset dir="C:\IBM\SQLLIB\java" includes='db2jcc4.jar db2jcc_license_cu.jar'></fileset>
</library>
<authData user="myuser" password="password" id="myuserId"></authData>

我收到以下錯誤...

[ERROR   ] CWWKE0701E: FrameworkEvent ERROR Bundle:com.ibm.ws.jdbc(id=99) org.osgi.framework.ServiceException: Exception in com.ibm.ws.resource.internal.ResourceFactoryTrackerData$1.getService()
at  org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:222)
at [internal classes]
 Caused by: java.lang.RuntimeException: java.sql.SQLNonTransientException: java.lang.InstantiationException: javax.sql.DataSource
at  com.ibm.ws.resource.internal.ResourceFactoryTrackerData$1.getService(ResourceFac toryTrackerData.java:109)
... 1 more
 Caused by: java.sql.SQLNonTransientException: java.lang.InstantiationException: javax.sql.DataSource
at  com.ibm.ws.jdbc.internal.JDBCDriverService.create(JDBCDriverService.java:292)
... 1 more
 Caused by: java.lang.InstantiationException: javax.sql.DataSource
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1628)
at  com.ibm.ws.jdbc.internal.JDBCDriverService$1.run(JDBCDriverService.java:233)
... 1 more


Event:org.osgi.framework.FrameworkEvent[source=com.ibm.ws.jdbc_1.0.9.cl50620150610-1749 [99]] 
     [ERROR   ] CWWKE0701E: FrameworkEvent ERROR Bundle:com.ibm.ws.jdbc(id=99) org.osgi.framework.ServiceException: Exception in com.ibm.ws.resource.internal.ResourceFactoryTrackerData$1.getService()
    at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:222)
    at [internal classes]
    at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:396)
    at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:317)
    at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:160)
    at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:62)
    at com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1070)
    at [internal classes]
    Caused by: java.lang.RuntimeException: java.sql.SQLNonTransientException: java.lang.InstantiationException: javax.sql.DataSource
    at com.ibm.ws.resource.internal.ResourceFactoryTrackerData$1.getService(ResourceFactoryTrackerData.java:109)
    ... 7 more
    Caused by: java.sql.SQLNonTransientException: java.lang.InstantiationException: javax.sql.DataSource
    at com.ibm.ws.jdbc.internal.JDBCDriverService.create(JDBCDriverService.java:292)
    ... 7 more
    Caused by: java.lang.InstantiationException: javax.sql.DataSource
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1628)
    at  com.ibm.ws.jdbc.internal.JDBCDriverService$1.run(JDBCDriverService.java:233)
    ... 7 more
   Event:org.osgi.framework.FrameworkEvent[source=com.ibm.ws.jdbc_1.0.9.cl50620150610-1749 [99]] 

有人遇到類似的錯誤嗎?

我在IBM J9 VM版本pwa6470sr7fp1ifx-20140821_01(SR7 FP1 + IV63158)(en_US)上使用以下版本的WLP(WebSphere Application Server 8.5.5.6/wlp-1.0.9.cl50620150610-1749)

謝謝Na

所有人,我都意識到了這個問題。 在這些JDBC標簽之前,我還有一個jpa標簽,例如。

上面的行拋出了我上面粘貼的錯誤。 一旦刪除此行,錯誤就會消失。

暫無
暫無

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

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