Tag Archives: eclipse

Recreate Derby Database Under WebSphere

Published on: Author: dariusz.cieslak Leave a comment

WebSphere uses SQL databases for internal managment of MQ queues (Derby database engine under the covers). Sometimes you need to reset their state. Here's the script that erase and recreate BPEDB database state (tested under WS 6.1.2): rm -rf $WID_HOME/pf/wps/databases/BPEDB echo "CONNECT 'jdbc:derby:$WID_HOME/pf/wps/databases/BPEDB;create=true' AS BPEDB;"|\     $WID_HOME/runtimes/bi_v61/derby/bin/embedded/ij.sh /dev/stdin

Generic Types in Java 1.5

Published on: Author: dariusz.cieslak Leave a comment

Generics are very useful Java language feature introduced in Java 1.5. Starting from 1.5 you can statically declare expected types of objects inside collections and compiler will enforce this assumption during compilation: Map<String, BankAccount> bankAccounts = new HashMap<String, BankAccount>(); bankAccounts.put("a1", bankAccount); bankAccounts.add("a2", "string"); <– compilation error Integer x = bankAccounts.get("a1"); <– compilation error bankAccounts.put(new Integer("11"),… Continue reading Generic Types in Java 1.5

Eclipse hangs – solved!

Published on: Author: dariusz.cieslak Leave a comment

Sometimes you see that Eclipse stops responding and causes 100% of CPU usage (UI controls not redrawn). The only action can be taken then is to kill eclipse process. I discovered that it's caused by big console output option. Test suite with low level (DEBUG) messages are able to kill Eclipse IDE, after setting log… Continue reading Eclipse hangs – solved!

The simplest commons-logging usage

Published on: Author: dariusz.cieslak Leave a comment

I assume you're a developer and want to control global log level you are getting on your console window in Eclipse. Just log level. You don't want to learn all Log4J machinery to create many log files, customize logging format etc. I'll describe simplest steps to achieve this. First, create commons-logging.properties file in your src/… Continue reading The simplest commons-logging usage

libxpcom.so: cannot open shared object file: No such file or directory

Published on: Author: dariusz.cieslak 1 Comment

When opening JSP file in visual mode in Eclipse (Websphere Integrated Developer 6.1.2) I'm getting the following error (under Debian Lenny): Caused by: java.lang.UnsatisfiedLinkError: /opt/IBM/WID61/configuration/org.eclipse.osgi/bundles/2374/1/.cp/libswt-mozilla-gtk-3236.so (libxpcom.so: cannot open shared object file: No such file or directory) I checked for shared library dependicies: $ ldd /opt/IBM/WID61/configuration/org.eclipse.osgi/bundles/2374/1/.cp/libswt-mozilla-gtk-3236.so linux-gate.so.1 =>  (0xb7fa9000) libxpcom.so => not found libnspr4.so => /usr/lib/libnspr4.so… Continue reading libxpcom.so: cannot open shared object file: No such file or directory