From user-return-15625-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Tue Jun 21 20:20:53 2011 Return-Path: X-Original-To: apmail-geronimo-user-archive@www.apache.org Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4FFB45E8 for ; Tue, 21 Jun 2011 20:20:53 +0000 (UTC) Received: (qmail 91816 invoked by uid 500); 21 Jun 2011 20:20:53 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 91767 invoked by uid 500); 21 Jun 2011 20:20:52 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 91758 invoked by uid 99); 21 Jun 2011 20:20:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 20:20:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.62] (HELO smtp107.prem.mail.sp1.yahoo.com) (98.136.44.62) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 21 Jun 2011 20:20:45 +0000 Received: (qmail 88405 invoked from network); 21 Jun 2011 20:20:25 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:Mime-Version:Content-Type:Subject:Date:In-Reply-To:To:References:Message-Id:X-Mailer; b=1IOzeD6onq6AQdDCFa+U1KwST/3GfXtt3bS9rMdvHucU2CgBifcRwHI8Sgb8G9cSoRfxRz3ziXnelg0/iAWe7UpqSNGJQNXA5zDUfmbtzbscO3z7Y/J3IIUCirNstpYZlvdSxAfJIoninmbvB/F8xXWaI/9m3nYmD+MNgoIDdo4= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1308687625; bh=wza75iSre2ej0JL/ENPtCsjuxNPfALSxyewYptVpQ2M=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:Mime-Version:Content-Type:Subject:Date:In-Reply-To:To:References:Message-Id:X-Mailer; b=1joheUjtnsy4e/Y+1D8qT480ULv2eV0lf0WqlxDVPbv/UgdbDLJp306X89vGE+3n22oFrBy2o9K6vLGYoNSZUYXh0plStWEJfn17Ek4/SkFkYvLicxTy8k2LNzsnptyDz7lcA9MHbwLa4O/92qKToZNEQ+AIEGkMsamRDolmhPs= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: u7lcFIUVM1nwtMKyoKRvWkn3QRThS.wHQCc83abq2BF0y.S BR9pHZeyG7VFwqEXFlhe38L6nSdWgnXe144p_3Ud6KItwHe3.OiS.QjgCuZW _evo1ZIZfrCSgM5kS3qWTKRFV_iNlILvErXxQlyZ48mQ_9AfZltGdgDyex9W CtBiPiN15rP1uRjPS8IR4GO99asD1bX_Jitvd7DknGPmUqe_4tIkdg_krl7Z LdRhQBogTx94jiWwA76l4H7SM57pn3bZjefKU04bM3tgMYBSJMLpBgPbKLkv n4M2ptAMh0IFd3OcUYp.goEG9PouAV26qmFnJvh5WVwGVZu3UQTu8E8c.C0S jS4ikW9M3CITHr7gcrIqZ4pG5AmGoMIXMxJJRWxLJ_w-- X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- Received: from [10.0.1.4] (david_jencks@76.76.148.215 with plain) by smtp107.prem.mail.sp1.yahoo.com with SMTP; 21 Jun 2011 13:20:24 -0700 PDT From: David Jencks Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-31--332057920 Subject: Re: Microsoft SQL Server JDBC Problem with Geronimo 3.0 M1 Date: Tue, 21 Jun 2011 13:20:23 -0700 In-Reply-To: To: user@geronimo.apache.org References: Message-Id: <528A555C-861B-4773-8C0D-C87ED8FB5A4E@yahoo.com> X-Mailer: Apple Mail (2.1084) --Apple-Mail-31--332057920 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Another reason this would not have worked in 3.0-M1 and ought to work on = trunk is that you need to convert the driver jar into an osgi bundle. = There's code in recent trunk builds that is supposed to do this when you = install a jar using the console. However it's not well tested yet so = please let us know how this works. thanks david jencks On Jun 20, 2011, at 10:41 PM, chi runhua wrote: >=20 >=20 > On Tue, Jun 21, 2011 at 10:42 AM, chi runhua = wrote: > Datasource portlet is not enabled on 3.0-M1. You may try the = datasource wizard on 3.0 and use @resource annotation in your sample = code. >=20 > 3.0-SNAPSHOT in trunk. =20 >=20 > HTH. >=20 > Jeff >=20 >=20 > On Tue, Jun 21, 2011 at 12:32 AM, Tyson P. Patterson = wrote: > I am getting the ClassNotFound exception trying to use the Microsoft = SQL > Driver with Geronimo 3.0 M1. >=20 > Here is the setup: > I am running Windows XP Professional 32 bit. > I have Eclipse Helios SR 2 with the Geronimo Eclipse Plugin 3.0 M1 for > my development environment. I am using 6.0.23 for the JRE version. > I installed Microsoft SQL Server Express 2008 R2. I installed = Microsoft > JDBC Driver 3.0. >=20 > =46rom inside Eclipse I was able to establish a database connection to = the > SQL Express database using the sqljdbc4.jar file from the Microsoft = JDBC > Driver installation. >=20 > I loaded the sqljdbc4.jar file into Geronimo 3.0's Repository using = the > console. I specified com.microsoft.sqlserver.jdbc as the group, > SQLServerDriver as the artifact, 3.0 as the version and jar as the = type. >=20 > I started a new JSF project in Eclipse. In the Geronimo Deployment > Plan, I selected the SQLServerDriver I loaded in the repository from = the > drop down list of Server Dependencies. Eclipse generated the = dependency > in geronimo-web.xml as follows: >=20 > > com.microsoft.sqlserver.jdbc > SQLServerDriver > 3.0 > jar > >=20 > I created a session bean and put the connection information in the > constructor for the class: >=20 > Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); > String connectionUrl =3D "jdbc:sqlserver://localhost:1433;" + > "databaseName=3DXXXXXXXX;user=3DXXXX;password=3DXXXXXXXX;"; > conn =3D DriverManager.getConnection(connectionUrl); >=20 > After publishing the application and starting it, I got the exception: > java.lang.ClassNotFoundException: > com.microsoft.sqlserver.jdbc.SQLServerDriver >=20 > I was unable to find how to set the SQL Server connection information = on > the Geronimo 3.0 server as a database pool using the console. >=20 > Any ideas on where I went wrong or what step I forget? >=20 > Tyson Patterson > Carnes Company >=20 > = ##########################################################################= ######## > CONFIDENTIALITY NOTICE: This email and any files transmitted with it = are confidential and intended > solely for the use of the individual or entity to whom they are = addressed. It may contain confidential, > privileged, and/or proprietary information. Any review, dissemination, = distribution, copying, printing, > or other use of this email by persons or entities other than the = addressee and his/her authorized agent > is prohibited. >=20 > If you have received this email in error please notify the originator = of the message and delete the > material from your computer. > = ##########################################################################= ######## >=20 >=20 --Apple-Mail-31--332057920 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii


On Tue, Jun 21, 2011 at = 10:42 AM, chi runhua <chirunhua@gmail.com> = wrote:
Datasource portlet is not enabled on 3.0-M1.  You may try the = datasource wizard on 3.0 and use @resource annotation in your sample = code.

3.0-SNAPSHOT in trunk.  =

HTH.

Jeff


On Tue, Jun 21, 2011 at 12:32 AM, Tyson P. = Patterson <tpatterson@carnes.com> wrote:
I am = getting the ClassNotFound exception trying to use the Microsoft SQL
Driver with Geronimo 3.0 M1.

Here is the setup:
I am running Windows XP Professional 32 bit.
I have Eclipse Helios SR 2 with the Geronimo Eclipse Plugin 3.0 M1 = for
my development environment.  I am using 6.0.23 for the JRE = version.
I installed Microsoft SQL Server Express 2008 R2.  I installed = Microsoft
JDBC Driver 3.0.

=46rom inside Eclipse I was able to establish a database connection to = the
SQL Express database using the sqljdbc4.jar file from the Microsoft = JDBC
Driver installation.

I loaded the sqljdbc4.jar file into Geronimo 3.0's Repository using = the
console.  I specified com.microsoft.sqlserver.jdbc as the = group,
SQLServerDriver as the artifact, 3.0 as the version and jar as the = type.

I started a new JSF project in Eclipse.  In the Geronimo = Deployment
Plan, I selected the SQLServerDriver I loaded in the repository from = the
drop down list of Server Dependencies.  Eclipse generated the = dependency
in geronimo-web.xml as follows:

           <dep:dependency>
              =  <dep:groupId>com.microsoft.sqlserver.jdbc</dep:groupId><= br>               =  <dep:artifactId>SQLServerDriver</dep:artifactId>
              =  <dep:version>3.0</dep:version>
              =  <dep:type>jar</dep:type>
           </dep:dependency>

I created a session bean and put the connection information in the
constructor for the class:

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl =3D "jdbc:sqlserver://localhost:1433;" +
      =  "databaseName=3DXXXXXXXX;user=3DXXXX;password=3DXXXXXXXX;";
conn =3D DriverManager.getConnection(connectionUrl);

After publishing the application and starting it, I got the = exception:
java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLServerDriver

I was unable to find how to set the SQL Server connection information = on
the Geronimo 3.0 server as a database pool using the console.

Any ideas on where I went wrong or what step I forget?

Tyson Patterson
Carnes Company

= ##########################################################################= ########
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are = confidential and intended
solely for the use of the individual or entity to whom they are = addressed. It may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, = distribution, copying, printing,
or other use of this email by persons or entities other than the = addressee and his/her authorized agent
is prohibited.

If you have received this email in error please notify the originator of = the message and delete the
material from your computer.
= ##########################################################################= ########



= --Apple-Mail-31--332057920--