DB2 and ConfigEngine : Security mechanism not supported

I try to post really random solutions here, and this one’s a doozy ! I was updating a production machine from Portal 6.1.0 to 6.1.0.2. I always run the ConfigEngine tasks validate-standalone-ldap and validate-database-connection before I run any Portal update to make sure that the update won’t fail from something silly like a missing password. I’d highly recommend this practice on your Portal systems.
This time when running validate-database-connection, I ran into this error:

action-validate-database:
     [echo] domain       'jcr'
     [echo] DbtDbDriver  'com.ibm.db2.jcc.DB2Driver'
     [echo] DbtDbLibrary '/home/db2inst1/sqllib/java/db2jcc.jar:/home/db2inst1/sqllib/java/db2jcc_license_cu.jar'
     [echo] DbtDbUser    'db2inst1'
     [echo] DbtDbUrl     'jdbc:db2://localhost:50000/WPS6TCP'
     [echo] DbtDbName    'WPS6TCP'
     [java] [06/28/09 13:47:09.620 EST] Attempting to make connection using: jdbc:db2://localhost:50000/WPS6TCP :: db2inst1 :: PASSWORD_REMOVED
     [java] [06/28/09 13:47:09.875 EST] ERROR: Error obtaining connecting for jdbc:db2://localhost:50000/WPS6TCP
     [java] com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][t4][201][11237] Connection authorization failure occurred.  Reason: Security mechanism not supported.
     [java]     at com.ibm.db2.jcc.a.b.m(b.java:1981)
     [java]     at com.ibm.db2.jcc.a.b.a(b.java:1565)
     [java]     at com.ibm.db2.jcc.a.bb.b(bb.java:3386)
     [java]     at com.ibm.db2.jcc.a.bb.a(bb.java:332)
     [java]     at com.ibm.db2.jcc.a.bb.a(bb.java:112)
     [java]     at com.ibm.db2.jcc.a.b.j(b.java:1259)
     [java]     at com.ibm.db2.jcc.a.b.b(b.java:1132)
     [java]     at com.ibm.db2.jcc.a.b.b(b.java:715)
     [java]     at com.ibm.db2.jcc.a.b.a(b.java:701)
     [java]     at com.ibm.db2.jcc.a.b.a(b.java:378)
     [java]     at com.ibm.db2.jcc.a.b.<init>(b.java:316)
     [java]     at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:166)
     [java]     at java.sql.DriverManager.getConnection(DriverManager.java:572)
     [java]     at java.sql.DriverManager.getConnection(DriverManager.java:165)
     [java]     at com.ibm.wps.config.db.Database.init(Database.java:139)
     [java]     at com.ibm.wps.config.db.validation.ValidationDriver.main(ValidationDriver.java:209)

It looked like the problem I’d seen on Ubuntu, where the database password was hashed with an unsupported scheme, but it couldn’t be, because this was on a plain old RHEL system. The difference was that I’d recently changed DB2′s database manager settings from AUTHENTICATION = SERVER to AUTHENTICATION = DATA_ENCRYPT . DATA_ENCRYPT is good because it will send your sql data and your authentication details encrypted across the wire.

Anyway, to make the validation work on a system where you have enabled the DATA_ENCRYPT parameter, just add securityMechanism=13; to the end of the database url. So mine becomes:

jcr.DbUrl=jdbc:db2://localhost:50000/WP6TCP:securityMechanism=13;

So how would the system work in any case, if the database url was wrong?!? The answer is clear after delving into the WebSphere admin console a little bit. I’d configured the custom properties of each Portal datasource post database transfer to work with DATA_ENCRYPT, but not the database urls in wkplc_comp.properties. Here’s where you would set it.

data_encrypt

It is important to emphasize that the wkplc*.properties file in ConfigEngine are templates only, and don’t affect the running of the system, until you run a ConfigEngine task against them. Only then do their values get copied to the actual Portal server.

Posted in Uncategorized | Tagged , , , | Leave a comment

How to solve CWWIM4520E on Portal 6.1

You may have seen this error if you tried the steps in “Configuring WCM email actions with a local SMTP server”.

When you edit the user’s properties this nasty error can appear if your Portal server is connected to an LDAP.

