NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Remote database connection problem
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
King, Michael A
Posted via mailing list.





PostPosted: Tue Aug 12, 2008 8:09 am    Post subject: Remote database connection problem Reply with quote

Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King
Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Tue Aug 12, 2008 1:47 pm    Post subject: Remote database connection problem Reply with quote

I don't know Mike,
It's really strange. In your classpath, try to replace com.microsoft.jdbc.sqlserver.SQLServerDataSource with com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see what you get. Your application is complaining that it doesn't see the first path in the classpath but your IDE, which isn't complaining, works just fine with a different path to the database.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com>
To: nbj2ee@netbeans.org
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem


Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King
Back to top
King, Michael A
Posted via mailing list.





PostPosted: Tue Aug 12, 2008 2:17 pm    Post subject: Remote database connection problem Reply with quote

Annabel,

tried adding that to the end of the path entry in my classpath; and no difference. the error still says the classpath is not set for "com.microsoft.jdbc.sqlserver.SQLServerDataSource"


when I look in the services window, under drivers - the Microsoft SQL Server driver is there. I highlight that and the properties window then displays the Name, Driver and Driver Files properties. The Name is what I expect ("Microsoft SQL Server 2000 (Microsoft driver)"). the Driver is "com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver Files are the three jar files that come as the driver - msbase.jar, mssqlserver.jar, msutil.jar all in the correct file location. All of this seems correct.

The path within the mssqlserver.jar file for "SQLServerDataSource" is "com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the mssqlserver.jar file (This is the entry currently in my classpath: C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the folder where the three files are located. Is this not correct? I thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up from the jar file.


Michael King
From: Melongo Annabel [mailto:melongo_annabel@yahoo.com]
Sent: Tuesday, 12 August 2008 11:18 PM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem

Quote:

I don't know Mike,
It's really strange. In your classpath, try to replace com.microsoft.jdbc.sqlserver.SQLServerDataSource with com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see what you get. Your application is complaining that it doesn't see the first path in the classpath but your IDE, which isn't complaining, works just fine with a different path to the database.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com>
To: nbj2ee@netbeans.org
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem


Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King




Back to top
Wouter van Reeven
Posted via mailing list.





PostPosted: Tue Aug 12, 2008 2:22 pm    Post subject: Remote database connection problem Reply with quote

On Wed, Aug 13, 2008 at 12:16:46AM +1000, King, Michael A wrote:
Quote:
tried adding that to the end of the path entry in my classpath; and no
difference. the error still says the classpath is not set for
"com.microsoft.jdbc.sqlserver.SQLServerDataSource"

