Jumat, 02 Desember 2011

Install of WebSphere Application Server results in partial success on Windows 2008 or Windows 7

Problem(Abstract)

Install of WebSphere Application results in partial success and fails on profile creation when installing on Microsoft Windows 2008 or Windows 7.

Symptom

If profile creation is selected during the initial install, then the following error is seen in the install log (for example: log.txt):

(Oct 20, 2010 11:21:15 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Running configuration command: 97SInstallInvokeWSProfile, percent complete: 100%
(Oct 20, 2010 11:21:15 AM), Process, com.ibm.ws.install.ni.ismp.installtoolkitbridge.ISMPInstallToolkitBridgeForNIFramework, wrn, Config action failed: 97SInstallInvokeWSProfile - C:\Program Files (x86)\IBM\WebSphere\AppServer\properties\version\nif\config\install\97SInstallInvokeWSProfile.ijc
(Oct 20, 2010 11:21:17 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Current install/uninstall process is successful. Process type is: install
(Oct 20, 2010 11:21:17 AM), Process, com.ibm.ws.install.ni.ismp.actions.SettleNIFRegistryAction, msg1, Current install/uninstall process is successful. Process type is: install
(Oct 20, 2010 11:21:17 AM), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=2
(Oct 20, 2010 11:21:17 AM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFPARTIALSUCCESS


Cause

The minimum supported level for WebSphere Application Server V6.1 is 6.1.0.7 (Windows Vista), 6.1.0.17 (Windows 2008 ) and 6.1.0.29 (Windows 2008 R2 and Windows 7) 7.0 is 7.0.0.7 (Windows 2008 R2 and Windows 7).


If you attempt to install GA version then the profile creation tool and other commands will fail to run because is not at recommended version.


Resolving the problem


Source : https://www-304.ibm.com/support/docview.wss?uid=swg21433197

please run this script

C:\Program Files\IBM\WebSphere\AppServer\bin>manageprofiles.bat -create -profile
Name AppSvr01 -profilePath "C:\Program Files\IBM\WebSphere\AppServer\profiles" -
templatePath "C:\Program Files\IBM\WebSphere\AppServer\profileTemplates\default"
-cellName AppSvr01Cell1 -nodeName AppSvrNode1 -hostName appserver01

Jumat, 25 November 2011

Export / Import Database DB2

Export from DB2 :
1) Launch the Control Center from the Windows start menu.
2) Locate your database in the Control Center, right click on it and select Backup from the context menu. This will launch the backup Wizard:
a) Step 1: Click on Next.
b) Step 2: Click on the Add button.
i) In the System name field, select local system
ii) Browse to a location where you want to save the data and click on the OK button
c) Click Finish
3) Do not change the filename of the backup data because it will be resused later when you restore it on your remote environment


Import to DB2 :
1) Transfer the backed up content from your local environment to your remote environment.
2) Launch the DB2 Control Center.
3) Create an empty database with the same name as the one your are about restore.
4) Right click on the newly created empty database and select Restore from the context menu.
5) When the restore wizard pops-up,
a) First click on Next.
b) Click on the add button:
i) In the System name field, select local system
ii) Browse to a location where your backup content is located and click on the OK button
iii) The specific date and time must be defined accurately and can be derived from the backup content's file name. For example, my backup file is calledSAMPLE.0.DB2.NODE0000.CATN0000.20110601102445.001. So the date and time can be derived from the text marked out in red. The date is 2011/June/01 and the time is at 10:24 AM at 45 seconds.
iv) Click finish when done.

Selasa, 15 November 2011

Building Liferay on Tomcat

Introduction:

WebSynergy or Sun GlassFish Web Space Server is built on top of Liferay. The first release of WebSynergy will be built on Liferay 5.2.0. This page describes how you can checkout the source and build the core from open soruce.

Step 1: Install Apache Tomcat

  • Download Apache Tomcat (6.0.18)
  • Unzip tomcat 6.0.18
  • cd apache-tomcat-6.0.18/bin
  • chmod +x *.sh
  • Create setenv.sh
    • JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=512m"
  • Start tomcat
    • apache-tomcat-6.0.18/bin/catalina.sh start
  • Verify http://localhost:8080/
  • Stop tomcat
    • apache-tomcat-6.0.18/bin/catalina.sh stop

Step 2: Checkout Liferay source

Step 3: Prepare build environment

Create app.server..properties in trunk (or 5.2.x) directory, where user is the user name of user logged in to the OS.

app.server.parent.dir= app.server.tomcat.version=6.0 app.server.tomcat.dir=${app.server.parent.dir}/apache-tomcat-6.0.18 app.server.tomcat.classes.global.dir=${app.server.tomcat.dir}/lib app.server.tomcat.lib.endorsed.dir=${app.server.tomcat.dir}/lib/ext app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext app.server.tomcat.lib.support.dir=${app.server.tomcat.dir}/lib/ext app.server.tomcat.support.dir=${app.server.tomcat.dir}/lib/ext 
Hint
You can customize the build environment further by overriding more properties from app.server.properties

Step 4: Build

  • cd trunk (or 5.2.x)
  • ant start
  • ant deploy

Step 5: Test

Step 6: Customize

  • Stop Tomcat
  • To use sample data, copy lportal.script
    • cp trunk/sql/lportal.script apache-tomcat-6.0.18/bin
  • Create apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/classes/portal-ext.properties
    • schema.run.minimal=false
  • Start Tomcat
Tip
Always cd to the bin directory and then start Tomcat so the lportal.script is used by HSQL, otherewise it will create a fresh one which will not have any sample data.

If you do not want the url to be opened automatically in the browser, set this in portal-ext,

browser.launcher.url= 

If you have MySQL up and running, then create a database "lportal" and add following lines to portal-ext

jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.default.username=root jdbc.default.password= 

There are tons of properties that can be overridden in portal-ext. Look at trunk/portal-impl/src/portal.properties for what you can override.


source : http://wikis.sun.com/display/websynergy/Building+Liferay+on+Tomcat


Ant View and go to Run As > External Tools Configuration > Environment and add a new Variable:

Name: ANT_OPTS
Value: -Xmx1024m -XX:MaxPermSize=256m

Since Eclipse is invoking Ant it needs the variable.


Rabu, 03 Agustus 2011

Hibernate dialect

Hibernate dialect

DB2 - org.hibernate.dialect.DB2Dialect
HypersonicSQL - org.hibernate.dialect.HSQLDialect
Informix - org.hibernate.dialect.InformixDialect
Ingres - org.hibernate.dialect.IngresDialect
Interbase - org.hibernate.dialect.InterbaseDialect
Pointbase - org.hibernate.dialect.PointbaseDialect
PostgreSQL - org.hibernate.dialect.PostgreSQLDialect
Mckoi SQL - org.hibernate.dialect.MckoiDialect
Microsoft SQL Server - org.hibernate.dialect.SQLServerDialect
MySQL - org.hibernate.dialect.MySQLDialect
Oracle (any version) - org.hibernate.dialect.OracleDialect
Oracle 9 - org.hibernate.dialect.Oracle9Dialect
Progress - org.hibernate.dialect.ProgressDialect
FrontBase - org.hibernate.dialect.FrontbaseDialect
SAP DB - org.hibernate.dialect.SAPDBDialect
Sybase - org.hibernate.dialect.SybaseDialect
Sybase Anywhere - org.hibernate.dialect.SybaseAnywhereDialect

Rabu, 30 Maret 2011

Store Procedure Crystal Report

Hari ini ngetes store procedure yang dipakai crystal report.
Ada tambahan temp table nya sih....


/* temporary table */
CREATE GLOBAL TEMPORARY TABLE "TMP_AREA_TABLE"
( "LOCGRP_CODE" VARCHAR2(6 BYTE),
"LOCGRP_NAME" VARCHAR2(30 BYTE),
"LOC_CODE" VARCHAR2(6 BYTE),
"LOC_NAME" VARCHAR2(30 BYTE),
"DEPO" VARCHAR2(1 BYTE)
) ON COMMIT PRESERVE ROWS ;



/* report package */
create or replace PACKAGE Report_Package
AS TYPE Report_Type IS REF CURSOR;
TYPE Report_Type2 IS REF CURSOR RETURN TMP_AREA_TABLE%ROWTYPE;
END Report_Package;




/* Store Procedure Report */
create or replace PROCEDURE P_RPT_AREAL1_TMP
(Report_Cursor IN OUT Report_Package.Report_Type2,
pUserType VARCHAR2, pLocCode VARCHAR2, pLocGrpCode VARCHAR2) AS
TEMP_ROW TMP_AREA_TABLE%ROWTYPE;

CURSOR AREA_CURSOR IS
SELECT LcGrps.LOCGRP_CODE, LcGrps.LOCGRP_NAME, Locs.LOC_CODE, Locs.LOC_NAME, Locs.DEPO
FROM LOCATIONS Locs INNER JOIN LOCATION_GROUPS LcGrps ON Locs.LOCGRP_CODE=LcGrps.LOCGRP_CODE;
BEGIN
set_vpd_context.set_akses_user(pUserType, pLocCode, pLocGrpCode);
delete from TMP_AREA_TABLE;
OPEN AREA_CURSOR();
LOOP
FETCH AREA_CURSOR INTO TEMP_ROW;
EXIT WHEN AREA_CURSOR%NOTFOUND;
INSERT INTO TMP_AREA_TABLE(LOCGRP_CODE, LOCGRP_NAME, LOC_CODE, LOC_NAME, DEPO)
VALUES(TEMP_ROW.LOCGRP_CODE, TEMP_ROW.LOCGRP_NAME, TEMP_ROW.LOC_CODE,
TEMP_ROW.LOC_NAME, TEMP_ROW.DEPO);
END LOOP;
OPEN Report_Cursor FOR
SELECT LOCGRP_CODE, LOCGRP_NAME, LOC_CODE, LOC_NAME, DEPO FROM TMP_AREA_TABLE;

END;



Sebenernya ini bukan cara yg bener, cm lumayan lah drpd menggunakan table fisik.
Untuk kedepannya ngilangin cursor nya.
maklum newbie

Kamis, 26 November 2009

Using a New Thread for Network Activity

Berawal dari iseng coding malem hari...
dan keisengan itupun berlanjut saat coding J2ME..
nemu error ky gini

Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler.

Saking paniknya, nih error sampe ta masukin field search nya google...
Dan akhirnya... taaarrrraaaa....
menemukan kasus yg sama d forum ny SUN
satu demi satu thread dibaca dan dikasih link kesini

http://developers.sun.com/mobility/midp/articles/threading/

dibaca satu persatu... dan nemu tulisan ini

Using a New Thread for Network Activity

public void commandAction(Command c, Displayable s) {
if (c == mExitCommand)
notifyDestroyed();
else if (c == mConnectCommand) {
Thread t = new Thread() {
public void run() {
connect();
}
};
t.start();
}

}


pusing dah, ga tau maksud nya apaan
yang penting copas copas dan copas
dan di Run... yes berhasil...

Om Google menyelamatkan saya lagi
dan malam ini saya bisa tidur nyenyak....

nite all

Rabu, 25 November 2009

JavaScript for Number Validation

Ga tau harus pake cara apa lagi..
ketika harus mem-validasi inputan yg harusnya berupa nomor
dari String diubah ke Long ??? pake spring validasi lagi...
fuih... ga ngerti lah...
maka digunakan cara hardcode seperti ini

function CalcKeyCode(aChar) {
var character = aChar.substring(0,1);
var code = aChar.charCodeAt(0);
return code;
}

function checkNumber(val) {
var strPass = val.value;
var strLength = strPass.length;
var lchar = val.value.charAt((strLength) - 1);
var cCode = CalcKeyCode(lchar);

/* Check if the keyed in character is a number
do you want alphabetic UPPERCASE only ?
or lower case only just check their respective
codes and replace the 48 and 57 */

if (cCode <> 57 ) {
var myNumber = val.value.substring(0, (strLength) - 1);
val.value = myNumber;
}
return false;
}


Nah, cara manggil d field nya tinggal ditulis

onkeyup="checkNumber(namaForm.namaField);"

Ga tau kenapa cara ini gampang d tembus...
ketika tombol dipencet dan ditahan,
maka inputan bukan number dapat masuk
sehingga di field itu juga aku tambahin

onkeydown="checkNumber(namaForm.namaField);"

Awalnya kupikir selesai...
karena setiap inputan yg bukan nomor pada keyboard bakal ditolak.
Teman2ku mencari celah agar inputan bukan nomor masuk kedalam field ini
hahaha, mereka menemukan dengan cara copas dr mouse
sialan... grrrr....
masa harus di tambahin lagi "on mouse bla bla bla.."
ribet man !!

Cara ini ga efektif bgt, jangan dipraktekin boleh,
tp bakal banyak celah untuk menembus kesana....

NB : pusing juga jadi programmer... wkwkwk