Error entering mail address into Self Care Portlet

Error entering mail address into Self Care Portlet

Btw, this is a 6.1 or Portal.Next beta specific error, it should work fine on 6.0.

Here’s the full text of the error:

com.ibm.wps.util.DataBackendException: EJPSG0015E: Data Backend Problem
com.ibm.websphere.wim.exception.WIMSystemException:
CWWIM4520E The 'javax.naming.directory.SchemaViolationException:
[LDAP: error code 65 - Object Class Violation];
remaining name 'uid=xyzadmin,ou=People,dc=test';
resolved object com.sun.jndi.ldap.LdapCtx@65aa65aa'
naming exception occurred during processing.

The reason this happens is that the portlet ( the self care portlet in this case)  is wired up to write the email address you entered in the form to a VMM attribute called ibm-primaryEmail . If your ldap schema doesn’t have a user attribute in it called ibm-primaryEmail , then you’re going to get an error when you try and write something to it.

Just to check it out, let’s look at the LDAP schema on this server (which is IBM Tivoli Directory Server 6.0)  . I’m using the awesome and free Apache Directory Studio to investigate the LDAP schema here.  Once the connection to the ldap is defined, go LDAP -> Open Schema Browser , and select the tab attribute types.

TDS ldap schema

TDS ldap schema

Ok, so we have an attribute type ‘drink, favouriteDrink’ ;o) , but no ibm-primaryEmail . No matter, there is a ‘mail’ attribute there. We can make Portal use that to save email related attributes.

Open up wkplc.properties and find the section entitled LDAP Attribute Configuration (it’s near the bottom) . Here’s my completed one:

# Use the following  properties to add an attribute mapping between the
# Portal attribute name and the ldap attribute name

# the name of the attribute in LDAP
standalone.ldap.attributes.mapping.ldapName=mail

# the name of the attribute in portal
standalone.ldap.attributes.mapping.portalName=ibm-primaryEmail

# list of entityTypes the mapping should be applied to
standalone.ldap.attributes.mapping.entityTypes=PersonAccount

Cool, now run the task :

ConfigEngine.sh wp-update-standalone-ldap-attribute-config

If you are using a federated ldap setup, edit the corresponding federated properties instead, and then run the following task:

ConfigEngine.sh wp-update-federated-ldap-attribute-config

. Restart the server and try the form again. It should correctly save the email attribute for the user and you can get on with sending email through Portal. Just for kicks, lets look at what that task did. It just edits the wimconfig file, which defines how VMM interacts . Open wimconfig.xml (wp_profile/config/cells/<cellname>/wim/config/wimconfig.xml) and search for ibm-primaryEmail.

Here is the part that does the mapping:

<config:attributes name="mail" propertyName="ibm-primaryEmail">
<config:entityTypes>PersonAccount</config:entityTypes>
</config:attributes>

So the task is really just a (welcome) convenience, all it does it edit the xml file for you. Anyone who has tried to set up multirealms on 6.0 would be grateful for that!

Posted in howto | Tagged , , , | 1 Comment

W00t! Portal.Next beta available!

Been working on this one for a while. Download it here.

If you’re a Linux person, I’d wait for the VMWare images to come out, as they’ll be Linux based installs.

Posted in Uncategorized | Leave a comment

ERRORCODE=-4214, SQLSTATE=28000 from DB2 on Ubuntu

Two posts in one day, wow. It’s all part of our special series: how to install and configure WebSphere Portal 6.1 on Ubuntu. This isn’t a Portal only issue, rather it’s a DB2+Ubuntu issue.

After getting Portal installed on this Ubuntu machine, you’re probably going to want to transfer the default Derby database to something more robust like DB2. So you edit wkplc_comp.properties and wkplc_dbtype.properties, and start to run:

./ConfigEngine.sh create-database

And you get this in the ConfigTrace.log

  [sqlproc] action: execute-sql-scripts
  [sqlproc] _________________________________________________________
  [sqlproc] Database autocommit parameter true
  [sqlproc] No delimiter has been specified, using [;] to separate the SQL statements.
  [sqlproc] Reading file /opt/WebSphere/wp_profile/ConfigEngine/config/database/work/db2/createBufferpools.run
  [sqlproc] Could not connect to database
  [sqlproc] com.ibm.db2.jcc.b.ao: [jcc][t4][2010][11246][3.53.70] Connection authorization failure occurred.  Reason: Local security service non-retryable error. ERRORCODE=-4214, SQLSTATE=28000
