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 <dennis_at_gesker.com> 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:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE resources PUBLIC "-//Sun Microsystems, Inc.//DTD Application
> Server 9.0 Resource Definitions //EN"
> "http://www.sun.com/software/appserver/dtds/sun-resources_1_3.dtd">
> <resources>
> <jdbc-resource enabled="true" jndi-name="jdbc/MyDb"
> object-type="user" pool-name="MyDbPool"/>
>
> <jdbc-connection-pool allow-non-component-callers="false"
> 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">
> <property name="serverName" value="127.0.0.1"/>
> <property name="port" value="1433"/>
> <property name="appName" value="GlassfishAppServer"/>
> <property name="databaseName" value="MyDb"/>
> <property name="user" value="sa"/>
> <property name="password" value="mySecretPassword"/>
> <!-- <property name="URL"
> value="jdbc:jtds:sqlserver://localhost:1433/MyDb;tds=8.0;lastupdatecount=true"/>
> -->
> </jdbc-connection-pool>
>
>
> </resources>
>
>
> 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.
>
> http://gesker.blogspot.com/2007/03/jspwikiglassfish-install-part-1.html
> http://gesker.blogspot.com/2007/03/jspwikiglassfish-install-part-10-of-18.html
> http://gesker.blogspot.com/2007/03/jspwikiglassfish-install-part-11-of-18.html
>
>
> Anyway, I hope that helps to get you going. Good luck with your project.
>
> Dennis
>
>
>
> On Tue, Mar 3, 2009 at 8:48 AM, Eve Pokua <gorgeous65_at_msn.com> wrote:
>>
>> Martin,
>>
>> i've tried both windows and sql mode. And im log on as administrator.
>>
>> .net framework 3.1 sp1 is installed. So what im I doing wrong?
>>
>> thanks
>>
>> eve
>> ________________________________
>> From: mgainty_at_hotmail.com
>> To: users_at_glassfish.dev.java.net
>> Date: Tue, 3 Mar 2009 08:02:16 -0500
>> Subject: RE: Vista, Jee5, sql2000 &sql2005
>>
>> 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.
>>
>>
>>
>>
>> ________________________________
>> From: gorgeous65_at_msn.com
>> To: users_at_glassfish.dev.java.net
>> Date: Tue, 3 Mar 2009 12:13:26 +0000
>> Subject: RE: Vista, Jee5, sql2000 &sql2005
>>
>> hello,
>>
>> 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.
>>
>>
>>
>> thanks
>> eve
>>
>>> Date: Mon, 2 Mar 2009 20:34:07 -0800
>>> From: glassfish_at_javadesktop.org
>>> To: users_at_glassfish.dev.java.net
>>> Subject: Re: RE: Vista, Jee5, sql2000 &sql2005
>>>
>>> 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
>>> <install_root>/domains/<domain_name>/config directory.
>>> [Message sent by forum member 'sm157516' (sm157516)]
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=334707
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>> ________________________________
>> Beyond Hotmail — see what else you can do with Windows Live. Find out more!
>> ________________________________
>> Windows Live™ Groups: Create an online spot for your favorite groups to
>> meet. Check it out.
>> ________________________________
>> Share your photos with Windows Live Photos – Free. Try it Now!
>
>
>
> --
> Dennis R. Gesker
> email: dennis_at_gesker.com
> google talk: gesker_at_gmail.com
> aim: dennisgesker
> pgp/gpg: 0x267D3FE8
> First things first, but not necessarily in that order. -- Unknown
>
--
Dennis R. Gesker
email: dennis_at_gesker.com
google talk: gesker_at_gmail.com
aim: dennisgesker
pgp/gpg: 0x267D3FE8
First things first, but not necessarily in that order. -- Unknown