Test Drive: WCS 6.0 Express Developer
This week I had a unique opportunity to test drive the installation of the newly released WebSphere Commerce 6.0 Developer. Here are my experiences from a Windows XP installation.
I will handle the quirks with the database setup after dealing with the basics.
First the installation process. Your installation process might be different depending on what installation images you use - but here is the sequence of the events I used:
- Install Rational Application Developer - RAD6. This is a base install of the IDE and the WAS 6.0 Test Environment.
- Update Rational Product Updater to 6.0.1
- Update RAD 6 to RAD 6.0.11
- Install the interim fixes 1 & 2.
- Install DB2 Express Edition. Before installing DB2, I created a db2admin OS user - but installed db2 as another user with admin privileges. One of the key requirements is that the installing user should have ‘Act as part of the operating system’ user right. Make sure to read the DB2 installation documents to avoid any pitfalls during the installation process.
- Install WC Toolkit for express. This process installs the toolkit, creates the commerce database and publishes a starter store in cloudscape database. If you plan on installing and customizing IBM Sales Center, you are required to install it before installing the tool kit.
Unless you intend to develop the entire commerce application using cloudscape database, you have to set the target database to either Oracle or DB2. In this installation, I used setdbtype.bat to start using my db2 express database.
Syntax for setdbtype is different in WCS 6.0:
setdbtype db2 DB2_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort dbNode] [createdb]
Here is how I ran this command in my environment
setdbtype db2 C:/SQLLIB TestDrive db2admin db2adminpwd tdrive tdrivepwd createdb
Additional parameter createdb is optional. This additional option creates the necessary database and sets the new database as the target database for the toolkit. The schema under which the database tables are created is same as tdrive as shown above. In wcs 5.6 [schema] was also an argument that was used for creating the database - but in 6.0 this is not there.
Problem/Issue:
If dbUserId and dbUserPassword are different from dbAdminID and dbAdminPassword - in general dbUserId and dbAdminId should be different - then you have to create the dbUserId as an OS user. This is a requirement for DB2(not for Oracle). setdbtype.bat ran successfully up to the part of creating the database even though I did not create the dbUserId account as an OS user. This is good news. I was able to verify this by looking at the createdb log. The actual setdbtype part - where the target database is changed from cloudscape to db2 - failed with an invalid userid/password db2 error. I tried to start the wcs server from inside the toolkit - this failed with the same error during the startup of some EJB jars. I fixed this by adding tdrive user as an OS user and everything seem to work fine.
Additional Notes about setdbtype:
- Do not use the createdb option if you have already created the database - unless you want to create a totally different database under a different userid.
- There was an error in the setdbtype log. The error is “Could Not Find C:\WCTOOL~1\PROPER~1\version\loader.cloudscape*.component”. But this did not prevent me from successfully starting the wcs server from the IDE.
- As it is claimed in the “WCS 6.0 New Features” - setdbtype.bat does show more descriptive messages but not good enough. I am still not able to understand what caused the error shown in the log.
- createdb option creates the database but will not add a starter store. You have to do this manually from the WebSphere Commerce Admin Console.
- The documentation suggests that you run wcs_home/bin/resetstores.bat before publishing any starter stores. This does nothing else but refreshes the contents of Stores/WebContent folder with the bootstrap files. Before before you run this command when you are midway in your development - you might lose valuable information if you do not have a backup. BTW, unlike in WCS5.6, it is now “WebContent” folder not “Web Content”.
- You can use setdbtype to set db type for a remote database - notice dbHost, dbServerPort and dbNode options - but this will require minor db2 or oracle configurations.
There were a few missed heart beats owing to the user errors surrounding db setup, but overall it was a good experience. Nope there were no crashes and there were no core dumps.
Hai said,
May 1, 2008 at 2:50 am
Hi,
After I run setdbtype, switch my development environment to use db2, the setdbtype.log show this error “Error trying to configure your config.xml file. Detailed error: “null”". How do I check whether my development environment had switched to db2?
cheers,
Hai
Sahadev said,
May 1, 2008 at 9:26 am
Hai,
It is unlikely your setdbtype ran successfully. When you start the server in your IDE, it might still start correctly and continue to point to the cloudscape database. To find out what database you are connecting to, after the server restart check the console or SystemOut.log and see if you find your DB references.
The error you reported is possibly because the config.xml file is read only. Check this and run the command again. You can run setdbtype multiple times without any issues as long as you are not using the createdb option.
Hope this helps.
- Sahadev