我將一個glassfish項目轉換爲IBM WAS Liberty,非常困難我目前遇到訪問在Liberty中配置的連接池的問題(server.xml)利用jndi(jdbc/dataphile)。IBM WAS Liberty錯誤+缺失類型com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
我週期性地得到一個缺少類型com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource錯誤。
下面是一些更增加的細節:
<library id="DB2JCC4Lib">
<fileset dir="C:/MyApps/db2/jdbc" id="db-fileset" includes="db2jcc4-9.5.jar"/>
</library>
<dataSource id="dataSource" jndiName="jdbc/dataphile" type="javax.sql.DataSource">
<jdbcDriver libraryRef="DB2JCC4Lib"/>
<connectionManager minPoolSize="2" numConnectionsPerThreadLocal="10"/>
<properties.db2.jcc databaseName="DUNDEEPD" id="DataphileProperties" password="username" portNumber="30001" serverName="xxx.xx.xxx.xxx" user="username"/>
</dataSource>
我的堆棧跟蹤低於;
[ERROR ] Context initialization failed
Caused by: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine modifiers of missing type com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
[Xlint:cantFindType]
at org.aspectj.weaver.reflect.ReflectionWorld$ExceptionBasedMessageHandler.handleMessage(ReflectionWorld.java:129)
at org.aspectj.weaver.Lint$Kind.signal(Lint.java:340)
at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.raiseCantFindType(MissingResolvedTypeWithKnownSignature.java:232)
at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.getModifiers(MissingResolvedTypeWithKnownSignature.java:104)
at org.aspectj.weaver.ResolvedType.isInterface(ResolvedType.java:876)
at org.aspectj.weaver.ResolvedType.getHierarchy(ResolvedType.java:355)
at org.aspectj.weaver.patterns.KindedPointcut.fastMatch(KindedPointcut.java:126)
at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:84)
at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:238)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:200)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:254)
at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:286)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1561)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:162)
... 58 more
爲什麼你需要'WSJdbcDataSource',它是內部類,你不應該需要使用呢?附上您使用它的代碼片段。 – Gas
你可以發佈你的堆棧跟蹤和你在server.xml中啓用的功能嗎?正如Gas提到的那樣,你是否試圖以某種方式訪問'WSJdbcDataSource'?或者你是從內部代碼中看到的。 –
請理解,我沒有明確使用或調用WSJdbcDataSource,我只是在我的Liberty server.xml中聲明瞭一個數據連接池。通過將我的應用程序部署到Liberty,該部署未能提供以下例外。 – Sergio