Friday, March 11, 2011

GenePattern Goodies/Badies

GP installer fails to launch, Java throws exception:

Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

An internal LaunchAnywhere application error has occured and this application cannot proceed. (LAX)

Stack Trace:
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
        at java.util.Properties.loadConvert(Properties.java:569)
        at java.util.Properties.load0(Properties.java:392)
        at java.util.Properties.load(Properties.java:342)
        at com.zerog.common.java.util.PropertiesUtil.loadProperties(DashoA10*..)
        at com.zerog.lax.LAX.(DashoA10*..)
        at com.zerog.lax.LAX.main(DashoA10*..)

After some googling around, I discovered that Launch Anywhere often screws around with PS1, so changing this for the current shell resolves the issue:

$ export PS1=">"

Some basic ways to access GP's HSQLDB:

You must have RC configuration file(s) in the home directory either sqltool.rc or dbmanager.rc:

# This is for a hsqldb Server running with default settings on your local
# computer (and for which you have not changed the password for "SA").
urlid gp
url jdbc:hsqldb:hsql://127.0.0.1:9001/xdb
username sa
password

Then sqltool (commandline) or DatabaseManager (GUI) can be called:

java -cp hsqldb.jar org.hsqldb.util.DatabaseManager --urlid gp

If GP is installed on NFS share, it fails to start due to the HSQLDB failure.

This is NOT GP's issue. It's a HSQLDB issue. The workaround is disble HSQLDB file locking by presenting these in DB's properties file:

pwbcad@ubuntu:data$ cat db0.properties
hsqldb.nio_data_file=false
hsqldb.lock_file=false
...

UPDATE: the above method is for version between 1.7.2. and 1.8.0. Couldn't find out which version the GP uses. But tried replace the hsqldb.jar with the 1.8.10 version, now GP can start successfully.

Friday, February 4, 2011

SGE in PWBC

Below is the output from installing SGE via apt-get:

Creating config file /etc/default/gridengine with new version
Setting up gridengine-master (6.2u5-1ubuntu1) ...
Initializing cluster with the following parameters:
 => SGE_ROOT: /var/lib/gridengine
 => SGE_CELL: default
 => Spool directory: /var/spool/gridengine/spooldb
 => Initial manager user: sgeadmin
