Try uninstalling... upon reinstall make sure that you have installed
all the pre-requisites (.Net 3.5, etc.)
Maybe actually log in as Administrator to do the reinstall
After install confirm that the service is running from task manager.
After confirmed that ms-sql is running confirm that the tcp/ip port is
open on 1433 (Configuration Manager) -- again tcp/ip on port 1433
doesn't seem to be enabled by default in ms-sql express.

Its important to confirm that 1433 is open and accepting connections.
If this port isn't open and able to accept connections there is no
point going forward and configuring you jdbc connection because there
isn't a port for to which the jdbc driver can connect.

There error message in you last post is not from ms-sql but from the
jdbc driver so before you delve deeper into setting up jdbc make sure
ms-sql is properly installed and able to communicate on port 1433.

Dennis

On Tue, Mar 3, 2009 at 2:40 PM, Dennis Gesker wrote:
> Eve:
>
> I'm jumping in the thread a little late so if I'm answering the wrong
> question I apologize in advance. But, my dev machine seems to be setup
> similar to what you are trying to setup so I thought maybe I could
> offer some tips
>
> I had been using MS-SQL 2008 express on Vista 64 (jdk_1.6.0._11,
> glassfish-v2.1b60f) however my issue was not the driver. My issue was
> that MS-SQL Express seemed to not enable TCP/IP by default so I had to
> enable it using the configuration manager.
>
> Once TCP/IP was enabled I was able to connect using the jTDS driver.
> However, I was not able to connect using Microsofts' driver. The
> driver complained about ms-sql 2008 express being an incorrect
> version. I did find a pre-release of the next version of the jdbc
> driver (sqljdbc4.jar) that seemed to work OK on the MS Website. There
> were two jars (sqljdbc4.jar and sqljdbc.jar) in the pre-release
> version. You will only need sqljdbc4.jar.
>
> By the way, I also recommend just copying the needed jars to the
> glassfish/lib directory as the easiest way to make glassfish aware of
> the driver.
>
> Also, just as an FYI there is a very useful file that you can add to
> your [ProjectName]\setup folder called sun-resources.xml where you can
> put in all the settings for your database pool/connection. When you
> put this file in the setup folder is shows up under the "Server
> Resources" node in NetBeans which is really convenient
>
> Just as a reference my sun-resources.xml file (using the jTDS Driver)
> looks kind of like:
>
>
> br />
> Server 9.0 Resource Definitions //EN"
> "http://www.sun.com/software/appserver/dtds/sun-resources_1_3.dtd">
>
> Â
> object-type="user" pool-name="MyDbPool"/>
>
> Â
> associate-with-thread="false" connection-creation-retry-attempts="0"
> connection-creation-retry-interval-in-seconds="10"
> connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
> connection-validation-method="auto-commit"
> datasource-classname="net.sourceforge.jtds.jdbcx.JtdsDataSource"
> fail-all-connections="false" idle-timeout-in-seconds="300"
> is-connection-validation-required="false"
> is-isolation-level-guaranteed="true"
> lazy-connection-association="false" lazy-connection-enlistment="false"
> match-connections="false" max-connection-usage-count="0"
> max-pool-size="128" max-wait-time-in-millis="60000" name="MyDbPool"
> non-transactional-connections="false" pool-resize-quantity="2"
> res-type="javax.sql.ConnectionPoolDataSource"
> statement-timeout-in-seconds="-1" steady-pool-size="16"
> validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
> Â Â
> Â Â
> Â Â
> Â Â
> Â Â
> Â Â
> Â Â

you are right, the error is coming from the driver because, im now able to

start the sql server service. I change the login settings in the configuration

manager to local System. But connection is still being refused when i pin from thd admin

console... 1433 port is enabled.

I will try your suggestion before.

Thanks

eve

