Recent Posts
Archives

Archive for the ‘General’ Category

PostHeaderIcon weblogic.management.ManagementException: Unable to obtain lock

Exception:

 weblogic.management.ManagementException: Unable to obtain lock on /$HOME/.../myDomain/tmp/myServer.lok. Server may already be running at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:159) at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:58) at weblogic.management.internal.DomainDirectoryService.start(DomainDirectoryService.java:75) at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:374) at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:125) at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:630) at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:402) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361) at weblogic.Server.main(Server.java:67) 

Fix:

  • If possible, ensure you have admin rights
  • else:
    • delete /$HOME/.../myDomain/cache
    • delete /$HOME/.../myDomain/data/ldap/ldapfiles/*.lok
    • delete /$HOME/.../myDomain/data/stores/diagnostics/*
    • delete /$HOME/.../myDomain/data/stores/default/*
    • delete /$HOME/.../myDomain/tmp/*.lok

PostHeaderIcon Lenteurs sur FireFox 3.5

Je fais partie des premiers utilisateurs de FireFox, a la vieille epoque ou celui-ci se nommait Phoenix ou FireBird. J’ai rarement eu a me plaindre, sauf lorsque j’ai installe la derniere version 3.5.

En effet, FireFox “freezait” et connaissait beaucoup de ralentissements, sur de simples pages HTML toutes basiques. Apres avoir parcouru les forums, il s’avere que deux solutions existent:

  • la plus propre, mais longue: creer un nouveau profile.
  • dans les options, desactiver Java.

J’ai tente la premiere, le navigateur “a vide” carbure, mais apres avoir perdu toutes mes configs personnelles j’ai prefere tenter la seconde. La browser va beaucoup mieux, mais en toute honnetete ca reste un peu lent par rapport a FireFox 3.1.

PostHeaderIcon Les geeks et l’orthographe

Je soutiens Daniel dans sa croisade pour des geeks qui ecrivent un francais syntaxiquement et grammaticalement correct! 😀

PostHeaderIcon Utiliser des enum de Java5 avec Hibernate

Lorsque la gestion du typage d’une base de donnees relationnelle est confiee a Java et Hibernate, il est souvent frustrant de perdre la securite induite par les enum de Java 5. Voici comment reconcilier Hibernate et les enum.

Read the rest of this entry »

PostHeaderIcon How to launch a single Unit Test with Maven 2?

Use this:

mvn -Dtest=MyPersonnalUnitTest test

(unlike with Maven 1, you do not need specify the complete package name!)

PostHeaderIcon Read the byte-code of a Java compiled class

Use this:

javap -c myClass

(do not mention .class)

PostHeaderIcon Automatic update with TortoiseSVN

On my current position, I had to update my project with Subversion every morning. It took half an hour every day ; some other guys prefered to update only once a week or twice a month… But they accepted to spend half a day for merges etc.
Yet, I found a way to make this update automatically, thanks to a planned task in Windows XP.

The command that is launched is
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"C:\the\path\of\my\project" /notempfile /closeonend

Thanks to another planned task, I rebuild the complete project with Maven. And on breakfast I find my project up-to-date with all jars compiled and available.

PostHeaderIcon Comment supprimer tous les accents, cedilles, etc. d’un texte en francais sous Unix?

Il suffit de lancer la commande suivante, en passant eventuellement en parametre le fichier source (sinon c’est l’entree standard qui sera utilisee):

tr "àçéèêëîïôöùüÂÇÉÈÊËÎÏÔÖÙÜ" "aceeeeiioouuACEEEEIIOOUU"

PostHeaderIcon How to replace all lower case with upper case in Unix?

Use one of the three following commands:

  • tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • tr a-z A-Z
  • tr '[:lower:]' '[:upper:]'

PostHeaderIcon Remove duplicated lines from a file

Abstract: you have to remove duplicate lines in one file. For instance, you have a file:

foo1
foo2
foo2

Solution: use this command:

uniq myFile.txt

You’ll get:

foo1
foo2
uniq myFile.txt