SQL Server 2000 Exception
lenart17 Oct 25, 2003 11:32 AMHi, I need help with the following problem. First I will describe the layout - JBoss 3.2.2 RC4, SQL Server 2000, Sql Server JDBC Driver Service Pack 1. Now for the problem - I am executing a basic stored procedure through the execute method on a callable statement the callable statement is created from a connection which is retrieved from a configured datasource in JBoss. The Problem is that I can successfully execute the stored procedure from a servlet (web container) and when I run the same exact code from a stateless session bean I get the following exception (which is truncated for briefness):
*** SQLException caught ***
13:11:36,281 INFO [STDOUT] SQLState: 37000
13:11:36,281 INFO [STDOUT] Message: Unexpected token: GETALLSPORTS in statement [ call GetAllSports() ]
13:11:36,281 INFO [STDOUT] Vendor: -11
13:11:36,281 INFO [STDOUT] NULL ResultSet Returned
13:11:36,281 INFO [STDOUT] Closing ResultSet!
13:11:36,291 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@1d281f1
java.lang.Exception: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:281)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:498)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:800)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
at com.trendsrus.mw.ds.sql.SQLDataSource.getConnection(SQLDataSource.java:108)
at com.trendsrus.mw.rdbms.sqlserver.SQLServerDataAccessComponent.initialize(SQLServerDataAccessComponent.java:58)
at com.trendsrus.bs.dao.rdbms.RDBMSDataAccessObject.connect(RDBMSDataAccessObject.java:55)
at com.trendsrus.bs.dao.sportmgr.SQLServerSportManagerDAO.findAllSports(SQLServerSportManagerDAO.java:57)
at com.trendsrus.bs.sportmanager.ejb.SportManagerBean.getAllSports(SportManagerBean.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
HERE IS My datasource configuration file:
<local-tx-datasource>
<jndi-name>SportStatisticsDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=SportStatistics;SelectMethod=cursor</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>TrendsRUsUser</user-name>
letmein2
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- this will be run before a managed connection is removed from the pool for use by a client-->
<!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
<!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
<!--<min-pool-size>5</min-pool-size> -->
<!-- The maximum connections in a pool/sub-pool -->
<!--<max-pool-size>20</max-pool-size> -->
<!-- The time before an unused connection is destroyed -->
<!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
<idle-timeout-minutes>5</idle-timeout-minutes>
<!-- Use the security domain defined in conf/login-config.xml
<security-domain>HsqlDbRealm</security-domain>-->
</local-tx-datasource>
ANY Suggestions????????????