> Date: Tue, 3 Mar 2009 16:30:17 -0700
> From: dennis@gesker.com
> To: users@glassfish.dev.java.net
> CC: ejb@glassfish.dev.java.net; persistence@glassfish.dev.java.net
> Subject: Re: Vista, Jee5, sql2000 &sql2005
>
> Just a couple of things to check/try...
>
> Try uninstalling... upon reinstall make sure that you have installed
> all the pre-requisites (.Net 3.5, etc.)
> Maybe actually log in as Administrator to do the reinstall
> After install confirm that the service is running from task manager.
> After confirmed that ms-sql is running confirm that the tcp/ip port is
> open on 1433 (Configuration Manager) -- again tcp/ip on port 1433
> doesn't seem to be enabled by default in ms-sql express.
>
> Its important to confirm that 1433 is open and accepting connections.
> If this port isn't open and able to accept connections there is no
> point going forward and configuring you jdbc connection because there
> isn't a port for to which the jdbc driver can connect.
>
> Here is a link on how to configure/open this port:
>
> http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
>
> There error message in you last post is not from ms-sql but from the
> jdbc driver so before you delve deeper into setting up jdbc make sure
> ms-sql is properly installed and able to communicate on port 1433.
>
> Dennis
>
>
> On Tue, Mar 3, 2009 at 2:40 PM, Dennis Gesker wrote:
> > Eve:
> >
> > I'm jumping in the thread a little late so if I'm answering the wrong
> > question I apologize in advance. But, my dev machine seems to be setup
> > similar to what you are trying to setup so I thought maybe I could
> > offer some tips
> >
> > I had been using MS-SQL 2008 express on Vista 64 (jdk_1.6.0._11,
> > glassfish-v2.1b60f) however my issue was not the driver. My issue was
> > that MS-SQL Express seemed to not enable TCP/IP by default so I had to
> > enable it using the configuration manager.
> >
> > Once TCP/IP was enabled I was able to connect using the jTDS driver.
> > However, I was not able to connect using Microsofts' driver. The
> > driver complained about ms-sql 2008 express being an incorrect
> > version. I did find a pre-release of the next version of the jdbc
> > driver (sqljdbc4.jar) that seemed to work OK on the MS Website. There
> > were two jars (sqljdbc4.jar and sqljdbc.jar) in the pre-release
> > version. You will only need sqljdbc4.jar.
> >
> > By the way, I also recommend just copying the needed jars to the
> > glassfish/lib directory as the easiest way to make glassfish aware of
> > the driver.
> >
> > Also, just as an FYI there is a very useful file that you can add to
> > your [ProjectName]\setup folder called sun-resources.xml where you can
> > put in all the settings for your database pool/connection. When you
> > put this file in the setup folder is shows up under the "Server
> > Resources" node in NetBeans which is really convenient
> >
> > Just as a reference my sun-resources.xml file (using the jTDS Driver)
> > looks kind of like:
> >
> >
> > br />
> > Server 9.0 Resource Definitions //EN"
> > "http://www.sun.com/software/appserver/dtds/sun-resources_1_3.dtd">
> >
> >
> > object-type="user" pool-name="MyDbPool"/>
> >
> >
> > associate-with-thread="false" connection-creation-retry-attempts="0"
> > connection-creation-retry-interval-in-seconds="10"
> > connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
> > connection-validation-method="auto-commit"
> > datasource-classname="net.sourceforge.jtds.jdbcx.JtdsDataSource"
> > fail-all-connections="false" idle-timeout-in-seconds="300"
> > is-connection-validation-required="false"
> > is-isolation-level-guaranteed="true"
> > lazy-connection-association="false" lazy-connection-enlistment="false"
> > match-connections="false" max-connection-usage-count="0"
> > max-pool-size="128" max-wait-time-in-millis="60000" name="MyDbPool"
> > non-transactional-connections="false" pool-resize-quantity="2"
> > res-type="javax.sql.ConnectionPoolDataSource"
> > statement-timeout-in-seconds="-1" steady-pool-size="16"
> > validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
> >
> >
> >
> >
> >
> >
> >

Is the sqljdbc.jar copied in the /lib or /domains/domain1/lib/ext directories? The jar should be made available to the application server in order to load the class : com.microsoft.sqlserver.jdbc.SQLServerDataSource.

No, it is not in either location; not even on my system for that matter. I
have gone to Sun.com to look for it but came back empty. I will continue to
look to download a copy and report back. Is there anything else I may need,
or need to do?

