geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chi runhua <chirun...@gmail.com>
Subject Re: Microsoft SQL Server JDBC Problem with Geronimo 3.0 M1
Date Tue, 21 Jun 2011 02:42:18 GMT
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.


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.
>
> From 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>
>                <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 = "jdbc:sqlserver://localhost:1433;" +
>        "databaseName=XXXXXXXX;user=XXXX;password=XXXXXXXX;";
> conn = 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.
>
> ##################################################################################
>

Mime
View raw message