Re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Joe Weinstein (joeNOSPAM_at_bea.com)
Date: 10/07/04


Date: Thu, 07 Oct 2004 13:55:08 -0700


Dhilip wrote:

> Any clues why this exception is being reported when a weblogic ejb tries to
> execute a stored procedure on the MS SQL servers?
>
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Broken pipe
> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
> Source)

The driver is just suffering a sudden, unexpected disconnect from the DBMS.
I suspect something to do with the procedure is provoking a DBMS problem that
is killing the session in the DBMS. Please check the DBMS error log for messages
about killed connections.
Joe Weinstein at BEA

> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
> at
> com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown Source)
> at
> com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
> at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
> at com.microsoft.jdbc.base.BaseStatement.executeInternal(Unknown
> Source)
> at com.microsoft.jdbc.base.BasePreparedStatement.execute(Unknown
> Source)
> at weblogic.jdbc.pool.Statement.execute(Statement.java:274)
> at
> weblogic.jdbc.rmi.internal.PreparedStatementImpl.execute(PreparedStatementImpl.java:378)
> at
> weblogic.jdbc.rmi.SerialPreparedStatement.execute(SerialPreparedStatement.java:401)
>
> Here is the code snippet, the exception is generated at line 120
>
> 100 DataSource ds = (DataSource) ic.lookup ("GenDB");
> 101 conn = ds.getConnection();
> 102
> 103 // Call a procedure with two IN/ Two OUT parameter
> 104 cs = conn.prepareCall("{call
> uspRetrieveIndividualScorecard(?,?,?,?)}");
> 105
> 106
> 107
> 108 // Set the value for the IN parameters
> 109 cs.setString(1, InParam1);
> 110 cs.setString(2, InParam2);//yyyy-mm-dd
> 111
> 112 // Register the type of the OUT parameters
> 113 cs.registerOutParameter(3, java.sql.Types.FLOAT, 3);
> 114 cs.registerOutParameter(4, java.sql.Types.FLOAT, 3);
> 115
> 116
> 117 // Execute the stored procedure
> 118 logger.info(this.getClass().getName(),"before execute");
> 119
> 120 cs.execute();
>
> MS SQL Server details:
>
> Microsoft SQL Server
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 3)
>
> SQLServer
> 2.2.0022
>



Relevant Pages

  • Re: ConnectionString using DSN not working
    ... applications that can work regardless of which backend database engine is ... This assumes that each DBMS is the same--supports the same SQL ... take advantage of the specific features you pay for when you buy SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Protecting database from administrators
    ... You're not the first looking for better security features, ... But, in their defence, MS want SQL Server as a mass-market ... dbms, so they put their resources into features that will earn them the most ...
    (microsoft.public.sqlserver.security)
  • Re: Selective views
    ... MS Access is an interactive, client interface for the MS Jet, ... semi-relational DBMS. ... If you create a MS Access database with links to SQL Server or pass-through ...
    (microsoft.public.sqlserver.server)
  • Re: DB or no DB?
    ... http://www.thezbuffer.com - News and information for Managed DirectX ... I think the question about whether to use a DBMS has been answered. ... Access or SQL Server Express? ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Development Cycle
    ... I've not used SQL Server myself. ... you have an underlying database management product ... (the DBMS), and a set of associated development tools for writing programs, ... I don't know what the development tools are called in SQL server. ...
    (microsoft.public.access.formscoding)