Dr. Charles O. Odeyale wrote:
> No, it is not in either location; not even on my system for that matter.
> I have gone to Sun.com to look for it but came back empty. I will
> continue to look to download a copy and report back. Is there anything
> else I may need, or need to do?
>
> Thanks.
>
> ----- Original Message ----- From:
> To:
> Sent: Wednesday, February 04, 2009 1:21 AM
> Subject: Re: FW: Vista, Jee5, sql2000 &sql2005
>
>
>> Is the sqljdbc.jar copied in the /lib or
>> /domains/domain1/lib/ext directories? The jar should be
>> made available to the application server in order to load the class :
>> com.microsoft.sqlserver.jdbc.SQLServerDataSource.
>> [Message sent by forum member 'sm157516' (sm157516)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=330006
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

The .jar does not come with GlassFish, you have to download it manually.

I do not recommend using Microsoft's JDBC driver. When we use it in
production to communicate with a remote SQL Server 2005 EE, at least
once per week there is a problem trying to connect to the database. The
Microsoft driver blocks the thread that is asking for a connection
indefinitely. Looking at the FINE/FINER logs, it shows "TDS prelogin
response error". Once this happens 5 times then the HTTP Listener for
your web application can no longer respond to web requests and it looks
like GlassFish is locked up. This happens even when you set the
loginTimeout property. We tested the latest 1.2 version of the driver.

We use the open source jTDS driver instead. It doesn't have this
problem and works well.

Ryan

Marina Vatkina wrote:
> Did you try to search Microsoft site?
>
> thanks,
> -marina
>
> Dr. Charles O. Odeyale wrote:
>> No, it is not in either location; not even on my system for that
>> matter. I have gone to Sun.com to look for it but came back empty. I
>> will continue to look to download a copy and report back. Is there
>> anything else I may need, or need to do?
>>
>> Thanks.
>>
>> ----- Original Message ----- From:
>> To:
>> Sent: Wednesday, February 04, 2009 1:21 AM
>> Subject: Re: FW: Vista, Jee5, sql2000 &sql2005
>>
>>
>>> Is the sqljdbc.jar copied in the /lib or
>>> /domains/domain1/lib/ext directories? The jar should
>>> be made available to the application server in order to load the
>>> class : com.microsoft.sqlserver.jdbc.SQLServerDataSource.
>>> [Message sent by forum member 'sm157516' (sm157516)]
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=330006
>>>

Class name is wrong or classpath is not set for : net.sourceforge.jtds.jdbcx.JtdsDataSource

I hope I am on the right track. Any ideas? its my first time of using this driver.

thanks.

eve

> Date: Wed, 4 Feb 2009 15:55:58 -0500
> From: ryan@ijws.com
> To: users@glassfish.dev.java.net
> Subject: Re: FW: Vista, Jee5, sql2000 &sql2005
>
> The .jar does not come with GlassFish, you have to download it manually.
>
> I do not recommend using Microsoft's JDBC driver. When we use it in
> production to communicate with a remote SQL Server 2005 EE, at least
> once per week there is a problem trying to connect to the database. The
> Microsoft driver blocks the thread that is asking for a connection
> indefinitely. Looking at the FINE/FINER logs, it shows "TDS prelogin
> response error". Once this happens 5 times then the HTTP Listener for
> your web application can no longer respond to web requests and it looks
> like GlassFish is locked up. This happens even when you set the
> loginTimeout property. We tested the latest 1.2 version of the driver.
>
> We use the open source jTDS driver instead. It doesn't have this
> problem and works well.
>
>
> Ryan
>
>
>
>
> Marina Vatkina wrote:
> > Did you try to search Microsoft site?
> >
> > thanks,
> > -marina
> >
> > Dr. Charles O. Odeyale wrote:
> >> No, it is not in either location; not even on my system for that
> >> matter. I have gone to Sun.com to look for it but came back empty. I
> >> will continue to look to download a copy and report back. Is there
> >> anything else I may need, or need to do?
> >>
> >> Thanks.
> >>
> >> ----- Original Message ----- From:
> >> To:
> >> Sent: Wednesday, February 04, 2009 1:21 AM
> >> Subject: Re: FW: Vista, Jee5, sql2000 &sql2005
> >>
> >>
> >>> Is the sqljdbc.jar copied in the /lib or
> >>> /domains/domain1/lib/ext directories? The jar should
> >>> be made available to the application server in order to load the
> >>> class : com.microsoft.sqlserver.jdbc.SQLServerDataSource.
> >>> [Message sent by forum member 'sm157516' (sm157516)]
> >>>
> >>> http://forums.java.net/jive/thread.jspa?messageID=330006
> >>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.

Class name is wrong or classpath is not set for : net.sourceforge.jtds.jdbcx.JtdsDataSource

I hope I am on the right track. Any ideas? its my first time of using this driver.

thanks.

eve

> Date: Wed, 4 Feb 2009 15:55:58 -0500
> From: ryan@ijws.com
> To: users@glassfish.dev.java.net
> Subject: Re: FW: Vista, Jee5, sql2000 &sql2005
>
> The .jar does not come with GlassFish, you have to download it manually.
>
> I do not recommend using Microsoft's JDBC driver. When we use it in
> production to communicate with a remote SQL Server 2005 EE, at least
> once per week there is a problem trying to connect to the database. The
> Microsoft driver blocks the thread that is asking for a connection
> indefinitely. Looking at the FINE/FINER logs, it shows "TDS prelogin
> response error". Once this happens 5 times then the HTTP Listener for
> your web application can no longer respond to web requests and it looks
> like GlassFish is locked up. This happens even when you set the
> loginTimeout property. We tested the latest 1.2 version of the driver.
>
> We use the open source jTDS driver instead. It doesn't have this
> problem and works well.
>
>
> Ryan
>
>
>
>
> Marina Vatkina wrote:
> > Did you try to search Microsoft site?
> >
> > thanks,
> > -marina
> >
> > Dr. Charles O. Odeyale wrote:
> >> No, it is not in either location; not even on my system for that
> >> matter. I have gone to Sun.com to look for it but came back empty. I
> >> will continue to look to download a copy and report back. Is there
> >> anything else I may need, or need to do?
> >>
> >> Thanks.
> >>
> >> ----- Original Message ----- From:
> >> To:
> >> Sent: Wednesday, February 04, 2009 1:21 AM
> >> Subject: Re: FW: Vista, Jee5, sql2000 &sql2005
> >>
> >>
> >>> Is the sqljdbc.jar copied in the /lib or
> >>> /domains/domain1/lib/ext directories? The jar should
> >>> be made available to the application server in order to load the
> >>> class : com.microsoft.sqlserver.jdbc.SQLServerDataSource.
> >>> [Message sent by forum member 'sm157516' (sm157516)]
> >>>
> >>> http://forums.java.net/jive/thread.jspa?messageID=330006
> >>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

When I create it like what Martin suggested, when I restart the application server,

it gets rid of the directory. I then created it like what Ryan suggested, it works but

I have a different type of problem.

I can't seem to be able to connect to my MS SQL Express even though before I could.

I can't seem to start the service even though before it started automatically and it setting

of automatically is set on the service. Something must be wrong. On top of that it says in

the admin console when I ping- error. Server log -

Caused by: java.sql.SQLException: Unknown server host name 'EDELLVE\SQLEXPRESS'.
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:377)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
at net.sourceforge.jtds.jdbcx.JtdsDataSource.getConnection(JtdsDataSource.java:186)
at net.sourceforge.jtds.jdbcx.JtdsDataSource.getPooledConnection(JtdsDataSource.java:264)
at net.sourceforge.jtds.jdbcx.JtdsDataSource.getPooledConnection(JtdsDataSource.java:250)
at com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:126)
... 75 more
Caused by: java.net.UnknownHostException: EDELLVE\SQLEXPRESS
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
|#]