when I look in the services window, under drivers - the Microsoft SQL Server
driver is there. I highlight that and the properties window then displays the
Name, Driver and Driver Files properties. The Name is what I expect ("Microsoft
SQL Server 2000 (Microsoft driver)"). the Driver is
"com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver Files are the
three jar files that come as the driver - msbase.jar, mssqlserver.jar,
msutil.jar all in the correct file location. All of this seems correct.

The path within the mssqlserver.jar file for "SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the mssqlserver.jar
file (This is the entry currently in my classpath: C:\Program Files\Microsoft
SQL Server 2000 Driver for JDBC\lib;) This is the folder where the three files
are located. Is this not correct? I thought that the
"com.microsoft.jdbcx.sqlserver" part would be picked up from the jar file.

Did you add the JDBC driver jar to the app server (GlassFish?) lib directory?


HTH, Wouter van Reeven

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"
Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Tue Aug 12, 2008 3:17 pm    Post subject: Remote database connection problem Reply with quote

I have a question, where physically is your database? On your computer or remote? If it's remote, then your configuration should not point to the local files but the remote ones.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com>
To: nbj2ee@netbeans.org
Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

DIV { MARGIN:0px;} Annabel,

tried adding that to the end of the path entry in my classpath; and no difference. the error still says the classpath is not set for "com.microsoft.jdbc.sqlserver.SQLServerDataSource"


when I look in the services window, under drivers - the Microsoft SQL Server driver is there. I highlight that and the properties window then displays the Name, Driver and Driver Files properties. The Name is what I expect ("Microsoft SQL Server 2000 (Microsoft driver)"). the Driver is "com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver Files are the three jar files that come as the driver - msbase.jar, mssqlserver.jar, msutil.jar all in the correct file location. All of this seems correct.

The path within the mssqlserver.jar file for "SQLServerDataSource" is "com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the mssqlserver.jar file (This is the entry currently in my classpath: C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the folder where the three files are located. Is this not correct? I thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up from the jar file.


Michael King
From: Melongo Annabel [mailto:melongo_annabel@yahoo.com]
Sent: Tuesday, 12 August 2008 11:18 PM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem


Quote:

I don't know Mike,
It's really strange. In your classpath, try to replace com.microsoft.jdbc.sqlserver.SQLServerDataSource with com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see what you get. Your application is complaining that it doesn't see the first path in the classpath but your IDE, which isn't complaining, works just fine with a different path to the database.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com>
To: nbj2ee@netbeans.org
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem


Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King




Back to top
Victor Manuel Ramirez
Posted via mailing list.





PostPosted: Tue Aug 12, 2008 3:26 pm    Post subject: Remote database connection problem Reply with quote

As Wouter says, you have to add the .jar files to your lib folder. Then restart the server. It should work that way.

2008/8/12 Melongo Annabel <melongo_annabel@yahoo.com (melongo_annabel@yahoo.com)>
Quote:
I have a question, where physically is your database? On your computer or remote? If it's remote, then your configuration should not point to the local files but the remote ones.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com (michael.a.king@eds.com)>
To: nbj2ee@netbeans.org (nbj2ee@netbeans.org)

Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

Annabel,

tried adding that to the end of the path entry in my classpath; and no difference. the error still says the classpath is not set for "com.microsoft.jdbc.sqlserver.SQLServerDataSource"


when I look in the services window, under drivers - the Microsoft SQL Server driver is there. I highlight that and the properties window then displays the Name, Driver and Driver Files properties. The Name is what I expect ("Microsoft SQL Server 2000 (Microsoft driver)"). the Driver is "com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver Files are the three jar files that come as the driver - msbase.jar, mssqlserver.jar, msutil.jar all in the correct file location. All of this seems correct.

The path within the mssqlserver.jar file for "SQLServerDataSource" is "com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the mssqlserver.jar file (This is the entry currently in my classpath: C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the folder where the three files are located. Is this not correct? I thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up from the jar file.



Michael King
From: Melongo Annabel [mailto:melongo_annabel@yahoo.com (melongo_annabel@yahoo.com)]
Sent: Tuesday, 12 August 2008 11:18 PM
To: nbj2ee@netbeans.org (nbj2ee@netbeans.org)
Subject: Re: [nbj2ee] Remote database connection problem


Quote:

I don't know Mike,
It's really strange. In your classpath, try to replace com.microsoft.jdbc.sqlserver.SQLServerDataSource with com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see what you get. Your application is complaining that it doesn't see the first path in the classpath but your IDE, which isn't complaining, works just fine with a different path to the database.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com (michael.a.king@eds.com)>
To: nbj2ee@netbeans.org (nbj2ee@netbeans.org)
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem


Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King













--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com
Back to top
King, Michael A
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 1:35 am    Post subject: Remote database connection problem Reply with quote

Yes!

And I would have expected it to pick it up from there.


Michael King
Information Analyst
EDS - GM&Q
180 Phillip Highway,
Elizabeth, Adelaide, SA 5112
Australia
Tel: +618 8282 4440
Fax: +618 8282 4400
E-mail: michael.a.king@eds.com

We deliver on our commitments
so you can deliver on yours.

-----Original Message-----
From: Wouter van Reeven [mailto:wouter@van.reeven.nl]
Sent: Tuesday, 12 August 2008 11:53 PM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem

On Wed, Aug 13, 2008 at 12:16:46AM +1000, King, Michael A wrote:
Quote:
tried adding that to the end of the path entry in my classpath; and no

Quote:
difference. the error still says the classpath is not set for
"com.microsoft.jdbc.sqlserver.SQLServerDataSource"

when I look in the services window, under drivers - the Microsoft SQL
Server driver is there. I highlight that and the properties window
then displays the Name, Driver and Driver Files properties. The Name
is what I expect ("Microsoft SQL Server 2000 (Microsoft driver)"). the

Quote:
Driver is "com.microsoft.jdbc.sqlserver.SQLServerDriver" and the
Driver Files are the three jar files that come as the driver -
msbase.jar, mssqlserver.jar, msutil.jar all in the correct file
location. All of this seems correct.
Quote:

The path within the mssqlserver.jar file for "SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the
mssqlserver.jar file (This is the entry currently in my classpath:
C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This

Quote:
is the folder where the three files are located. Is this not correct?

Quote:
I thought that the "com.microsoft.jdbcx.sqlserver" part would be
picked up from the jar file.

Did you add the JDBC driver jar to the app server (GlassFish?) lib
directory?


HTH, Wouter van Reeven

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"
Back to top
King, Michael A
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 1:50 am    Post subject: Remote database connection problem Reply with quote

The database is on a remote server.

My Connection string points to the remote server:
Database URL jdbc:microsoft:sqlserver://auelzsa0mfg06.elz.apa.gm.com:1433;DatabaseName=Asset

Surely, I wouldn't be using the remote drivers in my configuration?



Michael King
Quote:
From: Melongo Annabel [mailto:melongo_annabel@yahoo.com]
Sent: Wednesday, 13 August 2008 12:47 AM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem



I have a question, where physically is your database? On your computer or remote? If it's remote, then your configuration should not point to the local files but the remote ones.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com>
To: nbj2ee@netbeans.org
Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

DIV { MARGIN: 0px } Annabel,

tried adding that to the end of the path entry in my classpath; and no difference. the error still says the classpath is not set for "com.microsoft.jdbc.sqlserver.SQLServerDataSource"


when I look in the services window, under drivers - the Microsoft SQL Server driver is there. I highlight that and the properties window then displays the Name, Driver and Driver Files properties. The Name is what I expect ("Microsoft SQL Server 2000 (Microsoft driver)"). the Driver is "com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver Files are the three jar files that come as the driver - msbase.jar, mssqlserver.jar, msutil.jar all in the correct file location. All of this seems correct.

The path within the mssqlserver.jar file for "SQLServerDataSource" is "com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the mssqlserver.jar file (This is the entry currently in my classpath: C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the folder where the three files are located. Is this not correct? I thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up from the jar file.


Michael King
From: Melongo Annabel [mailto:melongo_annabel@yahoo.com]
Sent: Tuesday, 12 August 2008 11:18 PM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem


Quote:

I don't know Mike,
It's really strange. In your classpath, try to replace com.microsoft.jdbc.sqlserver.SQLServerDataSource with com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see what you get. Your application is complaining that it doesn't see the first path in the classpath but your IDE, which isn't complaining, works just fine with a different path to the database.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com>
To: nbj2ee@netbeans.org
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem


Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King








Back to top
King, Michael A
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 1:52 am    Post subject: Remote database connection problem Reply with quote

I'm afraid I've done that - and I expected it to work..... but it doesn't


Michael King
Information Analyst
EDS - GM&Q
180 Phillip Highway,
Elizabeth, Adelaide, SA 5112
Australia
Tel: +618 8282 4440
Fax: +618 8282 4400
E-mail: michael.a.king@eds.com (steve.wong@eds.com)
We deliver on our commitments
so you can deliver on yours.

Quote:
From: Victor Manuel Ramirez [mailto:ramirez.vmanuel@gmail.com]
Sent: Wednesday, 13 August 2008 12:56 AM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem



As Wouter says, you have to add the .jar files to your lib folder. Then restart the server. It should work that way.

2008/8/12 Melongo Annabel <melongo_annabel@yahoo.com (melongo_annabel@yahoo.com)>
Quote:
I have a question, where physically is your database? On your computer or remote? If it's remote, then your configuration should not point to the local files but the remote ones.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com (michael.a.king@eds.com)>
To: nbj2ee@netbeans.org (nbj2ee@netbeans.org)

Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

Annabel,

tried adding that to the end of the path entry in my classpath; and no difference. the error still says the classpath is not set for "com.microsoft.jdbc.sqlserver.SQLServerDataSource"


when I look in the services window, under drivers - the Microsoft SQL Server driver is there. I highlight that and the properties window then displays the Name, Driver and Driver Files properties. The Name is what I expect ("Microsoft SQL Server 2000 (Microsoft driver)"). the Driver is "com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver Files are the three jar files that come as the driver - msbase.jar, mssqlserver.jar, msutil.jar all in the correct file location. All of this seems correct.

The path within the mssqlserver.jar file for "SQLServerDataSource" is "com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set my classpath originally to include the location of the mssqlserver.jar file (This is the entry currently in my classpath: C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the folder where the three files are located. Is this not correct? I thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up from the jar file.



Michael King
From: Melongo Annabel [mailto:melongo_annabel@yahoo.com (melongo_annabel@yahoo.com)]
Sent: Tuesday, 12 August 2008 11:18 PM
To: nbj2ee@netbeans.org (nbj2ee@netbeans.org)
Subject: Re: [nbj2ee] Remote database connection problem


Quote:

I don't know Mike,
It's really strange. In your classpath, try to replace com.microsoft.jdbc.sqlserver.SQLServerDataSource with com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see what you get. Your application is complaining that it doesn't see the first path in the classpath but your IDE, which isn't complaining, works just fine with a different path to the database.


----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com (michael.a.king@eds.com)>
To: nbj2ee@netbeans.org (nbj2ee@netbeans.org)
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem


Hello,
This is my first request to this list - I have looked through the archives but did not find anything relevant.
I am using Netbeans 6.0 and developing a web application. I have a SQL Server 2000 database on a remote server.
I can connect to this database in the IDE using the services window - this allows me to see the tables and data etc.
However, when I attempt to run my project I get an error as follows:
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
My classpath includes the path to the SQL Server 2000 jar files.
The jar files for SQL Server 2000 have been configured in the libraries property of the application.
The jar file includes a class called SQLServerDataSource. But the file path in the jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Is this the issue? If so, why does the IDE connection work? And how do I fix it?
Thanks

Michael King













--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com

Back to top
John Baker
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 2:02 am    Post subject: Remote database connection problem Reply with quote

Did you make sure the driver is copied to the classpath of the
application/web server, e.g. lib directory ?
Which application/web server are you using?

John


King, Michael A wrote:
Quote:
I'm afraid I've done that - and I expected it to work..... but it doesn't

*Michael King *
Information Analyst
*EDS* - GM&Q
180 Phillip Highway,
Elizabeth, Adelaide, SA 5112
Australia
*Tel: +*618 8282 4440
*Fax:* +618 8282 4400
*E-mail:*_ __michael.a.king@eds.com_ <mailto:steve.wong@eds.com>

We deliver on our commitments
so you can deliver on yours.**


------------------------------------------------------------------------
*From:* Victor Manuel Ramirez [mailto:ramirez.vmanuel@gmail.com]
*Sent:* Wednesday, 13 August 2008 12:56 AM
*To:* nbj2ee@netbeans.org
*Subject:* Re: [nbj2ee] Remote database connection problem

As Wouter says, you have to add the .jar files to your lib folder.
Then restart the server. It should work that way.

2008/8/12 Melongo Annabel <melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>>

I have a question, where physically is your database? On your
computer or remote? If it's remote, then your configuration
should not point to the local files but the remote ones.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

Annabel,
tried adding that to the end of the path entry in my
classpath; and no difference. the error still says the
classpath is not set for
"com.microsoft.jdbc.sqlserver.SQLServerDataSource"
when I look in the services window, under drivers - the
Microsoft SQL Server driver is there. I highlight that and the
properties window then displays the Name, Driver and Driver
Files properties. The Name is what I expect ("Microsoft SQL
Server 2000 (Microsoft driver)"). the Driver is
"com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver
Files are the three jar files that come as the driver -
msbase.jar, mssqlserver.jar, msutil.jar all in the correct
file location. All of this seems correct.
The path within the mssqlserver.jar file for
"SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
I set my classpath originally to include the location of the
mssqlserver.jar file (This is the entry currently in my
classpath: C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib;) This is the folder where the three files are
located. Is this not correct? I thought that the
"com.microsoft.jdbcx.sqlserver" part would be picked up from
the jar file.

*Michael King *

------------------------------------------------------------------------
*From:* Melongo Annabel [mailto:melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>]
*Sent:* Tuesday, 12 August 2008 11:18 PM
*To:* nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
*Subject:* Re: [nbj2ee] Remote database connection problem

I don't know Mike,
It's really strange. In your classpath, try to replace
com.microsoft.jdbc.sqlserver.SQLServerDataSource with
com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see
what you get. Your application is complaining that it
doesn't see the first path in the classpath but your IDE,
which isn't complaining, works just fine with a different
path to the database.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem

Hello,

This is my first request to this list - I have looked
through the archives but did not find anything relevant.

I am using Netbeans 6.0 and developing a web application.
I have a SQL Server 2000 database on a remote server.

I can connect to this database in the IDE using the
services window - this allows me to see the tables and
data etc.

However, when I attempt to run my project I get an error
as follows:

RAR5117 : Failed to obtain/create connection. Reason :
Class name is wrong or classpath is not set for :
com.microsoft.jdbc.sqlserver.SQLServerDataSource

My classpath includes the path to the SQL Server 2000 jar
files.
The jar files for SQL Server 2000 have been configured in
the libraries property of the application.

The jar file includes a class called SQLServerDataSource.
But the file path in the jar is
com.microsoft.jdbcx.sqlserver.SQLServerDataSource

Is this the issue? If so, why does the IDE connection
work? And how do I fix it?

Thanks


*Michael King *







--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com
Back to top
King, Michael A
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 2:14 am    Post subject: Remote database connection problem Reply with quote

Sorry John,

I don't really follow your question.

I am using Sun Java System Application Server. This is on my development
PC. The driver files path is in the classpath for this PC.

The driver jar files have been added to the libraries window from the
project properties.

The path within the mssqlserver.jar file for "SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set the classpath to include the location of the mssqlserver.jar file
(This is the entry currently in my classpath: C:\Program
Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the
folder where the three files are located. Is this not correct? I
thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up
from the jar file.


I would have expected this would be more than enough, but are you saying
that I need to add the details somewhere else again?


Michael King

-----Original Message-----
From: John.Baker@Sun.COM [mailto:John.Baker@Sun.COM]
Sent: Wednesday, 13 August 2008 11:32 AM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem


Did you make sure the driver is copied to the classpath of the
application/web server, e.g. lib directory ?
Which application/web server are you using?

John


King, Michael A wrote:
Quote:
I'm afraid I've done that - and I expected it to work..... but it
doesn't

*Michael King *
Information Analyst
*EDS* - GM&Q
180 Phillip Highway,
Elizabeth, Adelaide, SA 5112
Australia
*Tel: +*618 8282 4440
*Fax:* +618 8282 4400
*E-mail:*_ __michael.a.king@eds.com_ <mailto:steve.wong@eds.com>

We deliver on our commitments
so you can deliver on yours.**



------------------------------------------------------------------------
Quote:
*From:* Victor Manuel Ramirez [mailto:ramirez.vmanuel@gmail.com]
*Sent:* Wednesday, 13 August 2008 12:56 AM
*To:* nbj2ee@netbeans.org
*Subject:* Re: [nbj2ee] Remote database connection problem

As Wouter says, you have to add the .jar files to your lib folder.
Then restart the server. It should work that way.

2008/8/12 Melongo Annabel <melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>>

I have a question, where physically is your database? On your
computer or remote? If it's remote, then your configuration
should not point to the local files but the remote ones.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

Annabel,
tried adding that to the end of the path entry in my
classpath; and no difference. the error still says the
classpath is not set for
"com.microsoft.jdbc.sqlserver.SQLServerDataSource"
when I look in the services window, under drivers - the
Microsoft SQL Server driver is there. I highlight that and the
properties window then displays the Name, Driver and Driver
Files properties. The Name is what I expect ("Microsoft SQL
Server 2000 (Microsoft driver)"). the Driver is
"com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver
Files are the three jar files that come as the driver -
msbase.jar, mssqlserver.jar, msutil.jar all in the correct
file location. All of this seems correct.
The path within the mssqlserver.jar file for
"SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
I set my classpath originally to include the location of the
mssqlserver.jar file (This is the entry currently in my
classpath: C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib;) This is the folder where the three files are
located. Is this not correct? I thought that the
"com.microsoft.jdbcx.sqlserver" part would be picked up from
the jar file.

*Michael King *


------------------------------------------------------------------------
Quote:
*From:* Melongo Annabel [mailto:melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>]
*Sent:* Tuesday, 12 August 2008 11:18 PM
*To:* nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
*Subject:* Re: [nbj2ee] Remote database connection problem

I don't know Mike,
It's really strange. In your classpath, try to replace
com.microsoft.jdbc.sqlserver.SQLServerDataSource with
com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see
what you get. Your application is complaining that it
doesn't see the first path in the classpath but your IDE,
which isn't complaining, works just fine with a different
path to the database.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem

Hello,

This is my first request to this list - I have looked
through the archives but did not find anything relevant.

I am using Netbeans 6.0 and developing a web application.
I have a SQL Server 2000 database on a remote server.

I can connect to this database in the IDE using the
services window - this allows me to see the tables and
data etc.

However, when I attempt to run my project I get an error
as follows:

RAR5117 : Failed to obtain/create connection. Reason :
Class name is wrong or classpath is not set for :
com.microsoft.jdbc.sqlserver.SQLServerDataSource

My classpath includes the path to the SQL Server 2000 jar
files.
The jar files for SQL Server 2000 have been configured in
the libraries property of the application.

The jar file includes a class called SQLServerDataSource.
But the file path in the jar is
com.microsoft.jdbcx.sqlserver.SQLServerDataSource

Is this the issue? If so, why does the IDE connection
work? And how do I fix it?

Thanks


*Michael King *







--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com
Back to top
John Baker
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 7:54 am    Post subject: Remote database connection problem Reply with quote

King, Michael A wrote:
Quote:
Sorry John,

I don't really follow your question.

I am using Sun Java System Application Server. This is on my development
PC. The driver files path is in the classpath for this PC.

The driver jar files have been added to the libraries window from the
project properties.

The path within the mssqlserver.jar file for "SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set the classpath to include the location of the mssqlserver.jar file
(This is the entry currently in my classpath: C:\Program
Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the
folder where the three files are located. Is this not correct? I
thought that the "com.microsoft.jdbcx.sqlserver" part would be picked up
from the jar file.


This NetBeans setup sounds right, but just to be sure this is the
correct way to add the libraries to the project:

In the Libraries window, you created a new library and added the
Microsoft SQLServer driver jar files to this library.
Next, in the Web application project, you added the driver library to
the Libraries section of Project properties.

To make sure the libraries are included in the project, after you build
(compile) the project, if you switch from the Projects window to the
Files window and expand
the project and build node, under WEB-INF/lib, the Microsoft SQL Server
driver jar files should be listed.

When you deploy this project, the WAR file that contains the project
files and driver will be extracted on the application server.
the driver jar files should be copied to the Sun Java System Application
Server's classpath.

If not then copy the Microsoft SQL Server driver jar files to the lib
directory under the installation directory.
To make sure the driver jar files have been copied, from the NetBeans
main menu, choose Tools->Servers, select the application server and
click Classes. The driver
jar files should be included.

John

Quote:
I would have expected this would be more than enough, but are you saying
that I need to add the details somewhere else again?


Michael King

-----Original Message-----
From: John.Baker@Sun.COM [mailto:John.Baker@Sun.COM]
Sent: Wednesday, 13 August 2008 11:32 AM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem


Did you make sure the driver is copied to the classpath of the
application/web server, e.g. lib directory ?
Which application/web server are you using?

John


King, Michael A wrote:

Quote:
I'm afraid I've done that - and I expected it to work..... but it
doesn't

*Michael King *
Information Analyst
*EDS* - GM&Q
180 Phillip Highway,
Elizabeth, Adelaide, SA 5112
Australia
*Tel: +*618 8282 4440
*Fax:* +618 8282 4400
*E-mail:*_ __michael.a.king@eds.com_ <mailto:steve.wong@eds.com>

We deliver on our commitments
so you can deliver on yours.**




------------------------------------------------------------------------

Quote:
*From:* Victor Manuel Ramirez [mailto:ramirez.vmanuel@gmail.com]
*Sent:* Wednesday, 13 August 2008 12:56 AM
*To:* nbj2ee@netbeans.org
*Subject:* Re: [nbj2ee] Remote database connection problem

As Wouter says, you have to add the .jar files to your lib folder.
Then restart the server. It should work that way.

2008/8/12 Melongo Annabel <melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>>

I have a question, where physically is your database? On your
computer or remote? If it's remote, then your configuration
should not point to the local files but the remote ones.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

Annabel,
tried adding that to the end of the path entry in my
classpath; and no difference. the error still says the
classpath is not set for
"com.microsoft.jdbc.sqlserver.SQLServerDataSource"
when I look in the services window, under drivers - the
Microsoft SQL Server driver is there. I highlight that and the
properties window then displays the Name, Driver and Driver
Files properties. The Name is what I expect ("Microsoft SQL
Server 2000 (Microsoft driver)"). the Driver is
"com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver
Files are the three jar files that come as the driver -
msbase.jar, mssqlserver.jar, msutil.jar all in the correct
file location. All of this seems correct.
The path within the mssqlserver.jar file for
"SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
I set my classpath originally to include the location of the
mssqlserver.jar file (This is the entry currently in my
classpath: C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib;) This is the folder where the three files are
located. Is this not correct? I thought that the
"com.microsoft.jdbcx.sqlserver" part would be picked up from
the jar file.

*Michael King *



------------------------------------------------------------------------

Quote:
*From:* Melongo Annabel [mailto:melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>]
*Sent:* Tuesday, 12 August 2008 11:18 PM
*To:* nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
*Subject:* Re: [nbj2ee] Remote database connection problem

I don't know Mike,
It's really strange. In your classpath, try to replace
com.microsoft.jdbc.sqlserver.SQLServerDataSource with
com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see
what you get. Your application is complaining that it
doesn't see the first path in the classpath but your IDE,
which isn't complaining, works just fine with a different
path to the database.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem

Hello,

This is my first request to this list - I have looked
through the archives but did not find anything relevant.

I am using Netbeans 6.0 and developing a web application.
I have a SQL Server 2000 database on a remote server.

I can connect to this database in the IDE using the
services window - this allows me to see the tables and
data etc.

However, when I attempt to run my project I get an error
as follows:

RAR5117 : Failed to obtain/create connection. Reason :
Class name is wrong or classpath is not set for :
com.microsoft.jdbc.sqlserver.SQLServerDataSource

My classpath includes the path to the SQL Server 2000 jar
files.
The jar files for SQL Server 2000 have been configured in
the libraries property of the application.

The jar file includes a class called SQLServerDataSource.
But the file path in the jar is
com.microsoft.jdbcx.sqlserver.SQLServerDataSource

Is this the issue? If so, why does the IDE connection
work? And how do I fix it?

Thanks


*Michael King *







--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com



Back to top
Wouter van Reeven
Posted via mailing list.





PostPosted: Wed Aug 13, 2008 9:47 am    Post subject: Remote database connection problem Reply with quote

On Wed, Aug 13, 2008 at 11:34:43AM +1000, King, Michael A wrote:
Quote:
Yes!

And I would have expected it to pick it up from there.

Then GlassFish should have both a connection pool and a JDBC resource for your
database connection (assuming you're using GlassFish of course). Please go to
the admin console of GlassFish (port 4848) and log in using the admin account
(default password is adminadmin) and check out the connection pool under
Resources -> JDBC -> Connection Pools. Open the connection pool and click the
Ping button. You should get "Ping Succeeded". Do you get that?


Greets, Wouter

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"
Back to top
King, Michael A
Posted via mailing list.





PostPosted: Thu Aug 14, 2008 12:39 pm    Post subject: Remote database connection problem Reply with quote

John,

Yes, the three SQL Server jar files are shown in the files window under
WEB-INF/lib


Michael King

-----Original Message-----
From: John.Baker@Sun.COM [mailto:John.Baker@Sun.COM]
Sent: Wednesday, 13 August 2008 5:24 PM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem

King, Michael A wrote:
Quote:
Sorry John,

I don't really follow your question.

I am using Sun Java System Application Server. This is on my
development PC. The driver files path is in the classpath for this
PC.
Quote:

The driver jar files have been added to the libraries window from the
project properties.

The path within the mssqlserver.jar file for "SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"

I set the classpath to include the location of the mssqlserver.jar
file (This is the entry currently in my classpath: C:\Program
Files\Microsoft SQL Server 2000 Driver for JDBC\lib;) This is the
folder where the three files are located. Is this not correct? I
thought that the "com.microsoft.jdbcx.sqlserver" part would be picked
up from the jar file.


This NetBeans setup sounds right, but just to be sure this is the
correct way to add the libraries to the project:

In the Libraries window, you created a new library and added the
Microsoft SQLServer driver jar files to this library.
Next, in the Web application project, you added the driver library to
the Libraries section of Project properties.

To make sure the libraries are included in the project, after you build
(compile) the project, if you switch from the Projects window to the
Files window and expand the project and build node, under WEB-INF/lib,
the Microsoft SQL Server driver jar files should be listed.

When you deploy this project, the WAR file that contains the project
files and driver will be extracted on the application server.
the driver jar files should be copied to the Sun Java System Application
Server's classpath.

If not then copy the Microsoft SQL Server driver jar files to the lib
directory under the installation directory.
To make sure the driver jar files have been copied, from the NetBeans
main menu, choose Tools->Servers, select the application server and
click Classes. The driver jar files should be included.

John

Quote:
I would have expected this would be more than enough, but are you
saying that I need to add the details somewhere else again?


Michael King

-----Original Message-----
From: John.Baker@Sun.COM [mailto:John.Baker@Sun.COM]
Sent: Wednesday, 13 August 2008 11:32 AM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem


Did you make sure the driver is copied to the classpath of the
application/web server, e.g. lib directory ?
Which application/web server are you using?

John


King, Michael A wrote:

Quote:
I'm afraid I've done that - and I expected it to work..... but it
doesn't

*Michael King *
Information Analyst
*EDS* - GM&Q
180 Phillip Highway,
Elizabeth, Adelaide, SA 5112
Australia
*Tel: +*618 8282 4440
*Fax:* +618 8282 4400
*E-mail:*_ __michael.a.king@eds.com_ <mailto:steve.wong@eds.com>

We deliver on our commitments
so you can deliver on yours.**




----------------------------------------------------------------------
--

Quote:
*From:* Victor Manuel Ramirez [mailto:ramirez.vmanuel@gmail.com]
*Sent:* Wednesday, 13 August 2008 12:56 AM
*To:* nbj2ee@netbeans.org
*Subject:* Re: [nbj2ee] Remote database connection problem

As Wouter says, you have to add the .jar files to your lib
folder.
Quote:
Quote:
Then restart the server. It should work that way.

2008/8/12 Melongo Annabel <melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>>

I have a question, where physically is your database? On your
computer or remote? If it's remote, then your configuration
should not point to the local files but the remote ones.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 9:16:46 AM
Subject: RE: [nbj2ee] Remote database connection problem

Annabel,
tried adding that to the end of the path entry in my
classpath; and no difference. the error still says the
classpath is not set for
"com.microsoft.jdbc.sqlserver.SQLServerDataSource"
when I look in the services window, under drivers - the
Microsoft SQL Server driver is there. I highlight that and
the
Quote:
Quote:
properties window then displays the Name, Driver and Driver
Files properties. The Name is what I expect ("Microsoft SQL
Server 2000 (Microsoft driver)"). the Driver is
"com.microsoft.jdbc.sqlserver.SQLServerDriver" and the Driver
Files are the three jar files that come as the driver -
msbase.jar, mssqlserver.jar, msutil.jar all in the correct
file location. All of this seems correct.
The path within the mssqlserver.jar file for
"SQLServerDataSource" is
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
I set my classpath originally to include the location of the
mssqlserver.jar file (This is the entry currently in my
classpath: C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib;) This is the folder where the three files are
located. Is this not correct? I thought that the
"com.microsoft.jdbcx.sqlserver" part would be picked up from
the jar file.

*Michael King *



----------------------------------------------------------------------
--

Quote:
*From:* Melongo Annabel [mailto:melongo_annabel@yahoo.com
<mailto:melongo_annabel@yahoo.com>]
*Sent:* Tuesday, 12 August 2008 11:18 PM
*To:* nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
*Subject:* Re: [nbj2ee] Remote database connection problem

I don't know Mike,
It's really strange. In your classpath, try to replace
com.microsoft.jdbc.sqlserver.SQLServerDataSource with
com.microsoft.jdbcx.sqlserver.SQLServerDataSource and see
what you get. Your application is complaining that it
doesn't see the first path in the classpath but your IDE,
which isn't complaining, works just fine with a different
path to the database.

----- Original Message ----
From: "King, Michael A" <michael.a.king@eds.com
<mailto:michael.a.king@eds.com>>
To: nbj2ee@netbeans.org <mailto:nbj2ee@netbeans.org>
Sent: Tuesday, August 12, 2008 2:39:10 AM
Subject: [nbj2ee] Remote database connection problem

Hello,

This is my first request to this list - I have looked
through the archives but did not find anything relevant.

I am using Netbeans 6.0 and developing a web application.
I have a SQL Server 2000 database on a remote server.

I can connect to this database in the IDE using the
services window - this allows me to see the tables and
data etc.

However, when I attempt to run my project I get an error
as follows:

RAR5117 : Failed to obtain/create connection. Reason :
Class name is wrong or classpath is not set for :
com.microsoft.jdbc.sqlserver.SQLServerDataSource

My classpath includes the path to the SQL Server 2000 jar
files.
The jar files for SQL Server 2000 have been configured in
the libraries property of the application.

The jar file includes a class called SQLServerDataSource.
But the file path in the jar is
com.microsoft.jdbcx.sqlserver.SQLServerDataSource

Is this the issue? If so, why does the IDE connection
work? And how do I fix it?

Thanks


*Michael King *







--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com



Back to top
King, Michael A
Posted via mailing list.





PostPosted: Thu Aug 14, 2008 12:45 pm    Post subject: Remote database connection problem Reply with quote

When I look on the Services window, under the Sun Application
server/Resources/JDBC/JDBC Resources I can see the resource called
jdbc/dbo_MicrosoftSQLServer.

Under /connectionPools there is the connection pool.


Michael King

-----Original Message-----
From: Wouter van Reeven [mailto:wouter@van.reeven.nl]
Sent: Wednesday, 13 August 2008 7:17 PM
To: nbj2ee@netbeans.org
Subject: Re: [nbj2ee] Remote database connection problem

On Wed, Aug 13, 2008 at 11:34:43AM +1000, King, Michael A wrote:
Quote:
Yes!

And I would have expected it to pick it up from there.

Then GlassFish should have both a connection pool and a JDBC resource
for your database connection (assuming you're using GlassFish of
course). Please go to the admin console of GlassFish (port 4848) and log
in using the admin account (default password is adminadmin) and check
out the connection pool under Resources -> JDBC -> Connection Pools.
Open the connection pool and click the Ping button. You should get "Ping
Succeeded". Do you get that?


Greets, Wouter

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo