ejb@glassfish.java.net

RE: connection DB error

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Wed, 31 Oct 2007 14:22:24 +0000

Hello, Jaqadish,

Thanks for your reply.

I have following the procedure of connecting to the database:

Data Sources

The JDBC driver provides support for J2EE / JDBC 3.0 data sources. The JDBC driver SQLServerXADataSource class is implemented by com.microsoft.sqlserver.jdbc.SQLServerXADataSource.
Datasource Names

You can make database connections by using data sources. The data sources available with JDBC driver are described in the following table:
DataSource Type Class Name Description

DataSource
    

com.microsoft.sqlserver.jdbc.SQLServerDataSource
    

The non pooling data source.

ConnectionPoolDataSource
    

com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource
    

The data source to configure J2EE application server connection pools. Typically used when the application runs within a J2EE application server.

XADataSource
    

com.microsoft.sqlserver.jdbc.SQLServerXADataSource
    

The data source to configure J2EE XA data sources. Typically used when the application runs within a J2EE application server and an XA transaction manager.
Data Source Propertiesf


That is the help menu which comes with the JDBC driver. I have done this before but it just that the error messages are always different. Sometimes it referees to the datasource or class name if it's wrong.

In this case, I am not sure about the name instance error message:

'The connection to the named instance has failed'

I will trying connecting to the database without going through the application server. I am able to go connect to the DB through the SQL server management studio express.

Anymore suggestions.

Thanks

eve


> Date: Wed, 31 Oct 2007 19:30:43 +0530
> From: Jagadish.Ramu_at_Sun.COM
> To: persistence_at_glassfish.dev.java.net
> CC: ejb_at_glassfish.dev.java.net
> Subject: Re: connection DB error
>
> 1) Are you able to connect to the microsoft sql server using a
> standalone jdbc program ?
>
> 2) you can set your pool config. according to
> "microsoft_sqlserver2005_datasource.xml" available in
> 91_AS_INSTALL_ROOT/lib/install/templates/resources/jdbc
>
> Thanks,
> -Jagadish
>
> On Wed, 2007-10-31 at 12:26 +0000, Eve Pokua wrote:
> > Hello everyone,
> >
> > I uninstalled my SQL server 2005 express and reinstalled an updated
> > version. I get the following while trying to connect to the DB from
> > the application server SUN 9:
> >
> > "Operation 'pingConnectionPool'
> > failed in 'resources' Config
> > Mbean. Target exception message:
> > Connection could not be allocated
> > because: The connection to the
> > named instance has failed. Error:
> > java.net.SocketTimeoutException:
> > Receive timed out."
> >
> > After spending a couple days researching and trying to resolve the
> > issue, I got fedup and uninstalled the SQL server 2005 express updated
> > version. I also made sure the Old profile was deleted from my
> > 'program files' so i didn't have to encounter the same issue after.
> > However, I am still having the same error after installing the old SQL
> > server express 2005. What I'm I doing wrong? I am sure the property
> > settings are correct too. I've had this kind of error whilst trying
> > to connect to the DB from the application server before, but may be
> > not the same type of error. I have always managed to resolve the
> > issue but this time I'm running out of ideas. Though, there are a
> > lot of post on the internet, the error message is not always the
> > same.
> >
> > I think, it has something about me uninstalling the Old SQL server
> > 2005 express and installing a new one and so forth. Maybe the
> > application server keeps data of some kind of the DB. Pls help. I am
> > running out of ideas.
> >
> > thanks
> >
> > eve
> >
> >
> > ______________________________________________________________________
> > Do you know a place like the back of your hand? Share local knowledge
> > with BackOfMyHand.com

_________________________________________________________________
The next generation of MSN Hotmail has arrived - Windows Live Hotmail
http://www.newhotmail.co.uk