[#|2009-03-02T14:04:45.315+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=14;_ThreadName=httpWorkerThread-4848-0;_RequestID=6445f8cc-0f01-40b4-b059-e8716d72fd6c;| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl$2.run(ASPlainSocketImpl.java:419)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl._invoke(ASPlainSocketImpl.java:416)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl.connect(ASPlainSocketImpl.java:288)
at com.sun.enterprise.server.ss.provider.ASClientSocketImpl.connect(ASClientSocketImpl.java:267)
at java.net.Socket.connect(Socket.java:519)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:304)
at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:255)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:310)
... 81 more
|#]

Basically, the server host name is wrong, even though I copied the exact name from management

studio express. And can't log into the Management studio express with either SQL Autherication

or windows; or start the service. But it used to work before that's why I was able to create a database

A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not
found or was not accessible. Verify that the instance name
is correct and that SQL Server is configured to allow remote c
onnections. (provider: Shared Memory Provider, error: 40 -
Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I create it like what Martin suggested, when I restart the application server,
it gets rid of the directory. I then created it like what Ryan suggested, it works but
I have a different type of problem.

I can't seem to be able to connect to my MS SQL Express even though before I could.
I can't seem to start the service even though before it started automatically and it setting
of automatically is set on the service. Something must be wrong. On top of that it says in
the admin console when I ping- error. Server log -

Caused by: java.sql.SQLException: Unknown server host name 'EDELLVE\SQLEXPRESS'.
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:377)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
at net.sourceforge.jtds.jdbcx.JtdsDataSource.getConnection(JtdsDataSource.java:186)
at net.sourceforge.jtds.jdbcx.JtdsDataSource.getPooledConnection(JtdsDataSource.java:264)
at net.sourceforge.jtds.jdbcx.JtdsDataSource.getPooledConnection(JtdsDataSource.java:250)
at com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:126)
... 75 more
Caused by: java.net.UnknownHostException: EDELLVE\SQLEXPRESS
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
|#]
[#|2009-03-02T14:04:45.315+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=14;_ThreadName=httpWorkerThread-4848-0;_RequestID=6445f8cc-0f01-40b4-b059-e8716d72fd6c;| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl$2.run(ASPlainSocketImpl.java:419)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl._invoke(ASPlainSocketImpl.java:416)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl.connect(ASPlainSocketImpl.java:288)
at com.sun.enterprise.server.ss.provider.ASClientSocketImpl.connect(ASClientSocketImpl.java:267)
at java.net.Socket.connect(Socket.java:519)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:304)
at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:255)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:310)
... 81 more
|#]