BUILD FAILED

Hmm, ok, I thought db2 was working. A good habit when debugging these things is to take the piece that ConfigEngine is trying run and run it independently. So right now I want ConfigEngine to create an empty db2 database that I can run database-transfer against. Try this:

su - db2inst1
db2 create db WP610 using codeset UTF8 territory au pagesize 8192

And that comes back successfully. However, that command sequence is not an accurate representation of what ConfigEngine is actually doing. We’re running ConfigEngine as root. But the ConfigEngine script is using the “user db2inst1 using ” modifiers on the end of the database create command. So how about this?

db2 create db WP610 using codeset UTF8 territory au pagesize 8192 user db2inst1 using password
SQL30082N  Security processing failed with reason "15" ("PROCESSING FAILURE").
SQLSTATE=08001

Ah ha, a failure. In the first example, DB2 already trusts the user that we’re logged is as (db2inst1), so it doesn’t need to go back to the operating system and authenticate it. In the second example, we are logged in as root, so db2 needs to go to the operating system and authenticate the user. Ubuntu uses the tried and true passwd + shadow file combo to store usernames and their associated passwords. The trouble is since Ubuntu 8.10, it uses the newer and more secure SHA512 hashing function to store the passwords, and DB2 doesn’t understand SHA512. So the workaround is to change the hashing function in use on the machine, reset the password and then we should be able to use the “user db2inst1 using ” type commands again.

Open /etc/pam.d/common-password in a text editor and change this line:

password        [success=1 default=ignore]      pam_unix.so obscure<strong> sha512</strong>

to

password        [success=1 default=ignore]      pam_unix.so obscure <strong>md5</strong>

Then run passwd db2inst1 and put the same or a new password. If you look at the shadow file , the hash will change from something like this:
SHA512

db2inst1:$6$IKe6x6Zq$bSajPzHNIy7jQrPXbI8CrPRlpDYUVm8.A2BhNCxes5cY6LWoh7hQr14XW4agBWbW1ywKkSSDSLFV.NXCr2/1z0:14368:0:99999:7:::

MD5

db2inst1:$1$FF0YDtZn$gemqCKt4Ml375mhiBXk2U/:14368:0:99999:7:::

(The unencrypted password here is ‘password’ – don’t get too excited!) .

Now try running ConfigEngine.sh create-database again. It should work. Make sure you change the system /etc/pam.d/common-password back to sha512, as you want the rest of your users to use this hashing function as it is more secure than md5sum . Hopefully DB2 should address this in a fixpack.

Posted in howto | Tagged , , , | 4 Comments

Getting WebSphere Portal to install on Ubuntu

Ok, ok, I know Ubuntu isn’t supported by IBM, but if you’re a developer, and you run Ubuntu on your laptop and would like to run Portal on there too, here’s how you do it. This should work for Debian too . I guess this isn’t really a Portal only problem, rather it’s a general Application Server + Ubuntu issue. I’ve only tried this with 6.1, but it is probably an issue with 6.0 as well, since it uses similar profile creation code.

For some reason Ubuntu, ships a shell called ‘dash’ as their default, rather than good old bash. (Well, they have their reasons.) This presents a problem for App Server, as all the scripts in AppServer/bin use #!/bin/sh (the Bourne shell) as their command interpreter, which on a Redhat machine is symlinked to /bin/bash . The reason why AppServer uses the Bourne shell is that it needs to work on AIX and Solaris too, and you can’t be sure that you have bash on one of those machines.

If you try to call wsadmin.sh on an Ubuntu system you get this error :

/opt/WebSphere/AppServer/bin/wsadmin.sh: 116: Bad substitution

Now, when you’re installing Portal, it installs AppServer, and then calls the manageprofile.sh script to create the default profile for Portal “wp_profile” . Manageprofile.sh calls a bunch of ant scripts that needs to use wsadmin.sh (you can see where I’m going here….) . You might notice in AppServer/log/wp_profile_create.log messages like this :

<message>Checking for wsadmin listener initialization</message>
<message>Is wsadmin listener available? ? false</message>
<message>Returning with returnCode=-1</message>
<message>Failure detected in fatal config action.</message>
<message>wsadmin failed with exception = wsadmin task failed with return code :-1</message>

It actually hangs for 20 minutes waiting for wsadmin to start!

So how do you fix it? Simply, before you install it, unlink /bin/sh -> /bin/dash , and relink so it reads /bin/sh -> /bin/bash

Carefully:

cd /bin
unlink sh
ln -s /bin/bash sh

Now the install should run properly.

Posted in howto | Tagged , , , , , , | 12 Comments

Configuring WCM email actions with a local SMTP server

Wow, here goes, a post about WCM!

We often need to set up simple email system to test WCM’s email action. This feature is used in workflow. The system can be configured to email a user when they need to approve content to move to the next workflow stage, for example.

I like to set up a local smtp/pop3 server on the same machine that Portal is running on, then we don’t have to worry about DNS or MX records or anything nasty like that and can focus on the WCM features. This could be useful for you if you need to run a demo or something all on the same machine.

I did these steps on a Redhat 5 machine. My server’s fully qualified hostname is narrabeen.ilwwcm.au.ibm.com , for those following along at home.

First install postfix and dovecot . They are simple and secure and do just what we want. If you are familiar with another MTA, like sendmail, just use that instead.

yum install postfix dovecot ; yum remove sendmail

or for the non yum users out there

rpm -Uvh postfix.rpm dovecot.rpm ; rpm -e sendmail

Note that you should remove sendmail after you install postfix otherwise rpm will complain about dependency issues.

Dovecot works completely out of the box, just run :

service dovecot start

And test it from your machine by trying to telnet to port 110 on the server.

Cool, lets make some local users that we can send mail to.

useradd user1 ; passwd user1
useradd adminuser ; passwd adminuser

This creates local mailboxes on the server that we will address later as : <user>@<fullyqualifieddomainname> . In my case these addresses are user1@narrabeen.ilwwcm.au.ibm.com and adminuser@narrabeen.ilwwcm.au.ibm.com . Please note that WCM will not forward to user@localhost type addresses, so you will need to address your mail to a ‘proper’ domain.

Now the WCM part. Open your WCMConfigService.properties file. I am using 6.1.0.1 at the moment, but this is valid for any version of WCM. The config file named differently in 5.1 (connect.cfg), and located somewhere else (under Portal Home instead of in the profile) in 6.0, but the properties are quite similar. On 6.1 this is located in [PROFILE_PATH]/PortalServer/wcm/shared/app/config/wcmservices/WCMConfigService.properties
We are concerned with this paragraph:

# workflow - SMTP Mail Setup
connect.connector.mailconnector=defaultsmtpserver,defaultfromaddress,defaultreplytoaddress
connect.connector.mailconnector.defaultsmtpserver=mail.yourmailserver.com
connect.connector.mailconnector.defaultfromaddress=admin@yourmailserver.com
connect.connector.mailconnector.defaultreplytoaddress=admin@yourmailserver.com

Change mail.yourserver.com to your mail server , and the default addresses to adminuser@yourmailserver.com . The defaultfromaddress will be the user that WCM will send the mail as. You should make this a real address so if the user replies to the email, it won’t go bouncing around your email system for days. Restart Portal to make those changes take effect .

Now we need to link users in Portal to the email addresses we have created. Load up Portal, log in as your admin user and go to Administration -> Users and Groups .

Create a new user and enter the email address.

Entering Admin email address

Entering Admin email address

Edit your admin user too, and assign it the email address admin@localhost, which you created earlier.

Create a new library and assign the user manager access to the library. Go to the authoring portlet, click configure and select the library you just created. Logout and log in as the new user.

Now you’ll have to create all the basic stuff before you can create content. Start with the email action and enable all the options, so it will send an email to every account involved in the process. Now add the email action to the ‘entry’ section of the first workflow stage and add the workflow stage to a workflow. Create a presentation template, authoring template, site, site area and finally a piece of content. It should be in the draft stage now. Since the email action is in the entry section, it will be fired every time we create new content, which is good for testing the email action.

