users@glassfish.java.net

RE: Vista, Jee5, sql2000 &sql2005

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Tue, 3 Mar 2009 22:19:29 +0000

 Hello Dennis,

 

Thanks for your reply. The problem is not the driver. i can't seem to start

the MS SQL server service. Something about administrator windows logon. But I'm log on

as administrator. here's the error -

 

Caused by: javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: Network error IOException: Connection refused: connect
 at com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:138)
 at com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:1304)
 at com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:551)
 ... 73 more
Caused by: java.sql.SQLException: Network error IOException: Connection refused: connect
 at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:385)
 at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(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.ConnectException: Connection refused: connect
 at java.net.PlainSocketImp|#]

[#|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_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
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>


_________________________________________________________________
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/