Basically, the server host name is wrong, even though I copied the exact name from management
studio express. And can't log into the Management studio express with either SQL Autherication
or windows; or start the service. But it used to work before that's why I was able to create a database
in it.

Please attach your jdbc-connection-pool element configuration from the domain.xml. From this, we could see if adding any additional property could solve your issue. domain.xml is found under /domains//config directory.

can you run the service as Windows Compatibility Mode
AND Run as Administrator
Keep in Mind later versions of SQLServer (such as 05) do not run without .NET Framework
(last time I checked you needed .NET Framework 2.0)

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.

can you run the service as Windows Compatibility Mode
AND Run as Administrator
Keep in Mind later versions of SQLServer (such as 05) do not run without .NET Framework
(last time I checked you needed .NET Framework 2.0)

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.

I've attached the file as requested. But even, starting the service of the
SQL server says - i need administration previleges. im using Vista. and
2005 SQL server express. So more likely MS issue. But if you've similar issue, pls let me know.

I'm jumping in the thread a little late so if I'm answering the wrong
question I apologize in advance. But, my dev machine seems to be setup
similar to what you are trying to setup so I thought maybe I could
offer some tips

I had been using MS-SQL 2008 express on Vista 64 (jdk_1.6.0._11,
glassfish-v2.1b60f) however my issue was not the driver. My issue was
that MS-SQL Express seemed to not enable TCP/IP by default so I had to
enable it using the configuration manager.

Once TCP/IP was enabled I was able to connect using the jTDS driver.
However, I was not able to connect using Microsofts' driver. The
driver complained about ms-sql 2008 express being an incorrect
version. I did find a pre-release of the next version of the jdbc
driver (sqljdbc4.jar) that seemed to work OK on the MS Website. There
were two jars (sqljdbc4.jar and sqljdbc.jar) in the pre-release
version. You will only need sqljdbc4.jar.

By the way, I also recommend just copying the needed jars to the
glassfish/lib directory as the easiest way to make glassfish aware of
the driver.

