2009-03-30

oracle instance uptime

As reported here, this is the query to execute:

select
'Hostname : ' || host_name
,'Instance Name : ' || instance_name
,'Started At : ' || to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') stime
,'Uptime : ' || floor(sysdate - startup_time) || ' days(s) ' ||
trunc( 24*((sysdate-startup_time) -
trunc(sysdate-startup_time))) || ' hour(s) ' ||
mod(trunc(1440*((sysdate-startup_time) -
trunc(sysdate-startup_time))), 60) ||' minute(s) ' ||
mod(trunc(86400*((sysdate-startup_time) -
trunc(sysdate-startup_time))), 60) ||' seconds' uptime
from
sys.v_$instance;

2009-03-25

Websphere error WSVR0101W

If you ever get an error like this:

0000006d ApplicationMg A WSVR0200I: Starting application: MyAppEAR
0000006d ApplicationMg E WSVR0101W: An error occurred starting MyAppEAR
0000006d ApplicationMg A WSVR0217I: Stopping application: MyAppEAR
0000006d ApplicationMg A WSVR0220I: Application stopped: MyAppEAR


Make sure your web.xml is correct. In our case, we had some unexistent servlet mapping, which caused the application to fault.

2009-03-17

Adobe & "com.ibm.jsse2.util.h: No trusted certificate found" error

Suddenly a new error on Websphere Application Server, where Adobe PDF Generator runs:

RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: org.omg.CORBA.COMM_FAILURE: CAUGHT_EXCEPTION_WHILE_CONFIGURING_SSL_CLIENT_SOCKET:
JSSL0080E: javax.net.ssl.SSLHandshakeException - The client and server could not negotiate the desired level of security.
Reason: com.ibm.jsse2.util.h: No trusted certificate found vmcid: 0x49421000 minor code: 70 completed: No


Found this 6 point help somewhere on the web (thanks Soorya!):

Hi,
You need to obtain signer certificates from remote machine for SSL configuration.
I have explained you the steps below for the same.
1. From administrative console, follow
Security -> SSL certificate and key management -> key stores and certificates - > NodeDefaultTrustStore -> Signer certificates -> Retrive from port.
2. Enter remote machine name at Host.
3. Enter CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS of the remote machine at Port.
4. Enter Alias for reference.
5. Click “Retrieve signer information”.
6. Apply and save the changes.

Hope it will useful.
Regards,
Soorya Prakash.S


Following the hints, I managed to solve using localhost:9043 for points 2 and 3, and "adobe" for point 4. No reboot needed, the application now transforms into PDF nicely.

2009-03-16

IE6 issues with javascript with accents

The following code won't run with IE6, but does run perfectly on IE7:

function changeFunction(obj) {
var div = null;
var idScheda = '';
var o = obj;

alert('ID: ' + obj.id); // undefined
alert('TO: ' + typeof(obj.id)); // undefined
alert('IF: ' + (typeof(obj.id) == 'undefined')); // true

if (typeof(obj.id) == 'undefined') {
// compatibilità
alert('OK');


Basically, the problem was that we never got the OK alert, even though we got the true alert, one line before. We found out the error was related to the accent in compatibilità: changing that into compatibilita made the whole thing run on IE6 as well.

2009-03-12

JavaMail 1.4.2 released

New JavaMail release, 1.4.2, available here. Pretty nice info in the SSLNOTES file, which might actually help wrt the difficulties I experienced in a previous post. HTH.

2009-03-05

surviving process on aix

On Aix, to run a command in background and in a way which will not be killed once you disconnect you remote session, you should issue the following command:
nohup command &

How to run Win apps as service

Problem: I have a Windows application which has to be always open. Therefore it stays on a server, but I have to be careful and disconnect every time stop working, or the process gets killed.

Solution: http://www.cypressnet.com/Products/autotask/autotask.htm: "This allows for many types of tasks to be ran in the background, even when the users are logged off." Not for free.