Email action on the first workflow stage

Email action on the first workflow stage

Configure up your POP3 client of choice and point it to your Portal/email server using the admin username and password (since the admin user will need to approve the content). I am using the excellent Thunderbird for this purpose. If everything has gone well, we should see an email sitting in Thunderbird.

Ding, new content to be approved!

Ding, new content to be approved!

As you can see, the email that appears is from wcmadmin@narrabeen.ilwwcm.au.ibm.com , which is the value I used for “defaultfromaddress” in the WCMConfigService.properties file.

What if it doesn’t work ? Email is like a series of tubes (with apologies to Ted Stevens) . You need to check that the email is being generated by WCM, and then if WCM is sending it to the right place, and *then* if postfix is sending it to dovecot. SystemOut doesn’t log emails that are sent out so it can be difficult to debug. This trace string is your friend if you’re not sure where to start. It should log WCM’s attempt to send the mail to postfix.

*=info: com.presence.connect.connector.*=all: com.aptrix.pluto.workflow.actions.EmailAction=all

To use the trace string, go to Administration -> Portal Analysis -> Enable Tracing and copy the trace string into the box. A trace.log file should appear in [PROFILE_ROOT]/logs/WebSphere_Portal/

If WCM is sending the email properly, you will see something like this in the trace.log :

[4/20/09 12:14:13:195 EST] 000001fa EmailAction   3   WorkflowAction EmailAction is adding "adminuser@narrabeen.ilwwcm.au.ibm.com" to list of recipients for mailtest7
[4/20/09 12:14:13:302 EST] 000001fa MailConnectio 3   MailConnector: Getting new SMTP transport
[4/20/09 12:14:13:680 EST] 000001fa MailConnectio 3   MailConnector: Mail Sent!

If the mail is still not turning up in the mailbox, we need to turn our attention to /var/log/maillog . By default both dovecot and postfix will log to this file.

Apr 20 10:47:11 narrabeen postfix/smtpd[25554]: connect from narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 10:47:11 narrabeen postfix/smtpd[25554]: 1DB7D798040: client=narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 10:47:11 narrabeen postfix/cleanup[25557]: 1DB7D798040: message-id=&lt;1803316092.1240188430966.JavaMail.root@narrabeen&gt;
Apr 20 10:47:11 narrabeen postfix/qmgr[30835]: 1DB7D798040: from=, size=1146, nrcpt=1 (queue active)
Apr 20 10:47:11 narrabeen postfix/smtpd[25554]: disconnect from narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 10:47:11 narrabeen postfix/smtp[25558]: 1DB7D798040: to=, relay=none, delay=0.19, delays=0.08/0.11/0/0, dsn=5.4.6, status=bounced (mail for narrabeen.ilwwcm.au.ibm.com loops back to myself)

I had this problem when trying to set this up. Postfix does a number of checks to figure out whether to relay the mail to another mail server, or to keep it on the local server and route it to a local user. We want it to do the latter.
We need to change the value mydestination so it matches the mail server address we are using (everything to the right of the @ symbol in the email address) . Additionally we should change mynetworks_style from subnet (the default) to host, as we don’t want postfix to accept mail from any other host in our subnet or not.
If your postfix server is on a different machine to portal, you’d obviously skip this step.

mydestination = $myhostname, localhost.$mydomain, narrabeen.ilwwcm.au.ibm.com
mynetworks_style = host

To make these changes take effect run:

service postfix restart

Now create a new piece of content. Tailing /var/log/maillog helps to make sure the mail is correctly hitting postfix.

pr 20 12:14:13 narrabeen postfix/smtpd[29334]: connect from narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 12:14:13 narrabeen postfix/smtpd[29334]: 9B60D798040: client=narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 12:14:13 narrabeen postfix/cleanup[29337]: 9B60D798040: message-id=&lt;1790995136.1240193653304.JavaMail.root@narrabeen&gt;
Apr 20 12:14:13 narrabeen postfix/qmgr[26483]: 9B60D798040: from=, size=1142, nrcpt=2 (queue active)
Apr 20 12:14:13 narrabeen postfix/local[29338]: 9B60D798040: to=, relay=local, delay=0.17, delays=0.05/0.09/0/0.04, dsn=2.0.0, status=sent (delivered to mailbox)