Also, just as an FYI there is a very useful file that you can add to
your [ProjectName]\setup folder called sun-resources.xml where you can
put in all the settings for your database pool/connection. When you
put this file in the setup folder is shows up under the "Server
Resources" node in NetBeans which is really convenient

Just as a reference my sun-resources.xml file (using the jTDS Driver)
looks kind of like:

With a few modifications you can adjust the above file contents for
the MS-JDBC driver.

Finally, a while back I posted some directions for getting JSPWiki
running on Glassfish. This series of postings also includes some step
by step for setting up Db/JDBC (though more specific to jdbc auth)
which you may find helpful.

[#|2009-03-03T13:52:14.510+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=15;_ThreadName=httpWorkerThread-4848-1;_RequestID=ddb9a77b-d28b-43cd-a28c-307d10777e61;|l.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl$2.run(ASPlainSocketImpl.java:419)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl._invoke(ASPlainSocketImpl.java:416)
at com.sun.enterprise.server.ss.provider.ASPlainSocketImpl.connect(ASPlainSocketImpl.java:288)
at com.sun.enterprise.server.ss.provider.ASClientSocketImpl.connect(ASClientSocketImpl.java:267)
at java.net.Socket.connect(Socket.java:519)

It says connection refuse.

Thanks.

eve

> Date: Tue, 3 Mar 2009 14:40:29 -0700
> From: dennis@gesker.com
> To: users@glassfish.dev.java.net
> CC: ejb@glassfish.dev.java.net; persistence@glassfish.dev.java.net
> Subject: Re: Vista, Jee5, sql2000 &sql2005
>
> Eve:
>
> I'm jumping in the thread a little late so if I'm answering the wrong
> question I apologize in advance. But, my dev machine seems to be setup
> similar to what you are trying to setup so I thought maybe I could
> offer some tips
>
> I had been using MS-SQL 2008 express on Vista 64 (jdk_1.6.0._11,
> glassfish-v2.1b60f) however my issue was not the driver. My issue was
> that MS-SQL Express seemed to not enable TCP/IP by default so I had to
> enable it using the configuration manager.
>
> Once TCP/IP was enabled I was able to connect using the jTDS driver.
> However, I was not able to connect using Microsofts' driver. The
> driver complained about ms-sql 2008 express being an incorrect
> version. I did find a pre-release of the next version of the jdbc
> driver (sqljdbc4.jar) that seemed to work OK on the MS Website. There
> were two jars (sqljdbc4.jar and sqljdbc.jar) in the pre-release
> version. You will only need sqljdbc4.jar.
>
> By the way, I also recommend just copying the needed jars to the
> glassfish/lib directory as the easiest way to make glassfish aware of
> the driver.
>
> Also, just as an FYI there is a very useful file that you can add to
> your [ProjectName]\setup folder called sun-resources.xml where you can
> put in all the settings for your database pool/connection. When you
> put this file in the setup folder is shows up under the "Server
> Resources" node in NetBeans which is really convenient
>
> Just as a reference my sun-resources.xml file (using the jTDS Driver)
> looks kind of like:
>
>
> br />
> Server 9.0 Resource Definitions //EN"
> "http://www.sun.com/software/appserver/dtds/sun-resources_1_3.dtd">
>
>
> object-type="user" pool-name="MyDbPool"/>
>
>
> associate-with-thread="false" connection-creation-retry-attempts="0"
> connection-creation-retry-interval-in-seconds="10"
> connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
> connection-validation-method="auto-commit"
> datasource-classname="net.sourceforge.jtds.jdbcx.JtdsDataSource"
> fail-all-connections="false" idle-timeout-in-seconds="300"
> is-connection-validation-required="false"
> is-isolation-level-guaranteed="true"
> lazy-connection-association="false" lazy-connection-enlistment="false"
> match-connections="false" max-connection-usage-count="0"
> max-pool-size="128" max-wait-time-in-millis="60000" name="MyDbPool"
> non-transactional-connections="false" pool-resize-quantity="2"
> res-type="javax.sql.ConnectionPoolDataSource"
> statement-timeout-in-seconds="-1" steady-pool-size="16"
> validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
>
>
>
>
>
>
>