發表文章

目前顯示的是有「Weblogic」標籤的文章

Encrypt / Decrypt weblogic password

網路上找到好用的程式: /*  *Source URL:  http://gustlik.wordpress.com/2008/08/06/decryption-of-configuration-passwords-in-weblogic/    */ import java.util.*; import java.io.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.w3c.dom.*; import weblogic.security.internal.*; // requires weblogic.jar in the class path import weblogic.security.internal.encryption.*; public class WebLogicDecryptor { private static final String PREFIX = "{3DES}"; private static final String XPATH_EXPRESSION = "//node()[starts-with(text(), '" + PREFIX + "')] | //@*[starts-with(., '" + PREFIX + "')]"; private static ClearOrEncryptedService ces; public static void main(String[] args) throws Exception { if (args.length < 2) { throw new Exception("Usage: [domainDir] [configFile]"); } ces = new ClearOrEncryptedService(SerializedSystemIni.getEncryptionService(new File(args[0]).getAbsolutePath())); File file = new File...

Using weblogic environment to generate encrypt password

There has a simple way to using weblogic environment to generate encrypt password... 1. Set environment... ./setDomainEnv.sh 2. Generate password... java weblogic.security.Encrypt [YOUR PASSWORD]

備份script

這是一個小shell script,可以讓你把某各位置上的檔案壓縮起來,並依照日期給定檔名postfix 我把他用來做我server端部署程式時,備份舊程式用 :D #!/bin/bash export SERVER_FOLDER=PTWESAPP01 export BK_FOLDER=/data/backup export BK_TARGET=/home/weblogic/ export BK_TMP_DEST=$BK_FOLDER/$SERVER_FOLDER/tmp/weblogic export BK_DEST=$BK_FOLDER/$SERVER_FOLDER/archive/weblogic-`date +"%Y%m%d"`.tgz rsync -av $BK_TARGET $BK_TMP_DEST cd $BK_FOLDER/$SERVER_FOLDER/tmp tar --exclude *.log --incremental -czf $BK_DEST weblogic/ cd -

Weblogic load library priority

Weblogic 11g使用hibernate時候有 antlr 這個library 的 先後順序問題 antltr需要在hibernate library載入前先行載入 否則Classloader將會無法找到hibernate library中的HqlToken物件 將導致hibernate的執行異常…. 在deploy 10.3版weblogic時候出現的錯誤 org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken ….. (略)         at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:80)         at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)         at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:54)         at antlr.CharScanner.<init>(CharScanner.java:51)         at antlr.CharScanner.<init>(CharScanner.java:60)         at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)         a...