Jackpot!

Another useful command to use when debugging postfix is postconf -n , which will print all the parameters that are currently in effect for the server.

Well, hope that made some sense, send me a message and let me know how you went.

Posted in howto | Tagged , , , , | 1 Comment

java.lang.UnsatisfiedLinkError: /opt/WebSphere/AppServer/java/jre/bin/libawt.so: libXmu.so.6

Excuse me for titling a post with an exception! Now that I have your attention…..

I’m doing a bit of work on Portal 6.0.  for a customer, and have installed my test environment on Redhat Enterprise 5.3 . I don’t often use a GUI for these machines and sometimes run into problems. On this one I ran the configure-wcm-authoring WPSConfig.sh task but navigated to the WCM Authoring Portlet and found a blank page. The portlet was on the page, but it wasn’t being rendered. A quick look through the SystemErr.log show the culprit:

[4/1/09 16:10:39:329 EST] 00000084 SystemErr     R java.lang.UnsatisfiedLinkError: /opt/WebSphere/AppServer/java/jre/bin/libawt.so: libXmu.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2144)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2004)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:910)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:76)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:81)
at java.awt.Color.&lt;clinit&gt;(Color.java:280)
at com.ibm.psw.uil.nls.UilCommonResources.&lt;clinit&gt;(UilCommonResources.java:246)
at com.ibm.psw.uil.util.UilStatusInfoHelper$ESIData.&lt;init&gt;(UilStatusInfoHelper.java:1153)
at com.ibm.psw.uil.util.UilStatusInfoHelper.&lt;clinit&gt;(UilStatusInfoHelper.java:997)
at com.ibm.psw.wcl.components.table.WTable.createDefaultClassComparators(WTable.java:1007)
at com.ibm.psw.wcl.components.table.WTable.&lt;init&gt;(WTable.java:733)
at com.ibm.psw.wcl.components.table.WTable.&lt;init&gt;(WTable.java:707)
at com.ibm.psw.wcl.components.table.WTable.&lt;init&gt;(WTable.java:664)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WBasicTable.&lt;init&gt;(WBasicTable.java:80)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowserTable.&lt;init&gt;(WRepositoryBrowserTable.java:131)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowser.createTable(WRepositoryBrowser.java:304)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowser.initialise(WRepositoryBrowser.java:210)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowser.&lt;init&gt;(WRepositoryBrowser.java:127)
at com.ibm.workplace.wcm.app.ui.portlet.core.view.MainRepositoryFormView.getRepositoryBrowser(MainRepositoryFormView.java:383)
at com.ibm.workplace.wcm.app.ui.portlet.core.view.MainRepositoryFormView.getRepositoryBrowserTable(MainRepositoryFormView.java:435)
at com.ibm.workplace.wcm.app.ui.portlet.basic.PageManager.getRepositoryTable(PageManager.java:468)

WRepositoryBrowser is the class that renders the main view of the authoring portlet. Looks like it requires some extra packages to work if you haven’t installed xorg with your Redhat Server. A quick search of pbone.net reveals I need two additional packages: libXmu-1.0.2-5.i386.rpm and libXtst-1.0.1-3.1.i386.rpm .  I always install compat-libstdc++-296, compat-libstdc++-33 and libXp on Redhat 5 machines as well. (I think if you don’t have  libXp you get a pretty similar error). I hadn’t seen this specific one before, I think it’s because I used the ‘skipx’ directive in the kickstart file for the machine. Long story short, install those packages on your headless redhat machine.

I think this problem isn’t limited to Portal either. When I was trying to install IBM Http Server on the same machine, I kept getting the same error when the Install Shield installer would load (in -console mode, no less), so I guess it would be good to install these packages whenever you’re going to use Java Apps and use the skipx parameter.

Posted in howto | Tagged , , , | Leave a comment

Can you tell me how to get, how to get to the Solaris boot prompt?