Initializing spool (/var/spool/gridengine/spooldb)
Initializing global configuration based on /usr/share/gridengine/default-configuration
Initializing complexes based on /usr/share/gridengine/centry
Initializing usersets based on /usr/share/gridengine/usersets
Adding user sgeadmin as a manager
Cluster creation complete
Setting up libxp6 (1:1.0.0.xsf1-2build1) ...
Setting up lesstif2 (1:0.95.2-1) ...
Setting up gridengine-qmon (6.2u5-1ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

When running "qstat-f" on exec host, it complains:

error: commlib error: got select error (No route to host)
error: unable to contact qmaster using port 6444 on host "pwbclinuxlab.garvan.unsw.edu.au"

pwbclinuxlab.garvan.unsw.edu.au is the ex-qmaster which has been removed. Even in the new qmaster, add the exec host again, the exec host still remember the old one. Because it's the string hardcoded in:

/var/lib/gridengine/default/common/act_qmaster

When running "qstat-f" on exec host, it has another complain...

error: commlib error: access denied (client IP resolved to host name "". This is not identical to clients host name "")
error: unable to contact qmaster using port 6444 on host "sgeqmast01.garvan.unsw.edu.au"

Read Things to think about before installing Grid Engine.

This is very likely related to DNS. SGE requires both forward and reverse DNS queries. So make sure DNS server has been setup properly. In case of DNS server setup is too difficult, adding proper entries to /etc/hosts will fix the issue.

Remember: qmaster's hosts file must contain all SGE hosts' (qsub host, qexec host etc) record. Any other SGE host must contain qmaster's record.

127.0.0.1       localhost
129.94.136.232  sgeqexec01.garvan.unsw.edu.au   sgeqexec01
129.94.136.230  sgeqmast01.garvan.unsw.edu.au   sgeqmast01

Friday, January 7, 2011

Ubuntu 10.10 Base Image Installation Note

On the new VMware platform, I need to create a Ubuntu base image, which will be used as a deployment template for other groups. The base image has to be basic, flexible and secure.

Partioning the virtual hard disk, 36GB, LVM is used.

I create a volume group called VG01 on the 36GB HDD. From there I use the follow partion schema. There is no dedicated partition for /home because the users store the data to NFS space.

  • 210MB /boot ext3
  • 15.1GB / ext4
  • rest swap

Partitioning Strategies

The Linux Logical Volume Manager

Enable OpenSSH

Just remember to select it during the installation.

Build up the min security FIRST

First modify the entries in the following files:

root@pwbclinuxlab:~# cat /etc/hosts.allow
# /etc/hosts.allow: list of hosts that are allowed to access the system.
#                   See the manual pages hosts_access(5) and hosts_options(5).
#
# Example:    ALL: LOCAL @some_netgroup
#             ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#

#Allow servers & admin
...
root@pwbclinuxlab:~# cat /etc/hosts.deny
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
#                  See the manual pages hosts_access(5) and hosts_options(5).
#
# Example:    ALL: some.host.name, .some.domain
#             ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.
#
# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID
ALL: ALL

Optional: change root password

sudo passwd

Optional: enable RSA SSH login

Password-less SSH via PuTTY

Config the network interface for internet access, DNS, hostname etc

Ubuntu Networking Configuration Using Command Line

Update the apt source.list so apt-get sources from Arrnet.

root@pwbclinuxlab:~# cat /etc/apt/sources.list
#
# deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted

#deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

#deb http://au.archive.ubuntu.com/ubuntu/ maverick main restricted
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick main restricted
deb http://mirror.aarnet.edu.au/ubuntu/ maverick main restricted
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick main restricted

## Major bug fix updates produced after the final release of the
## distribution.
#deb http://au.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
deb http://mirror.aarnet.edu.au/ubuntu/ maverick-updates main restricted
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
#deb http://au.archive.ubuntu.com/ubuntu/ maverick universe
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick universe
#deb http://au.archive.ubuntu.com/ubuntu/ maverick-updates universe
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-updates universe
deb http://mirror.aarnet.edu.au/ubuntu/ maverick universe
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick universe
deb http://mirror.aarnet.edu.au/ubuntu/ maverick-updates universe
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
#deb http://au.archive.ubuntu.com/ubuntu/ maverick multiverse
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick multiverse
#deb http://au.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
#deb http://mirror.aarnet.edu.au/ubuntu/ maverick multiverse
#deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick multiverse
#deb http://mirror.aarnet.edu.au/ubuntu/ maverick-updates multiverse
#deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://au.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu maverick partner
# deb-src http://archive.canonical.com/ubuntu maverick partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu maverick main
# deb-src http://extras.ubuntu.com/ubuntu maverick main

deb http://security.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
deb http://security.ubuntu.com/ubuntu maverick-security universe
deb-src http://security.ubuntu.com/ubuntu maverick-security universe
deb http://security.ubuntu.com/ubuntu maverick-security multiverse
deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse

Install VMware Tools

Do not get the one from atp-get. It is unsupported by VMware. Follow the VMware official guide instead.

VMware Tools Installation Guide For Operating System Specific Packages

VMwareTools

Install other useful utilities like htop etc

Enable LDAP auth

LDAP feature can be enabled on another new image which is a clone of this one, so that I can have two images: with or without LDAP.

LDAPClientAuthentication

OpenLDAP Server

Thursday, January 6, 2011

X11, Xming Confusion: Which X Server is Serving You?!

When I tried to start qmon, a X11 application from SGE, it gave my errors:

Warning: Cannot convert string "-adobe-helvetica-medium-r-*--14-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-bold-r-*--14-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--12-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--24-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-medium-r-*--14-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-*--14-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-medium-r-*--12-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--10-*-*-*-p-*-*-*" to type FontStruct
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  45 (X_OpenFont)
  Serial number of failed request:  343
  Current serial number in output stream:  354

According to many posts like this one, suggest to add required fonts from the repository then add to X11 path. Makes perfect sense. But I stuck in the step that adding fonts to X11 path by using xset fp+:

unused@pwbclinuxlab:~$ xset fp+ /usr/share/fonts/X11/100dpi
xset:  bad font path element (#90), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

I tried many ways to fix it, like permissions, created fonts.dir by using mkfontdir (See here). Nothing helps. I had to try to find X11's conf file to see if anything there, but I couldn't find any!!! I checked X11 directories under /etc, /usr all empty or no binary there!! Now I realized that there is no X11 server running.

I almost forgot, I use PuTTY in a Windows platform, with Xming running, and now I am almost sure, Xming is the X server I need to modify, not the one on the server!! I found the font support installation from sourceforge called Xming-fonts-7-5-0-25-setup.exe, installed it, everything is fine!!

Password-less SSH via PuTTY

I need to connect to a Ubuntu 10.10 server via PuTTY, password-lessly.

You can generate the key pair from two places:

  • On the Unbuntu server by using ssh-keygen. Detail
  • On the local machine, using a utility called PuTTYgen

But using either way alone won't work because:

  1. PuTTY only understands the private key file generated by PuTTYgen. PuTTY complains if I select a private key generated by ssh-keygen (on the server).
  2. Ubuntu OpenSSH doesn't understand the public key generated by PuTTYgen. The server will give you Server refused our key if I copy the public key generated by PuTTYgen.

The solution is tricky but simple: all I need to do is, generate the key pair on the server by using ssh-keygen. Copy the generated private key to local machine, and load it to PuTTYgen, then convert it into PuTTY format. That's all!

Friday, March 26, 2010

Solaris FAQ

wget etc Cannot Resolve Host Name

Need to add DNS server list in /etc/resolv.conf with the following content:

domain garvan.unsw.edu.au
nameserver xxx.xxx.xxx.xxx

gpg: Can't check signature: public key not found

Need to import pub key into gpg:

gpg --import *.asc

When installing perl DBI, it complains:

Need to import pub key into gpg:

CPAN.pm needs either both external programs tar and gzip installed or
both the modules Archive::Tar and Compress::Zlib. Neither prerequisite
is available. Can't continue.

How To Resolve – CPAN.pm needs tar, gzip and bzip2 installed – error message

Tuesday, March 16, 2010

NCI UPT 4.2 Tricky Post

Installation Properties

This is the install.properties used in command line installation process. Testing on WinXP VBox and only enable typical (central) configuration.

##############################################################
#
# $Id: install.properties 1593 2009-04-27 21:29:25Z saksass $
# $HeadURL: https://gforge.nci.nih.gov/svnroot/automation/trunk/software/bda-build-template/software/build/install.properties $
#
# This properties file is for cancer center installs.
# 
##############################################################

##############################
###  APPLICATION SETTINGS  ###
##############################
# install/build.xml set application.base.path to correct path based on os type
application.base.path.linux=REPLACE_VALUE
application.base.path.windows=C:/NCI/upt
env.name=external
exclude.access-logs=true

###########################
###  DATABASE SETTINGS  ###
###########################
database.type=mysql
super.admin.user=superadmin
database.re-create=true
#exclude.database=true
# Required for upt central config

upt.central.database.re-create=true
#upt.central.database.drop-schema=true
upt.central.authentication.type=db

upt.central.database.type=mysql
upt.central.database.server=localhost
upt.central.database.version=5.0.27
upt.central.database.port=3306
upt.central.database.name=upt
upt.central.database.system.user=root
upt.central.database.system.password=
upt.central.database.user=mysql
upt.central.database.password=
upt.central.database.url.prefix=jdbc:mysql
upt.central.database.system.url=${upt.central.database.url.prefix}://${upt.central.database.server}:${upt.central.database.port}
upt.central.database.url=${upt.central.database.system.url}/${upt.central.database.name}
upt.central.database.driver.class=org.gjt.mm.mysql.Driver
upt.central.database.encrypt.enabled=YES
upt.central.database.dialect=org.hibernate.dialect.MySQLDialect

upt.central.ldaps.url=ldaps://ncids4a.nci.nih.gov:636
upt.central.ldaps.basedn=ou=nci,o=nih
upt.central.ldaps.userid.label=cn
upt.central.ldap.url=ldap://ncicbds-dev.nci.nih.gov:389
upt.central.ldap.searchable.base=ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.userid.label=uid
upt.central.ldap.admin.user.name=uid=csmAdmin,ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.admin.user.password=CSM@admin!

########################
###  JBOSS SETTINGS  ###
########################
# jboss.home will be generated as ${application.base.path}/${jboss.relateive.path}
jboss.relative.path=${jboss.binaries.relative.dir}
jboss.server.hostname=localhost
jboss.server.name=default
jboss.web.user=pwbc_admin
jboss.web.password=

# If you want to use JBboss NCICB Standard port configurations, uncommment the lines below and comment out all the ports.  Be sure to pick a correct prot configuration (see  https://wiki.nci.nih.gov/x/0gqy)
exclude.jboss-login-config=true
#jboss.ncicb-standard.port-config=true
#jboss.server.ports.name=config39080
jboss.server.ports.name=bda-ports

jboss.server.jndi.port=46200
jboss.server.port=46210
jboss.cobraorb.port=46350
jboss.ejbinvoker.port=46150
jboss.hajndi.port=46160
jboss.hajrmi.port=46260
jboss.jms.port=46170
jboss.jmx-rmi.port=46290
jboss.messaging.port=46330
jboss.pooledha.port=46270
jboss.remoting.port=46320
jboss.server.bind.port=0
jboss.server.rmi.port=46230
jboss.service.rmiobject.port=46240
jboss.snmp.port=46310
jboss.snmp-trapd.port=46300
jboss.web.service.port=46250
jboss.server.redirect.port=46298

jboss.ssl.enable=false

#@Resolve this property
jboss.external.http.host=

##################################
### Filesystem Data Repository ###
##################################
# If you need to store files on the file system add properties to this section otherwise delete it
#@Resolve this property
fs-data.base.dir=

##############
### TOMCAT ###
##############
# tomcat.home will be generated as ${application.base.path}/${tomcat.relateive.path}
exclude.tomcat.backup=true
tomcat.ssl.enable=false
exclude.tomcat=true

###############
###  Log4J  ###
###############
log4j.maxFileSize=100MB
log4j.maxDays=7
log4j.level=WARN

###################################
#  PRE-POST VALIDATION PROPERTIES #
###################################
validation.pre.port.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.server.port},${jboss.web.service.port}
validation.post.http.list=${jboss.server.port}
validation.post.socket.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.web.service.port}

###################################
#  upt backwards compatible multiple installation configuration #
###################################
upt.central.config=true
upt.31.installed=false
upt.32.installed=false
upt.40.installed=false
upt.41.installed=false
# When typical setup is enable (i.e. upt.central.config=true), it has been experiencing /upt42/Login.do not found (HTTP 404).
# It's confirmed that typical setup installs UPT 4.2 but 404 happens if upt.42.installed is not enabled. Guessing this option
# may fully expose everything that UPT 4.2 needs.
upt.42.installed=true

This is the install.properties used in command line installation process. Used on installation on ptest with non-typical configuration enabled. This enables all backward compatibility for CSM 3.1 - 4.2. Each version requires its own DB named as uptdbxx where xx could be 31, 32, 42 etc. All other config such as port are left as default.

##############################################################
#
# $Id: install.properties 1593 2009-04-27 21:29:25Z saksass $
# $HeadURL: https://gforge.nci.nih.gov/svnroot/automation/trunk/software/bda-build-template/software/build/install.properties $
#
# This properties file is for cancer center installs.
# 
##############################################################

##############################
###  APPLICATION SETTINGS  ###
##############################
# install/build.xml set application.base.path to correct path based on os type
application.base.path.linux=/opt/nci/upt
application.base.path.windows=C:/NCI/upt
env.name=external
exclude.access-logs=true

###########################
###  DATABASE SETTINGS  ###
###########################
database.type=mysql
super.admin.user=superadmin
database.re-create=true
#exclude.database=true
# Required for upt central config

upt.central.database.re-create=true
#upt.central.database.drop-schema=true
upt.central.authentication.type=db

upt.central.database.type=mysql
upt.central.database.server=localhost
upt.central.database.version=5.0.27
upt.central.database.port=3306
upt.central.database.name=csm_dev_bkwrdscmptbl_central
upt.central.database.system.user=root
upt.central.database.system.password=
upt.central.database.user=mysql
upt.central.database.password=
upt.central.database.url.prefix=jdbc:mysql
upt.central.database.system.url=${upt.central.database.url.prefix}://${upt.central.database.server}:${upt.central.database.port}
upt.central.database.url=${upt.central.database.system.url}/${upt.central.database.name}
upt.central.database.driver.class=org.gjt.mm.mysql.Driver
upt.central.database.encrypt.enabled=YES
upt.central.database.dialect=org.hibernate.dialect.MySQLDialect

upt.central.ldaps.url=ldaps://ncids4a.nci.nih.gov:636
upt.central.ldaps.basedn=ou=nci,o=nih
upt.central.ldaps.userid.label=cn
upt.central.ldap.url=ldap://ncicbds-dev.nci.nih.gov:389
upt.central.ldap.searchable.base=ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.userid.label=uid
upt.central.ldap.admin.user.name=uid=csmAdmin,ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.admin.user.password=CSM@admin!

###################################
#  upt backwards compatible multiple database configuration #
###################################
upt.31.database.re-create=true
#upt.31.database.drop-schema=true
upt.31.authentication.type=db

upt.31.database.type=mysql
upt.31.database.server=localhost
upt.31.database.version=5.0.27
upt.31.database.port=3306
upt.31.database.name=uptdb31
upt.31.database.system.user=root
upt.31.database.system.password=
upt.31.database.user=mysql
upt.31.database.password=
upt.31.database.url.prefix=jdbc:mysql
upt.31.database.system.url=${upt.31.database.url.prefix}://${upt.31.database.server}:${upt.31.database.port}
upt.31.database.url=${upt.31.database.system.url}/${upt.31.database.name}
upt.31.database.driver.class=org.gjt.mm.mysql.Driver
upt.31.database.encrypt.enabled=NO
upt.31.database.dialect=org.hibernate.dialect.MySQLDialect

upt.31.ldaps.url=ldaps://ncids4a.nci.nih.gov:636
upt.31.ldaps.basedn=ou=nci,o=nih
upt.31.ldaps.userid.label=cn
upt.31.ldap.url=ldap://ncicbds-dev.nci.nih.gov:389
upt.31.ldap.searchable.base=ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.31.ldap.userid.label=uid
upt.31.ldap.admin.user.name=uid=csmAdmin,ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.31.ldap.admin.user.password=CSM@admin!
#---------------------------------#
upt.32.database.re-create=true
#upt.32.database.drop-schema=true
upt.32.authentication.type=db

upt.32.database.type=mysql
upt.32.database.server=localhost
upt.32.database.version=5.0.27
upt.32.database.port=3306
upt.32.database.name=uptdb32
upt.32.database.system.user=root
upt.32.database.system.password=
upt.32.database.user=mysql
upt.32.database.password=
upt.32.database.system.url=jdbc:mysql://${upt.32.database.server}:${upt.32.database.port}
upt.32.database.url=${upt.32.database.system.url}/${upt.32.database.name}
upt.32.database.driver.class=org.gjt.mm.mysql.Driver
upt.32.database.encrypt.enabled=YES
upt.32.database.dialect=org.hibernate.dialect.MySQLDialect

upt.32.ldaps.url=
upt.32.ldaps.basedn= 
upt.32.ldaps.userid.label=
upt.32.ldap.url=
upt.32.ldap.searchable.base=
upt.32.ldap.userid.label=
upt.32.ldap.admin.user.name=
upt.32.ldap.admin.user.password=
#--------------------------------#
upt.40.database.re-create=true
#upt.40.database.drop-schema=true
upt.40.authentication.type=db

upt.40.database.type=${database.type}
upt.40.database.server=localhost
upt.40.database.version=5.0.27
upt.40.database.port=3306
upt.40.database.name=uptdb40
upt.40.database.system.user=root
upt.40.database.system.password=
upt.40.database.user=mysql
upt.40.database.password=
upt.40.database.system.url=jdbc:mysql://${upt.40.database.server}:${upt.40.database.port}
upt.40.database.url=${upt.40.database.system.url}/${upt.40.database.name}
upt.40.database.driver.class=org.gjt.mm.mysql.Driver
upt.40.database.encrypt.enabled=YES
upt.40.database.dialect=org.hibernate.dialect.MySQLDialect

upt.40.ldaps.url=
upt.40.ldaps.basedn= 
upt.40.ldaps.userid.label=
upt.40.ldap.url=
upt.40.ldap.searchable.base=
upt.40.ldap.userid.label=
upt.40.ldap.admin.user.name=
upt.40.ldap.admin.user.password=
#---------------------------------#
upt.41.database.re-create=true
#upt.41.database.drop-schema=true
upt.41.authentication.type=db

upt.41.database.type=${database.type}
upt.41.database.server=localhost
upt.41.database.version=5.0.27
upt.41.database.port=3306
upt.41.database.name=uptdb41
upt.41.database.system.user=root
upt.41.database.system.password=
upt.41.database.user=mysql
upt.41.database.password=
upt.41.database.system.url=jdbc:mysql://${upt.41.database.server}:${upt.41.database.port}
upt.41.database.url=${upt.41.database.system.url}/${upt.41.database.name}
upt.41.database.driver.class=org.gjt.mm.mysql.Driver
upt.41.database.encrypt.enabled=YES
upt.41.database.dialect=org.hibernate.dialect.MySQLDialect

upt.41.ldaps.url=
upt.41.ldaps.basedn= 
upt.41.ldaps.userid.label=
upt.41.ldap.url=
upt.41.ldap.searchable.base=
upt.41.ldap.userid.label=
upt.41.ldap.admin.user.name=
upt.41.ldap.admin.user.password=
#------------------------------------#
upt.42.database.re-create=true
#upt.42.database.drop-schema=true
upt.42.authentication.type=db

upt.42.database.type=${database.type}
upt.42.database.server=localhost
upt.42.database.version=5.0.27
upt.42.database.port=3306
upt.42.database.system.user=root
upt.42.database.system.password=
upt.42.database.name=uptdb42
upt.42.database.user=mysql
upt.42.database.password=
upt.42.database.system.url=jdbc:mysql://${upt.42.database.server}:${upt.42.database.port}
upt.42.database.url=${upt.42.database.system.url}/${upt.42.database.name}
upt.42.database.driver.class=org.gjt.mm.mysql.Driver
upt.42.database.encrypt.enabled=YES
upt.42.database.dialect=org.hibernate.dialect.MySQLDialect

