Java Studio Creator, Sun Java System Application Server Platform Edition(PE), and SQLServer

A few weeks ago I was working with Jerry Dunn who contracts for Redox TECH Federal (http://www.redoxfederal.com/). Jerry had installed Sun Java Server Application Server (SJSAS) Platform Edition (PE) and was trying to do a remote deploy from Creator 2. He was getting the following error message in the application server log.

java.sql.SQLException: [sunm][SQLServer JDBC Driver]This driver is locked for use with embedded applications

This exception is thrown from the “smsqlserver.jar” SQLServer JDBC driver. This driver is meant to be used within the SJSAS PE bundled with Creator 2.

There are a couple of options for getting around this.

Option 1 – Use Sun Java System Application Server Enterprise Edition 8.1 2005Q1

If you check out the “Features and Benefits” between Sun Java System Application Server Platform Edition (http://www.sun.com/software/products/appsrvr_pe/features.xml) and Enterprise Edition (http://www.sun.com/software/products/appsrvr_ee/features.xml), you'll notice the Enterprise Edition lists the following.

Integrated JDBC driver collection - Pre-integrated and certified - allowing you to quickly and easily connect your applications to corporate data sources.

So to fix the issue, you can always install SJSAS Enterprise Edition.

Option 2 – Use the jTDS SQLServer JDBC Driver

There is a sourceforge.net project called “jTDS” (http://jtds.sourceforge.net/). This is an open source JDBC driver for SQLServer. You can define a data source in Creator 2 for the jTDS driver and point the data source at your SQLServer database. To do this, follow the instructions in the tutorial “Creating Database Server Types and Data Sources”. When you setup the remote deploy to the SJSAS EE, you need to choose “Data Sources Configured Automatically by JSCreator”. The following diagram shows a snapshot of the dialog.

Creator will setup up the necessary data configurations on SJSAS PE so the Data Direct driver is used as the DataSource driver and the jTDS driver is used for the JDBC driver.

Lastly, you'll need to copy “Creator_install_dir/startup/samples/driveradapter.jar” into the “AppServer_install_dir/lib” directory.

There's a Creator forum discussion around this topic at http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=51299

Many thanks to Jerry Dunn for helping me work through this.

Cheers!

-David

Comments:

Post a Comment:
Comments are closed for this entry.
About

David Botterill

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today