Whenever I have to install Solaris (on SPARC), I never remember how to get it to boot from a cd.  Sparc machines have their own bios system, which comes up as a  this minimal, black on white serif-ey command prompt. You can type commands like:

boot cdrom

… and it’ll boot from the cd rom.

But how to get to the boot menu? Sun machines come with a special keyboard which has a extra row beyond the num pad. There’s a key there labeled STOP, and the ‘Sun Way’ of getting to the boot shell / bios prompt is to hit STOP + A at the same time. I’ve never got one of these keyboards around (we’re using a massive KVM thingy) so I’m forever googling to figure out how to send STOP – A to my Sparc box without having to get to the

So here’s what you do. In normal Solaris, just type :

init 0

And it’ll drop you to the boot prompt. From there go boot cdrom and you’re done.

As an aside I always thought it was funny that in the Solaris install program, they have all these different name resolution schemes you can set, and DNS (the one you basically always want) is the third selection down. Guys, come on, no one uses NIS+ anymore, give it a break! Probably not *that* funny, maybe just a little bit funny.
Posted in howto | Tagged , | Leave a comment

Checking the version of the Oracle JDBC driver jar

I’m working on a problem now where we need to use the Oracle 10g driver against a 9i database. There’s a note in the infocenter about it .But how to do you check which version of the driver you are using ? The filename of the driver is the same between each version of Oracle (ojdbc14.jar), so that’s not going to do it.

To check it out, unzip the driver and read the META-INF/MANIFEST.MF file. Here’s mine:

Manifest-Version: 1.0
Specification-Title:    Oracle JDBC driver classes for use with JDK14
Sealed: true
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Implementation-Title:   ojdbc14.jar
Specification-Vendor:   Oracle Corporation
Specification-Version:  Oracle JDBC Driver version - "10.2.0.3.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.3.0"
Implementation-Vendor:  Oracle Corporation
Implementation-Time:    Fri Sep 29 09:43:24 2006

Also Portal (and regular ol’ Appserver) will tell you as they initialize in the SystemOut.log, just try this trusty command :

cat SystemOut.log | grep -A 2 “Oracle JDBC”

and you get back something like :

[3/20/09 2:44:21:570 EDT] 0000001f InternalOracl I   DSRA8205I: JDBC driver name  : Oracle JDBC driver
[3/20/09 2:44:21:572 EDT] 0000001f InternalOracl I   DSRA8206I: JDBC driver version  : 9.2.0.8.0
[3/20/09 2:44:21:575 EDT] 0000001f InternalOracl I   DSRA8212I: DataStoreHelper name is: com.ibm.websphere.rsadapter.OracleDataStoreHelper@39136937.

What! 9.2.0.8! Looks like I’ve got the wrong one on there. :)

Posted in howto | Tagged , , , | Leave a comment

Eclipse + flash drive = IDE anywhere

I’m taking a introduction to Java course at night school at the moment.  I’ve bought so many ‘Learn Java in 15 minutes’ books and they just sit on the shelf and get dusty. So the class is supposed to make me work at it.

In the class we all are giving nice little windows PCs, and they all have NetBeans 6.5 installed on them. Nothing against NetBeans, but everyone at work uses Eclipse, and I’ve played with Eclipse quite a bit so I didn’t really want to learn NetBeans.

Since the course is held in one of the most treacherous IT environments imaginable (a school!) with every wiseass trying to hack the machines, they are locked down pretty tight. So I didn’t imagine I’d be able to install Eclipse. Also, since you weren’t assigned a specific computer for each session, installing it each time on a different machine wasn’t going to be an option.

I guess you read the title, so know what’s going to come next. I dumped a build of Ganymede onto a crappy flash drive at home and took it to class. Eclipse ran just great off the drive. The particular flash drive has terrible r/w speeds too. I really thought it wouldn’t work well at all. Just make sure you create your workspace on the flash drive too (duh). Now I can work from the same development environment where ever I am. The only caveat I guess is that it has to be the same OS (Wndows, in my case). I’m sure there is some way to launch a Windows build of Eclipse on Linux, but it would be hard to figure out. Too much mucking around with the classpath.

Posted in tip | Tagged , , | Leave a comment