2
我已經在我的項目升級SYBASE數據庫驅動程序從將jconn3.jar到jconn4.jar 。當我的應用程序連接到Sybase數據源時,出現以下錯誤。我在JBOSS 7服務器上部署了我的應用程序。[email protected]:com.sybase.jdbc4.jdbc.SybSQLException:雙找不到
[org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (default task-48) IJ030027: Destroying connection that is not valid, due to the following exception: [email protected]: com.sybase.jdbc4.jdbc.SybSQLException: dual not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).
at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4131)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3247)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:294)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:276)
at com.sybase.jdbc4.jdbc.SybStatement.executeLoop(SybStatement.java:2828)
at com.sybase.jdbc4.jdbc.SybStatement.execute(SybStatement.java:2815)
at com.sybase.jdbc4.jdbc.SybStatement.execute(SybStatement.java:1447)
at org.jboss.jca.adapters.jdbc.CheckValidConnectionSQL.isValidConnection(CheckValidConnectionSQL.java:74)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1272)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.getInvalidConnections(BaseWrapperManagedConnectionFactory.java:1085)
什麼'雙找不到'錯誤是什麼意思?
您能否讓我知道這個問題的根本原因是什麼,並幫助解決它?
我的數據源配置如下:
<datasource jta="false" jndi-name="java:/SybaseDS" pool-name="SybaseDS" enabled="true" use-ccm="false">
<connection-url>*********************</connection-url>
<driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>
<driver>sybase</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
</pool>
<validation>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter"/>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
什麼是您的數據源配置。它看起來像你有一個有效性檢查,「從雙選擇*」或類似的東西。 Sybase實際上是否有一個「雙」表(我相信這是Oracle特有的東西)? –
@Mark感謝您的回覆。我在我的問題中包含了數據源配置。我也懷疑數據源配置中有什麼錯誤。這裏需要更改或刪除哪些內容? – Karthik
正如我所說的,我猜(()你的驗證查詢是錯誤的,因爲我相信(但不知道)),Sybase沒有稱爲'dual'的表。如果它確實存在,那麼您的用戶無權訪問該表。將其替換爲可在Sybase上運行的(簡單)查詢。 –