ejb@glassfish.java.net

Re: Vista, Jee5, sql2000 &sql2005

From: Dennis Gesker <dennis_at_gesker.com>
Date: Tue, 3 Mar 2009 20:03:19 -0700

Eve:

I'd still guess that your ms-sql install not configured to communicate
on port 1433. Install telnet on your pc and try to connect to 1433.

Actually, maybe it would be worth while to try installing nmap [
http://nmap.org/dist/nmap-4.76-setup.exe ] and scan 127.0.0.1 to
definitively determine if ms-sql is listening on 1433.

After installing nmap open a cmd console and issue the command:

nmap 127.0.0.1 -p 1433

Dennis



On Tue, Mar 3, 2009 at 5:42 PM, Eve Pokua <gorgeous65_at_msn.com> wrote:
> Dennis,
>
> Thank you ever so much.  I still have errors:
>
> C:\Users\eve>telnet 127.0.0.1 1433
> 'telnet' is not recognized as an internal or external command,
> operable program or batch file.
> C:\Users\eve>
>
>
> SQL 2000 was so easy to setup.  But its not compatible with Vista.
>
>
> Caused by: javax.resource.spi.ResourceAllocationException: Connection could
> not be allocated because: The TCP/IP connection to the host  has failed.
> java.net.ConnectException: Connection refused: connect
>  at
> com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:119)
>  at
> com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:1304)
>  at
> com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:551)
>  ... 73 more
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP
> connection to the host  has failed. java.net.ConnectException: Connection
> refused: connect
>  at
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown
> Source)
>  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
>  at
> com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(Unknown
> Source)
>  at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(Unknown
> Source)
>  at
> com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:107)
>  ... 75 more
> |#]
>
>
> Datasource Classname:
> com.microsoft.sqlserver.jdbc.SQLServerDataSource
>
> sqljdbc.jar
>
> is copied to domain1\lib
>
> Thanks
>
> eve
>
>
>> Date: Tue, 3 Mar 2009 17:07:25 -0700
>> From: dennis_at_gesker.com
>> To: ejb_at_glassfish.dev.java.net
>> Subject: Re: Vista, Jee5, sql2000 &sql2005
>>
>> What happens when you try to telnet to 127.0.0.1 1433 from the cmd
>> console?
>>
>> Start --> CMD (enter in search box)
>> telnet 127.0.0.1 1433 (hit enter)
>>
>> Dennis
>>
>> On Tue, Mar 3, 2009 at 4:57 PM, Eve Pokua <gorgeous65_at_msn.com> wrote:
>> > Dennis,
>> >
>> > 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_at_gesker.com
>> >> To: users_at_glassfish.dev.java.net
>> >> CC: ejb_at_glassfish.dev.java.net; persistence_at_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 <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
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> >> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>> >>
>> >
>> > ________________________________
>> > Windows Live just got better. Find out more!
>>
>>
>>
>> --
>> 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
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>>
>
> ________________________________
> Beyond Hotmail — see what else you can do with Windows Live. Find out more!



-- 
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