upt.42.ldaps.url=
upt.42.ldaps.basedn= 
upt.42.ldaps.userid.label=
upt.42.ldap.url=
upt.42.ldap.searchable.base=
upt.42.ldap.userid.label=
upt.42.ldap.admin.user.name=
upt.42.ldap.admin.user.password=
########################
###  JBOSS SETTINGS  ###
########################
# jboss.home will be generated as ${application.base.path}/${jboss.relateive.path}
jboss.relative.path=${jboss.binaries.relative.dir}
jboss.server.hostname=ptest.garvan.unsw.edu.au
jboss.server.name=default
jboss.web.user=pwbc_admin
jboss.web.password=

# If you want to use JBboss NCICB Standard port configurations, uncommment the lines below and comment out all the ports.  Be sure to pick a correct prot configuration (see  https://wiki.nci.nih.gov/x/0gqy)
exclude.jboss-login-config=true
#jboss.ncicb-standard.port-config=true
#jboss.server.ports.name=config39080
jboss.server.ports.name=bda-ports

jboss.server.jndi.port=46200
jboss.server.port=46210
jboss.cobraorb.port=46350
jboss.ejbinvoker.port=46150
jboss.hajndi.port=46160
jboss.hajrmi.port=46260
jboss.jms.port=46170
jboss.jmx-rmi.port=46290
jboss.messaging.port=46330
jboss.pooledha.port=46270
jboss.remoting.port=46320
jboss.server.bind.port=0
jboss.server.rmi.port=46230
jboss.service.rmiobject.port=46240
jboss.snmp.port=46310
jboss.snmp-trapd.port=46300
jboss.web.service.port=46250
jboss.server.redirect.port=46298

jboss.ssl.enable=false

#@Resolve this property
jboss.external.http.host=

##################################
### Filesystem Data Repository ###
##################################
# If you need to store files on the file system add properties to this section otherwise delete it
#@Resolve this property
fs-data.base.dir=

##############
### TOMCAT ###
##############
# tomcat.home will be generated as ${application.base.path}/${tomcat.relateive.path}
exclude.tomcat.backup=true
tomcat.ssl.enable=false
exclude.tomcat=true

###############
###  Log4J  ###
###############
log4j.maxFileSize=100MB
log4j.maxDays=7
log4j.level=WARN

###################################
#  PRE-POST VALIDATION PROPERTIES #
###################################
validation.pre.port.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.server.port},${jboss.web.service.port}
validation.post.http.list=${jboss.server.port}
validation.post.socket.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.web.service.port}

###################################
#  upt backwards compatible multiple installation configuration #
###################################
upt.central.config=false
upt.31.installed=true
upt.32.installed=true
upt.40.installed=true
upt.41.installed=true
upt.42.installed=true

User and Application Relationship

UPT can control what applications a user has access to. The very 1st application registered in UPT is csmupt which is UPT itself:

mysql> select * from csm_application;
+----------------+---------------------------+---------------------------------+-
| APPLICATION_ID | APPLICATION_NAME          | APPLICATION_DESCRIPTION         |
+----------------+---------------------------+---------------------------------+-
|              1 | csmupt                    | CSM UPT Super Admin Application |
|              2 | sampleHostApplicationName | Application Description         |
|              3 | sample31                  | Application Description         |

When a new user created, it's added in csm_user table without any association.

mysql> select * from csm_user where login_name='derlin';
+---------+------------+---------------+------------+-------
| USER_ID | LOGIN_NAME | MIGRATED_FLAG | FIRST_NAME | LAST_N
+---------+------------+---------------+------------+-------
|       3 | derlin     |             0 | Derrick    | Lin
+---------+------------+---------------+------------+-------

In UPT, each regiestered application is an protection element, that is in table:

mysql> select * from csm_protection_element where protection_element_name like '%csmupt%';
+-----------------------+-------------------------+----------------------------------------------------+-----------+
| PROTECTION_ELEMENT_ID | PROTECTION_ELEMENT_NAME | PROTECTION_ELEMENT_DESCRIPTION                     | OBJECT_ID |
+-----------------------+-------------------------+----------------------------------------------------+-----------+
|                     1 | csmupt                  | CSM UPT Super Admin Application Protection Element | csmupt    |
+-----------------------+-------------------------+----------------------------------------------------+-----------+

After a user is assigned to an application, essentially, it's a user, protection element many-to-many relationship defined in table:

mysql> select * from csm_user_pe;
+----------------------------+-----------------------+---------+
| USER_PROTECTION_ELEMENT_ID | PROTECTION_ELEMENT_ID | USER_ID |
+----------------------------+-----------------------+---------+
|                          9 |                     1 |       1 |
|                          2 |                     2 |       1 |
|                          3 |                     3 |       1 |
|                          4 |                     4 |       1 |
|                          5 |                     5 |       1 |
|                          6 |                     6 |       1 |
|                          7 |                     7 |       1 |
|                          8 |                     1 |       3 |<<<< derlin assigned to csmupt
+----------------------------+-----------------------+---------+

Thursday, March 11, 2010

ptest (Solaris 5.10) Changes Tracking Log

User & Group Change @ 11/02/2010

New account pwbc_dba has been added for DB system administrative purpose, new group dbadmin is also added so other user login can participate DB administration without knowing pwbc_dba account.

groupadd dbadmin
useradd -m -g dbadmin -G root,it,other pwbc_dba
passwd pwbc_dba
usermod –s /bin/bash pwbc_dba (to use .profile to define env)

The password is the same as current mysql account. All database administrative tasks such as installation, upgrade etc should be done under pwbc_dba.

15/03/2010 pwbc_dba has been replaced by user mysql that is required by MySQL installation.

System $PATH Change @ 11/03/2010

New export has been added into /etc/profile so gtar and make are available system-wide.

LD_LIBRARY_PATH is added to address MySQL compilation error due to libstdc++.so.6 not found.

export PATH="$PATH:/opt/csw/bin:/usr/ccs/bin"
export LD_LIBRARY_PATH="/usr/local/lib:/usr/sfw/lib"

Change comment has been added on the source file. Future $PATH change will be recorded by comment and will not be added in here.

Change root SHELL to BASH

Justification: Did you know: root shell in Solaris 10

cat /etc/passwd

root:x:0:0:Super-User:/:/usr/bin/bash
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
derlin:x:103:101:Derrick Lin PTest Zone:/home/derlin:/bin/bash
mysql:x:105:103:MySQL user PTest Zone:/home/mysql:/bin/bash

Install MySQL 5.0.27 on Solaris 5.10

Compilation from Source (GCC 3.4.6)

Get the Source

A distribution mysql-5.0.27.tar.gz (20 Oct 2006, 24.7M) was downloaded from MySQL website and stored in /usr/local/software.

Pre-Compile Config

All default except install location:

