Monday, December 28, 2009

Let's test gnome-blog

does it work?

Thursday, November 26, 2009

install oracle on opensuse 11.2

1) rpm -Uvh oracle-xe-univ etc etc as root
2) add yr user to the dba group (if you want handle oracle service and listeners*)
3) enable login for oracle user
4) relogin
5) chmod -R g+w /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log as root
6) /etc/init.d/oracle-xe configure

* disable in yast -> system -> runlevel the oracle service and use lsnctl start/stop and sqlplus / as sysdba startup/shutdown from yr user

Thursday, September 24, 2009

Reentrant lock release issue

don't use shared ReentrantLock before jdk versions hs10(b05), 6u4(b03) , 7(b05); otherwise you can get

java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:125)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1137)

on unlock.

Wednesday, September 23, 2009

oracle operations on sessions, users and tablespaces

select SID,SERIAL# from v$session where username like 'RICKDEV';
alter system kill session ;

drop user devrick cascade;
create user devrick identified by devrick;
grant all privileges to devrick;
grant dba to devrick;
drop tablespace TBSTI_DRGMGR_SYSTEM_DATA INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
drop tablespace TBSTI_DRGMGR_SYSTEM_INDEX INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
CREATE TABLESPACE TBSTI_DRGMGR_SYSTEM_DATA DATAFILE '/DRGMGR10/TBSTI_DRGMGR_SYSTEM_dataRick.dbf' SIZE 5M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT DEFAULT NOCOMPRESS EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE TBSTI_DRGMGR_SYSTEM_INDEX DATAFILE '/DRGMGR10/TBSTI_DRGMGR_SYSTEM_indexRick.dbf' SIZE 5M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT DEFAULT NOCOMPRESS EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
ALTER USER devrick QUOTA UNLIMITED ON TBSTI_DRGMGR_SYSTEM_DATA;
ALTER USER devrick QUOTA UNLIMITED ON TBSTI_DRGMGR_SYSTEM_INDEX;

Thursday, September 10, 2009

Thursday, September 3, 2009

wsdl location in a jboss cluster

edit deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml
comment out <property name="webServiceHost">${jboss.bind.address}</property>
set to true <property name="modifySOAPAddress">true</property>

Monday, August 31, 2009

dropbox and kde4

using this post i've simply setup dropbox in KDE4.3 (64bit)

using "personal settings -> advanced -> startup" i've added the dropboxd to make it run on kde start

Wednesday, August 5, 2009

apache continuum 1.2.3 as webapp in jboss 5.1

must remove the following jars from the war to deploy without errors
xalan
xml-apis
log4j
slf4j
jtidy

(using openJDK6)

Saturday, June 6, 2009

sqlldr memo

call
export NLS_LANG=American_America.AL32UTF8
sqlldr.exe dolmen/dolmen control=lts_in_test.ctr data=lts_in_test.csv log=asd.log bad=asd.bad
control file example
LOAD INTO TABLE LOCAL_TELE_STATION_IN replace FIELDS TERMINATED ',' (
    ID_STATION_IN                      integer,
    DESCRIPTION                        CHAR(1024),
    ADDRESS_NUMBER                     CHAR(255),
    POSTAL_CODE                        CHAR(20),
    MUNICIPALITY                       CHAR(40),
    PROVINCE                           CHAR(4)
)

Tuesday, June 2, 2009

rotate a video

Happens to record a video with camere rotated, to rotate a video using mencoder:

mencoder -oac copy -ovc xvid -xvidencopts pass=2:bitrate=100 -vf rotate=2 -o

Saturday, May 2, 2009

facelets and jboss 5.0.1

jboss 5 has lots of problems (i've read somewhere... that @Resource is bugged...)... tonight i've found that facelets 1.1.14 doesn't work on this application server... it's required (as shown here) a simple hack:

unjar facelets to get tag libraries definitions, put them under WEB-INF/tags of the war file, register them in the web.xml as a context parameter:

<description>Hack to let facelets in JB5 :(</description>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/tags/jsf-ui.taglib.xml;/WEB-INF/tags/jsf-core.taglib.xml;/WEB-INF/tags/jsf-html.taglib.xml;</param-value>
</context-param>

this hack doesn't affect deployment under glassfish, but it's quite boring... btw, also glassfish logs this NullPointer... but they are not blocking issues (even if they're shown as FATAL).

Thursday, March 26, 2009

pl/sql cursor syntax

WHENEVER SQLERROR EXIT 2 ROLLBACK;
DECLARE
id NUMBER;
CURSOR c IS
SELECT ID FROM TAB;
BEGIN
OPEN c;
LOOP
FETCH c INTO id;

EXIT WHEN c%NOTFOUND;
END LOOP;
CLOSE c;

COMMIT;
END;
/

EXIT 1;

Monday, March 23, 2009

free cached memory

first: there is no need (not true... my oracle instance is broken and it doesn't work if i don't free cached memory... don't reuse, redo)
second: this gentoo thread explain whet it is... click here

then

echo 1 > /proc/sys/vm/drop_caches

Monday, March 2, 2009

how to record streams

mplayer -dumpstream -dumpfile stream.mp3 mms://66.186.34.172:8971/RadioRock_audio

Saturday, February 14, 2009

Some XML ant tasks fail

java.lang.NoClassDefFoundError: org/apache/xml/serializer/SerializerTrace

some ant tasks that uses xalan don't work even if required packages are installed, for example ant-trax in OpenSUSE. To fix this problem is enough to go to

/etc/ant.d

and (as root)

echo xalan-j2-serializer.jar > xslt

That's all, the source is this blog.

Friday, January 30, 2009

Restore oracle on loosing datafiles

The solution to the missing datafiles is to drop the affected tablespace where has incomplete datafiles, and then recreate the tablespace and import the data into the tablespace from backup. However, the steps are not so straight forward.

1. Run SQL*Plus.
2. Connect to database as SYSDBA with this query:

CONNECT / AS SYSDBA
3. Mount the database instead of starting it up:

STARTUP MOUNT;
4. Issue the following command to bring the missing datafile offline so that Oracle won’t trying to connect and access the datafile anymore:

ALTER DATABASE DATAFILE ‘’ OFFLINE DROP;

Repeat the command for every datafiles that unaccounted for.
5. Now start the database proper:

ALTER DATABASE OPEN;
6. As the tablespace has damaged, drop it to recreate from fresh backup.

DROP TABLESPACE INCLUDING CONTENTS;

Thnx to Enx who thnx someone else....