次のエラーがあります:
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.core.simple.SimpleJdbcCall - JdbcCall call not compiled before execution - invoking compile
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.datasource.DataSourceUtils - Registering transaction synchronization for JDBC Connection
[http-thread-pool-8080(5)] DEBUG o.s.j.c.m.CallMetaDataProviderFactory - Using org.springframework.jdbc.core.metadata.SqlServerCallMetaDataProvider
[http-thread-pool-8080(5)] DEBUG o.s.j.c.m.CallMetaDataProvider - Retrieving metadata for BATABASE/dbo/PA_INSERT
[http-thread-pool-8080(5)] WARN o.s.j.c.m.CallMetaDataProvider - Error while retrieving metadata for procedure columns: com.microsoft.sqlserver.jdbc.SQLServerException: Could not find prepared statement with handle 41.
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.core.simple.SimpleJdbcCall - Compiled stored procedure. Call string is [{call DATABASE.dbo.PA_INSERT()}]
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.core.simple.SimpleJdbcCall - SqlCall for procedure [PA_ISolicitudDistincion] compiled
[http-thread-pool-8080(5)] DEBUG o.s.j.c.m.CallMetaDataContext - Matching [COLUMN1, COLUMN2, COLUMN3] with []
[http-thread-pool-8080(5)] DEBUG o.s.j.c.m.CallMetaDataContext - Found match for []
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.core.simple.SimpleJdbcCall - The following parameters are used for call {call DATABASE.dbo.PA_INSERT()} with: {}
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.core.JdbcTemplate - Calling stored procedure [{call DATABASE.dbo.PA_INSERT()}]
[http-thread-pool-8080(5)] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
[http-thread-pool-8080(5)] INFO o.s.j.support.SQLErrorCodesFactory - SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
[http-thread-pool-8080(5)] DEBUG o.s.j.support.SQLErrorCodesFactory - Looking up default SQLErrorCodes for DataSource [com.sun.gjc.spi.jdbc40.DataSource40@12ea240]
[http-thread-pool-8080(5)] DEBUG o.s.j.support.SQLErrorCodesFactory - Database product name cached for DataSource [com.sun.gjc.spi.jdbc40.DataSource40@12ea240]: name is 'Microsoft SQL Server'
[http-thread-pool-8080(5)] DEBUG o.s.j.support.SQLErrorCodesFactory - SQL error codes for 'Microsoft SQL Server' found
[http-thread-pool-8080(5)] DEBUG o.s.j.s.SQLErrorCodeSQLExceptionTranslator - Unable to translate SQLException with Error code '201', will now try the fallback translator
[http-thread-pool-8080(5)] DEBUG o.s.j.s.SQLStateSQLExceptionTranslator - Extracted SQL state class 'S0' from value 'S0004'
[http-thread-pool-8080(5)] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
しかし、同じ SP がエラーなしで動作するのは奇妙ですが、 が N 回呼び出されるとエラーがスローされます。Glassfish 3.1.2 を介してプールされた接続で Spring を使用しています。Sqlserver 2005 データベースに。
ここにJava関数があります
public int registrar(Object1 p,
Object2 d)
{
try
{
final SimpleJdbcCall jdbcCall = (SimpleJdbcCall) context
.getBean("insert");
jdbcCall.setCatalogName("DATABASE");
jdbcCall.setSchemaName("dbo");
final MapSqlParameterSource params = new MapSqlParameterSource();
params.addValue("COLUMN1", p.get1());
params.addValue("COLUMN2", p.get1());
params.addValue("COLUMN3", d.get2());
final Map<String, Object> execute = jdbcCall.execute(params);
return (Integer) execute.get("IDENTITY");
}
catch (DataAccessException e)
{
return null;
}
}