./configure --prefix=/usr/local/mysql
configure:22606: WARNING: term.h: present but cannot be compiled
configure:22608: WARNING: term.h: check for missing prerequisite headers?
configure:22610: WARNING: term.h: see the Autoconf documentation
configure:22612: WARNING: term.h: section "Present But Cannot Be Compiled"
configure:22614: WARNING: term.h: proceeding with the preprocessor's result
configure:22616: WARNING: term.h: in the future, the compiler will take precedence
configure:22628: checking for term.h
.
.
configure:32423: WARNING: sys/ptem.h: present but cannot be compiled
configure:32425: WARNING: sys/ptem.h: check for missing prerequisite headers?
configure:32427: WARNING: sys/ptem.h: see the Autoconf documentation
configure:32429: WARNING: sys/ptem.h: section "Present But Cannot Be Compiled"
configure:32431: WARNING: sys/ptem.h: proceeding with the preprocessor's result
configure:32433: WARNING: sys/ptem.h: in the future, the compiler will take precedence
configure:32445: checking for sys/ptem.h 

Check configure.log found:

configure:23024: checking term.h usability
configure:23036: gcc -c     conftest.c >&5
In file included from conftest.c:102:
/usr/include/term.h:1034: error: syntax error before "bool"
/usr/include/term.h:1060: error: syntax error before "SGTTY"
/usr/include/term.h:1081: error: syntax error before "sgr_mode"
/usr/include/term.h:1082: error: syntax error before "sgr_faked"
/usr/include/term.h:1092: error: syntax error before "funckeystarter"
/usr/include/term.h:1094: error: syntax error before "_fl_rawmode"
/usr/include/term.h:1101: error: syntax error before "_input_queue"
/usr/include/term.h:1108: error: syntax error before '*' token
/usr/include/term.h:1111: error: syntax error before "bit_vector"
/usr/include/term.h:1115: error: syntax error before "check_turn_off"
/usr/include/term.h:1116: error: syntax error before "non_faked_mode"
/usr/include/term.h:1117: error: syntax error before "_cur_pair"
/usr/include/term.h:1118: error: syntax error before '*' token
/usr/include/term.h:1120: error: syntax error before '}' token
/usr/include/term.h:1207: error: syntax error before "int"
/usr/include/term.h:1207: error: `vidputs' declared as function returning a function
/usr/include/term.h:1207: error: syntax error before ')' token
configure:23042: $? = 1
configure: failed program was:
| /* confdefs.h.  */
configure:34054: checking sys/ptem.h usability
configure:34066: gcc -c -O3 -DDBUG_OFF    -DHAVE_RWLOCK_T  conftest.c >&5
In file included from conftest.c:169:
/usr/include/sys/ptem.h:25: error: syntax error before "mblk_t"
/usr/include/sys/ptem.h:29: error: syntax error before '}' token
configure:34072: $? = 1
configure: failed program was:
| /* confdefs.h.  */

It seems that two files could not be compiled due to syntax errors. Could be GCC version problem. The warning does not affect the compilation.

Compilation Error

./gen_lex_hash > lex_hash.h-t
ld.so.1: gen_lex_hash: fatal: libstdc++.so.6: open failed: No such file or directory
/bin/bash: line 1: 5234 Killed ./gen_lex_hash >lex_hash.h-t
make[1]: *** [lex_hash.h] Error 137

Library libstdc++ is not on path. Need adding LD_LIBRARY_PATH.

Direct Installation from Binary (Standard & max)

Didn't adopt the installation from source and install from binary directly.

Get the Distributions

Two files: mysql-standard-5.0.27-solaris10-x86_64.pkg & mysql-max-5.0.27-solaris10-x86_64.pkg.

Installation Steps

Installing MySQL 5.0 on Solaris 10

Post Installation Config

Modify mysql @ /usr/init.d/

basedir=/opt/mysql/mysql
#datadir=/var/lib/mysql
datadir=/data

Create my.cnf @ /etc/

[mysqld]
basedir=/opt/mysql/mysql
datadir=/data
lower_case_table_names=1

Remove Most Symlinks About MySQL

The following directories are found to contains symlinks to MySQL:

rm -rf /usr/sbin/mysql.symlinks.2010-03-12
rm -rf /usr/local/mysql.2010-03-12
rm -rf /usr/include/mysql
rm -rf /usr/bin/mysql.symlinks

rm /usr/share/man/man1/msql2mysql.1
rm /usr/share/man/man1/mysql_config.1
rm /usr/share/man/man1/mysql_explain_log.1
rm /usr/share/man/man1/mysql_fix_privilege_tables.1
rm /usr/share/man/man1/mysql_upgrade.1
rm /usr/share/man/man1/mysql_zap.1
rm /usr/share/man/man1/mysql.1
rm /usr/share/man/man1/mysql.server.1
rm /usr/share/man/man1/mysqlaccess.1
rm /usr/share/man/man1/mysqladmin.1
rm /usr/share/man/man1/mysqlbinlog.1
rm /usr/share/man/man1/mysqlcheck.1
rm /usr/share/man/man1/mysqld_multi.1
rm /usr/share/man/man1/mysqld_safe.1
rm /usr/share/man/man1/mysqld.1
rm /usr/share/man/man1/mysqldump.1
rm /usr/share/man/man1/mysqlhotcopy.1
rm /usr/share/man/man1/mysqlimport.1
rm /usr/share/man/man1/mysqlman.1
rm /usr/share/man/man1/mysqlmanager.1
rm /usr/share/man/man1/mysqlshow.1
rm /usr/share/man/man1/safe_mysqld.1

rm /usr/sfw/include/mysql

rm /usr/info/mysql.info
rm /usr/lib/libmysqlclient_r.a
rm /usr/lib/libmysqlclient.a

mysqld_safe Change Due to Symlink Removal

All /usr/local/mysql strings are replaced by /opt/mysql/mysql. Now the MySQL server can be started by just typing:

# mysqld_safe

Monday, February 8, 2010

Win7 Installation Note on ThinkPad X200

Partition Size List

  • 30900 --> 30GB - OS
  • 102500 -> 100GB - VM
  • 5155 --> 5GB
  • 10200 --> 10GB

Relocate Users Directory

  • Create partitions (if haven't been done)
  • Enable Administrator
  • Do NOT logoff, copy Users directory into designated location
  • Ignore any notification (file is being used etc)
  • Open regedit, under ProfileList, change all relevant drive letter to designated one
  • Restart OS and login as Administrator
  • New user profile will be created in new designated location for Administrator

Install Drivers

  • Connect to wireless Internet
  • Download & Install ThinkVantage System Update
  • Install everything else within System Update

Saturday, January 9, 2010

RivaTuner + NV Trickies

RivaTuner is unable to control the FAN (on 8800 Ultra) in low-level System Tweak.

May need to enable the feature for ForceWare in regedit. Detail

RivaTuner is unable to display Fan Duty Cycle or Reference Fan Duty Cycle always 100%

To enable Fan Duty Cycle, need to enable a sensor plugin. Detail

Wednesday, December 9, 2009

JJM AU DW Tricky Trick

In DW_MATERIAL_MASTER a material may has an entry for JMNZ but not JMAU.

If there is a JMAU transaction for this material, when extracting the fact data against the dimension (material hierarchy), this transaction maybe dropped from the fact table since it could not find the correspond entry in material hierarchy.

For a JMNZ transaction, it might be labeled as UNALLOCATED JJMAU as its EMPLOYEE_NAME_DISPLAY.

Such transaction may have gone into JMAU (appears in JJM Affiliates) cube instead of JMNZ cube.

Saturday, December 5, 2009

C8 FAQ

Cognos 8.3, when trying to open a project in Framework Manager, it requires authentication. It gives "CAM-AAA-0064 - The function 'CMQueryCognosSecurityJNI' failed." error after entering user/password.

       Server CM-SYS-5192 An error occurred with Content Manager.   error cmStoreNotAvailable  CM-SYS-5003 Content Manager is unable to access the content store. Verify your database connection parameters, and then contact your database administrator for assistance.   1 Listener refused the connection with the following error: ORA-12518, TNS:listener could not hand off client connection The Connection descriptor used by the client was: NCSAPMEDCRD1:1525:DWD        

Investigating

Cognos 8.3, After log on to portal and click "Australia" tab, the page gave 5 "CPS-PAG-4801 - Operation failed in the consumer component." error.


com.cognos.cps.services.wsrp.v1.types.OperationFailedFaultPF-BRG-6141 The operation did not run.PF-BRG-6143 The request encountered an error while processing XML content.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6140 Not able to run the request.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6143 The request encountered an error while processing XML content. at com.cognos.portal.fragment.wsrp.FragmentWSRPBridge.getMarkup(FragmentWSRPBridge.java:219) at com.cognos.portal.fragment.service.WSRPService.handleSOAPRequest(WSRPService.java:436) at com.cognos.portal.fragment.service.WSRPService.invokeImpl(WSRPService.java:329) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.p2plb.clerver.LoadBalanceHandler.rawForwardToSelf(LoadBalanceHandler.java:648) at com.cognos.p2plb.clerver.LoadBalanceHandler.forwardToSelf(LoadBalanceHandler.java:614) at com.cognos.p2plb.clerver.LoadBalanceHandler.invokeImpl(LoadBalanceHandler.java:382) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.engine.ServiceLookupHandler.invokeImpl(ServiceLookupHandler.java:116) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.performance.PerformanceIndicationHandler.invokeImpl(PerformanceIndicationHandler.java:143) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.impl.PogoEngineImpl.service(PogoEngineImpl.java:133) at com.cognos.pogo.transport.PogoServlet.processRequest(PogoServlet.java:249) at com.cognos.pogo.transport.PogoServlet.doPost(PogoServlet.java:561) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.cognos.pogo.isolation.ServletWrapper.service(ServletWrapper.java:291) ...

com.cognos.cps.services.wsrp.v1.types.OperationFailedFaultPF-BRG-6141 The operation did not run.PF-BRG-6143 The request encountered an error while processing XML content.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6140 Not able to run the request.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6143 The request encountered an error while processing XML content. at com.cognos.portal.fragment.wsrp.FragmentWSRPBridge.getMarkup(FragmentWSRPBridge.java:219) at com.cognos.portal.fragment.service.WSRPService.handleSOAPRequest(WSRPService.java:436) at com.cognos.portal.fragment.service.WSRPService.invokeImpl(WSRPService.java:329) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.p2plb.clerver.LoadBalanceHandler.rawForwardToSelf(LoadBalanceHandler.java:648) at com.cognos.p2plb.clerver.LoadBalanceHandler.forwardToSelf(LoadBalanceHandler.java:614) at com.cognos.p2plb.clerver.LoadBalanceHandler.invokeImpl(LoadBalanceHandler.java:382) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.engine.ServiceLookupHandler.invokeImpl(ServiceLookupHandler.java:116) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) ...

com.cognos.cps.services.wsrp.v1.types.OperationFailedFaultPF-BRG-6141 The operation did not run.PF-BRG-6143 The request encountered an error while processing XML content.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6140 Not able to run the request.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6143 The request encountered an error while processing XML content. at com.cognos.portal.fragment.wsrp.FragmentWSRPBridge.getMarkup(FragmentWSRPBridge.java:219) at com.cognos.portal.fragment.service.WSRPService.handleSOAPRequest(WSRPService.java:436) at com.cognos.portal.fragment.service.WSRPService.invokeImpl(WSRPService.java:329) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.p2plb.clerver.LoadBalanceHandler.rawForwardToSelf(LoadBalanceHandler.java:648) at com.cognos.p2plb.clerver.LoadBalanceHandler.forwardToSelf(LoadBalanceHandler.java:614) at com.cognos.p2plb.clerver.LoadBalanceHandler.invokeImpl(LoadBalanceHandler.java:382) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.engine.ServiceLookupHandler.invokeImpl(ServiceLookupHandler.java:116) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.performance.PerformanceIndicationHandler.invokeImpl(PerformanceIndicationHandler.java:143) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.impl.PogoEngineImpl.service(PogoEngineImpl.java:133) at com.cognos.pogo.transport.PogoServlet.processRequest(PogoServlet.java:249) at com.cognos.pogo.transport.PogoServlet.doPost(PogoServlet.java:561) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.cognos.pogo.isolation.ServletWrapper.service(ServletWrapper.java:291) ...

com.cognos.cps.services.wsrp.v1.types.OperationFailedFaultPF-BRG-6141 The operation did not run.PF-BRG-6143 The request encountered an error while processing XML content.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6140 Not able to run the request.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6143 The request encountered an error while processing XML content. at com.cognos.portal.fragment.wsrp.FragmentWSRPBridge.getMarkup(FragmentWSRPBridge.java:219) at com.cognos.portal.fragment.service.WSRPService.handleSOAPRequest(WSRPService.java:436) ...

com.cognos.cps.services.wsrp.v1.types.OperationFailedFaultPF-BRG-6141 The operation did not run.PF-BRG-6143 The request encountered an error while processing XML content.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6140 Not able to run the request.
com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6143 The request encountered an error while processing XML content. at com.cognos.portal.fragment.wsrp.FragmentWSRPBridge.getMarkup(FragmentWSRPBridge.java:219) at com.cognos.portal.fragment.service.WSRPService.handleSOAPRequest(WSRPService.java:436) at com.cognos.portal.fragment.service.WSRPService.invokeImpl(WSRPService.java:329) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.p2plb.clerver.LoadBalanceHandler.rawForwardToSelf(LoadBalanceHandler.java:648) at com.cognos.p2plb.clerver.LoadBalanceHandler.forwardToSelf(LoadBalanceHandler.java:614) at com.cognos.p2plb.clerver.LoadBalanceHandler.invokeImpl(LoadBalanceHandler.java:382) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.engine.ServiceLookupHandler.invokeImpl(ServiceLookupHandler.java:116) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.performance.PerformanceIndicationHandler.invokeImpl(PerformanceIndicationHandler.java:143) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.impl.PogoEngineImpl.service(PogoEngineImpl.java:133) at com.cognos.pogo.transport.PogoServlet.processRequest(PogoServlet.java:249) at com.cognos.pogo.transport.PogoServlet.doPost(PogoServlet.java:561) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.cognos.pogo.isolation.ServletWrapper.service(ServletWrapper.java:291) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Unknown Source) com.cognos.portal.fragment.wsrp.BridgeException: PF-BRG-6140 Not able to run the request. at com.cognos.portal.fragment.wsrp.Fragment.execute(Fragment.java:169) at com.cognos.portal.fragment.wsrp.FragmentWSRPBridge.getMarkup(FragmentWSRPBridge.java:161) at com.cognos.portal.fragment.service.WSRPService.handleSOAPRequest(WSRPService.java:436) at com.cognos.portal.fragment.service.WSRPService.invokeImpl(WSRPService.java:329) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.p2plb.clerver.LoadBalanceHandler.rawForwardToSelf(LoadBalanceHandler.java:648) at com.cognos.p2plb.clerver.LoadBalanceHandler.forwardToSelf(LoadBalanceHandler.java:614) at com.cognos.p2plb.clerver.LoadBalanceHandler.invokeImpl(LoadBalanceHandler.java:382) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.engine.ServiceLookupHandler.invokeImpl(ServiceLookupHandler.java:116) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.logic.ChainHandler.invokeImpl(ChainHandler.java:73) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.handlers.performance.PerformanceIndicationHandler.invokeImpl(PerformanceIndicationHandler.java:143) at com.cognos.pogo.pdk.BasicHandler.invoke(BasicHandler.java:252) at com.cognos.pogo.impl.PogoEngineImpl.service(PogoEngineImpl.java:133) at com.cognos.pogo.transport.PogoServlet.processRequest(PogoServlet.java:249) at com.cognos.pogo.transport.PogoServlet.doPost(PogoServlet.java:561) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.cognos.pogo.isolation.ServletWrapper.service(ServletWrapper.java:291) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Unknown Source) com.cognos.portal.fragment.server.DashboardException: PF-SRV-6116 Unable to process the document, target is not valid or the target was not received. at com.cognos.portal.fragment.service.ServiceEnvironment.getLocalTargetStream(ServiceEnvironment.java:253) at com.cognos.portal.fragment.Environment.getTargetStream(Environment.java:581) at com.cognos.portal.fragment.service.ServiceEnvironment.createValidationDocument(ServiceEnvironment.java:658) ...

Possibly, the DW server and C8 server were reboot/shutdown in the wrong sequence. It may cause C8 server lose the connection or hold a stall connection to DW. Contact DBA.

Cognos 8.3, in Australia portal, Executive section, a yellow box shows up "PF-VAL-6171 Error retrieving metadata for the target fragment.".

Permission for Executive section has not been set properly.

Cognos 8.3, cube build was failed due to the following error(s).

Thu 10 Dec 2009 12:36:11 AM 2 00416C17 (TR2317) The level 'Regional Material Long Code' is designated as unique.  Source value '2960-B-9565' was used in an attempt to create a category in the path ( Regional Material,M00295,018175,028175,038175,040757,2960-B-9565 ).  '2960-B-9565' already exists in level 'Regional Material Long Code' in the path ( Regional Material,( Blank ),( Blank )~24548,( Blank )~24549,( Blank )~24550,04,2960-B-9565 ). [->OK]
Thu 10 Dec 2009 12:36:35 AM 2 00000000 (TR2318) Transformer has detected 424 attempts to create a category in more than one path. Refer to the online help for a detailed explanation of level uniqueness. [->OK]
Thu 10 Dec 2009 12:36:35 AM 4 00000000 End processing 50611 records from data source 'Material (with transaction)'.
Thu 10 Dec 2009 12:36:35 AM 4 00000000 Timing, READ DATA SOURCE,00:00:25
Thu 10 Dec 2009 12:36:35 AM 4 00000000 End cube update.
Thu 10 Dec 2009 12:36:35 AM 4 00000000 Timing, TOTAL TIME (CREATE CUBE),00:00:38
Thu 10 Dec 2009 12:36:35 AM 2 00000000 (TR0136) A uniqueness violation was detected.  The process has been aborted. [->OK]

Investigating

Wednesday, September 9, 2009

Seam + Hibernate + MS SQL

Seam 2.1, use Hibernate as JPA provider with MS SQL 2005, SQL driver complaints syntax error

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'user'.
 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
 at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
 at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
 at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)

"User" is keyword in SQL Server, so need to escape it in @Table definition. Also the Entity which names a property by using "user" may causes problem too.

Seam 2.1, use Hibernate as JPA provider with MS SQL 2005 and its JDBC driver 2.0. A EJB remote interface is implemented for a Seam EntityHome. After a remote client (A plain Java main class) obtains the EntityHome by JNDI look up and try to get an instance of the entity via getInstance(), it causes ClassCastException.

@Name("measurementDataHome")
@Stateful
public class MeasurementDataHome extends EntityHome implements MeasurementData {
......
}
@Remote
public interface MeasurementData {
 
 public void setId(Object Id);
 
 public Object getId();
 
 public void setInstance(MeasurementDataEntity instance);
 
 public MeasurementDataEntity getInstance();
 
 public boolean isManaged();
 
 public String remove();
}
Exception in thread "main" java.lang.ClassCastException: java.lang.Long
 at $Proxy2.getInstance(Unknown Source)
 at Main.main(Main.java:24)

The cause is unknown. But the fix is add Override getInstance() inside EntityHome implementation:

    @Override 
    public MeasurementDataEntity getInstance() {
     return super.getInstance();
    }

Seam 2.1, use Hibernate as JPA provider with MS SQL 2005 and its JDBC driver 2.0. When User entity is trying to load a list of its associated MeasurementData entities, it throws exceptions.

javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.unsw.bsl.dss.measurement.MeasurementData.valueNumeric
 at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
 at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
 at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
 at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
 at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
 at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

The problems was that the value in the database was NULL so when Hibernate try to set the value NULL from the DB to the set method which accept a primitive value it throw an error. So in Entity, change primitive type to Object type so it accepts null.

Seam 2.1, use Hibernate as JPA provider with MS SQL 2005 and its JDBC driver 2.0. Association between MeasurementData and User is Lazy fetching. When trying to get list of measurementData which associates with a user, it throws LIE.

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.unsw.bsl.dss.user.User.measurementData, no session or session was closed
 at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:380)
 at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
 at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:119)
 at org.hibernate.collection.PersistentBag.size(PersistentBag.java:248)
 at DomainTest.testReadUser(DomainTest.java:77)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

Using EntityHome for entities in long-running contexts

How to avoid LazyInitializationException

Seam 2.1, use Hibernate as JPA provider with MS SQL 2005 and its JDBC driver 2.0. Hibernate generates wrong SQL, thus causes MS SQL driver throws exception. For example, ClinicalData and Patient are two entities associate with, the generated SQL mistakes clinicalData and patient (property field name) as column names.

Hibernate: 
    select
        measuremen0_.Id as Id4_0_,
        measuremen0_.addDateTime as addDateT2_4_0_,
        measuremen0_.clinicalData as clinical3_4_0_, <--- Wrong
        measuremen0_.patient as patient4_0_, <--- Wrong
        measuremen0_.valueNumeric as valueNum5_4_0_,
        measuremen0_.voidedDateTime as voidedDa6_4_0_ 
    from
        UserClinicalData measuremen0_ 
    where
        measuremen0_.Id=?
ERROR [org.hibernate.util.JDBCExceptionReporter] Invalid column name 'clinicalData'.
Hibernate: 
    select
        measuremen0_.UserId as UserId3_,
        measuremen0_.Id as Id3_,
        measuremen0_.Id as Id4_2_,
        measuremen0_.AddDateTime as AddDateT2_4_2_,
        measuremen0_.ClinicalDataId as Clinical6_4_2_, <--- After fixed
        measuremen0_.UserId as UserId4_2_, <--- After fixed
        measuremen0_.ValueNumeric as ValueNum3_4_2_,
        measuremen0_.VoidedDateTime as VoidedDa4_4_2_,
        clinicalda1_.Id as Id5_0_,
        clinicalda1_.ClinicalDataCodeId as Clinical3_5_0_,
        clinicalda1_.Type as Type5_0_,
        codedictio2_.Id as Id1_1_,
        codedictio2_.CodeDictionaryCode as CodeDict2_1_1_ 
    from
        UserClinicalData measuremen0_ 
    left outer join
        ClinicalData clinicalda1_ 
            on measuremen0_.ClinicalDataId=clinicalda1_.Id 
    left outer join
        CodeDictionary codedictio2_ 
            on clinicalda1_.ClinicalDataCodeId=codedictio2_.Id 
    where
        measuremen0_.UserId=?

The problem occurred when mapping notations i.e. @ManyToOne applied in getter/setter methods. The problem disappear after moving all notations to property field level.

Wednesday, August 26, 2009

MS Excel vlookup Demo

=VLOOKUP(A2, 's1'!$A$2:$B$25, 2,)

Assume this is vlookup in sheet s2. A2 is the exact value searched for in the first column of the reference array.'s1'!$A$2:$B$25 is the reference array, which must include at least two columns (because have to include A2). $ in the array range is absolute, ensures that all vlookup look up from the EXACT same reference array. 2 is is the column index in the array that contains the value to be returned. In other word, vlookup finds the match A2 in the array in sheet s1 and return the value in column 2.

Tuesday, July 28, 2009

Seam 2 + MySQL 5 + jBPM 3

Seam (jboss-seam-2.1.2) could not start jBPM (jbpm-3.2.6.SP1) causes application deployment fails

02:08:48,718 ERROR [jbpm]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.jbpm.job.Job.id

jboss-seam-2.1.2 comes with an older version of jbpm-jpdl.jar. Copy the newer one from jbpm-3.2.6.SP1 to replace the one in seam.

Seam (jboss-seam-2.1.2) example Hotel Booking, it causes exceptions during undeployment during JBoss shutdown

17:35:36,421 WARN  [Component] Exception calling stateful session bean default @Remove method: hotelBooking
org.jboss.ejb3.common.registrar.spi.NotBoundException: Requested value bound at name "jboss.j2ee:ear=seam.example.hotel-ear.ear,jar=seam.example.hotel-ejb.jar,name=HotelBookingAction,service=EJB3" is not bound.
17:35:36,437 WARN  [Component] Exception calling stateful session bean default @Remove method: bookingList
org.jboss.ejb3.common.registrar.spi.NotBoundException: Requested value bound at name "jboss.j2ee:ear=seam.example.hotel-ear.ear,jar=seam.example.hotel-ejb.jar,name=BookingListAction,service=EJB3" is not bound.
17:35:36,437 WARN  [Component] Exception calling stateful session bean default @Remove method: hotelSearch
org.jboss.ejb3.common.registrar.spi.NotBoundException: Requested value bound at name "jboss.j2ee:ear=seam.example.hotel-ear.ear,jar=seam.example.hotel-ejb.jar,name=HotelSearchingAction,service=EJB3" is not bound.

Only the Stateful session beans like hotelSearch cause the exception. Inside the example there are jboss.xml which contains session bean registrations. Places this file to seam.example.hotel-ear\EarContent\META-INF.

Seam (jboss-seam-2.1.2) jBPM file for page flow could not be parsed

Caused by: org.jbpm.jpdl.JpdlException: [[ERROR] Unable to parse process definition pageflow.jpdl.xml]
 at org.jboss.seam.bpm.Jbpm.getPageflowDefinitionFromResource(Jbpm.java:169)
 at org.jboss.seam.bpm.Jbpm.installPageflowDefinitions(Jbpm.java:278)

Check if the process definition contains any sub process. If it does, in components.xml, all sub processes MUST be defined before the main process. For example: if cheat.jpdl.xml is a sub process of pageflow.jpd.xml, the follow one will cause the trouble


    pageflow.jpdl.xml
    cheat.jpdl.xml

And this one is correct.


    cheat.jpdl.xml
    pageflow.jpdl.xml

Saturday, July 25, 2009

Eclipse + Seam + TestNG Tricky

TestNG gives "Connection Refused" while running on Eclipse

org.testng.TestNGException:
Cannot establish connection: 127.0.0.1:4359
at org.testng.remote.strprotocol.StringMessageSenderHelper.connect(StringMessageSenderHelper.java:93)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:57)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.testng.remote.strprotocol.StringMessageSenderHelper.connect(StringMessageSenderHelper.java:56)
... 2 more

While running TestNG in Eclipse there will always be 2 VMs involved: the VM of Eclipse and the VM running the tests. In order to update the plugin UI the 2 VMs are communicating over a port using a very simple string based protocol. The exception you are seeing is telling that the 2 VMs are not able to talk to each other. This is a weird exception that would translate into: there was impossible to open a communication port between the 2 VMs involved. Off hand, the cause may be: a bug in Eclipse/plugin or maybe a firewall/antivirus that blocks this.

TestNG/Seam reports ClassNotFoundException issues

[Parser] Running:
 D:\showman\My Documents\workspace_3.5\seam.examples.helloworld-test\temp-testng-customsuite.xml
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Described: name=BeanDeployer state=PreInstall
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Described: name=ServiceDeployer state=PreInstall
java.lang.RuntimeException: java.lang.reflect.UndeclaredThrowableException
Caused by: java.lang.ClassNotFoundException: [Ljava.lang.Class;
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=UserTransaction state=Create
java.lang.RuntimeException: Unable to locate the transaction manager
FAILED CONFIGURATION: @BeforeSuite startSeam
org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

*** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

UserTransactionBinding
-> UserTransaction{Configured:**ERROR**}

UserTransactionBinding2
-> UserTransaction{Configured:**ERROR**}


*** CONTEXTS IN ERROR: Name -> Error

SARDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

ServiceDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

ServiceClassLoaderDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

BeanDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

ServiceDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

BeanMetaDataDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

UserTransaction -> java.lang.RuntimeException: Unable to locate the transaction manager

KernelDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

This is mostly caused by Class Path configuration, also, Java 6 may be the cause, use Java 5!!

Could not find several required files

ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=vfsfile:/D:/showman/My%20Documents/workspace_3.5/seam.examples.helloworld-test/bootstrap/deploy/jboss-local-jdbc.rar state=Not Installed mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error parsing meta data jboss-local-jdbc.rar/META-INF/ra.xml
Caused by: java.io.FileNotFoundException: File does not exist: D:\showman\My%20Documents

It seems that it does not like space in the path T_T, try to set the workspace to somewhere with NO space!! FUCK!

When running test case in Eclipse, TestNG complains bad version in .class file even Java 5 is used

java.lang.UnsupportedClassVersionError: Bad version number in .class file

Make sure everything is Java 5 compliant, such as:

  • Project build path
  • JAVA_HOME, JRE_HOME
  • Java's in PATH (check by java -version)
  • The Application Server (i.e. must be JDK5 compiled JBoss AS 5)

Tuesday, July 14, 2009

JBoss jBPM Info Center

jBPM 4.0

jBPM User Guide (jBPM 4.0)

jBPM Developers Guide (jBPM 4.0)

jBPM Wiki

Getting Started with jBPM 4.0 - (Part I)

Getting Started with jBPM 4.0 - (Part II)

Getting Started with jBPM 4.0 - (Part III)

Getting Started with jBPM 4.0 - (Part IV)

jBPM 3.X

jBPM3 Getting Started

jBPM deployment in production environments

FAQ

When running jBPM (3.2.6.SP1) within Seam (2.1.2), the process does not run in persistent state. For example: all process instances are lost after JBoss AS restarts

In jBPM side, hibernate.cfg.xml takes the main responsibility for jBPM's persistent properties. Make sure all settings are configured properly especially:

<property name="hibernate.connection.datasource">java:JbpmDS</property>

When trying jBPM's websale example, exception occurs when clicking evaluation button

Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57fffd:daa:4a702b15:1fe status: ActionStatus.ABORT_ONLY >
Could not enlist in transaction on entering meta-aware object!;
Unable to persist timer

XA data sources and jBPM

When trying jBPM's websale example (jbpm-3.2.6.SP1), AFTER clicking evaluation button and complete the task successfully, manager's task with timer causes exceptions

java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620) 

jBPM distribution maybe compiled by Java 6, use JDK6 compiled JBoss AS 5 and set JAVA_HOME and JRE_HOME to JDK6.