This batch script can backup full project files, adding date time to archive name, jar files are excluded.
My date Format is:
>E:\wwwroot>echo exit|cmd /q /k prompt $D $T
>2008-09-19 星期五 16:37:41.18
Please modify codes to meet your need.
echo off
@For /F "tokens=1,2,3 delims= " %%A in ('echo exit^|cmd /q /k prompt $D $T') do @(
Set DateStr=%%A
Set WeekStr=%%B
Set TimeStr=%%C
)
@For /F "tokens=1,2,3 delims=-" %%A in ('echo %DateStr%') do @(
Set Year=%%A
Set Month=%%B
Set Day=%%C
)
@For /F "tokens=1,2,3 delims=:" %%A in ('echo %timeStr%') do @(
Set Hour=%%A
Set Minute=%%B
Set Second1=%%C
)
@echo Second1 = %Second1%
@For /F "tokens=1 delims=." %%A in ('echo %Second1%') do @(
Set Second=%%A
)
@rem @echo DateStr = %DateStr%
@rem @echo TimeStr = %TimeStr%
@rem @echo Second1 = %Second1%
@rem @echo Year = %Year%
@rem @echo Month = %Month%
@rem @echo DAY = %Day%
@rem @echo Hour = %Hour%
@rem @echo Minute = %Minute%
@rem @echo Second = %Second%
@rem @echo ProjectFolder%Year%%Month%%Day%_%Hour%%Minute%%Second%.7z
@rem @Set FilePath=ProjectFolder%%Year%%%%Month%%%%Day%%_%%Hour%%%%Minute%.7z
@rem @"E:\Program Files\7-Zip\7z.exe" a -t7z ProjectFolder%Year%%Month%%Day%_%Hour%%Minute%%Second%.7z "E:\wwwroot\projectfolder\" -xr!*.jar
@echo on
@Set FilePath=ProjectFolder%Year%%Month%%Day%_%Hour%%Minute%%Second%.7z
@"E:\Program Files\7-Zip\7z.exe" a -t7z %FilePath% "E:\wwwroot\projectfolder\" -xr!*.jar
2008年9月19日星期五
2008年9月17日星期三
三聚氰胺 melamine
三聚氰胺
melamine
>From Powerdict
melamine
[5melEmi(:)n]
n.
[化]三聚氰胺
melamine
mel.a.mine
AHD:[mµl“…-m¶n”]
D.J.[6mel*7mi8n]
K.K.[6mWl*7min]
n.(名词)
A white crystalline compound, C3H 6N 6, used in making melamine resins and for tanning leather.
蜜胺,三聚氰胺:白色结晶状化合物,C3H 6N 6,用来制造三聚氰胺树脂及用于鞣革
A plastic made from such resin.
三聚氰氨树脂:三聚氰胺树脂制得的塑料
Melam [distillate of ammonium thiocyanate]
Melam [硫氰酸铵馏出液]
amine
amine
melamine
[5melEmi:n]
n.
密胺树脂,密胺树脂塑料
melamine
[5melEmi(:)n]
n.
【化】三聚氰(酰)胺, 蜜胺
melamine
[5melEmi(:)n]
adj.
蜜胺的, 三聚氰胺的
methylol melamine
羟甲基蜜胺
triethylene melamine
三乙撑三聚氰酰胺, 三乙撑蜜胺
melamine
>From Powerdict
melamine
[5melEmi(:)n]
n.
[化]三聚氰胺
melamine
mel.a.mine
AHD:[mµl“…-m¶n”]
D.J.[6mel*7mi8n]
K.K.[6mWl*7min]
n.(名词)
A white crystalline compound, C3H 6N 6, used in making melamine resins and for tanning leather.
蜜胺,三聚氰胺:白色结晶状化合物,C3H 6N 6,用来制造三聚氰胺树脂及用于鞣革
A plastic made from such resin.
三聚氰氨树脂:三聚氰胺树脂制得的塑料
Melam [distillate of ammonium thiocyanate]
Melam [硫氰酸铵馏出液]
amine
amine
melamine
[5melEmi:n]
n.
密胺树脂,密胺树脂塑料
melamine
[5melEmi(:)n]
n.
【化】三聚氰(酰)胺, 蜜胺
melamine
[5melEmi(:)n]
adj.
蜜胺的, 三聚氰胺的
methylol melamine
羟甲基蜜胺
triethylene melamine
三乙撑三聚氰酰胺, 三乙撑蜜胺
2008年9月11日星期四
RandomAccessFile notes
/**
* Write contents to txt file using "RandomAccessFile "
*
*/
String filepath = "E:\\wwwroot\\tmp\\testRandomAccreeFile.txt";
RandomAccessFile f = new RandomAccessFile(filepath,"rw");
f.seek(7 * 7 - 2);
String toWrite = "Helloo";
// not work, it will output one white space after one char.
//f.writeChars( toWrite );
// not work, it will output one white space and a new line
// before toWrite after writing
// f.writeUTF( toWrite );
// This is the right solution
f.write(toWrite.getBytes());
f.close();
* Write contents to txt file using "RandomAccessFile "
*
*/
String filepath = "E:\\wwwroot\\tmp\\testRandomAccreeFile.txt";
RandomAccessFile f = new RandomAccessFile(filepath,"rw");
f.seek(7 * 7 - 2);
String toWrite = "Helloo";
// not work, it will output one white space after one char.
//f.writeChars( toWrite );
// not work, it will output one white space and a new line
// before toWrite after writing
// f.writeUTF( toWrite );
// This is the right solution
f.write(toWrite.getBytes());
f.close();
2008年9月9日星期二
jadclipse sometimes does not work.
jadclipse works for a time, and sometimes fails to work, and can not decompile java class.
In fact we can make it work again. I restart eclipse, and it's OK.
In fact we can make it work again. I restart eclipse, and it's OK.
2008年9月4日星期四
import java.util.Date & java.sql.Date
Import wrong class,
java.util.Date should be imported, but java.sql.Date was imported in entity class,
so java.lang.IllegalArgumentException is thrown,
btw, the debug point is in:
com.mycom.db.dao.CommDbOperTool$CustomRowMap.mapRow(CommDbOperTool.java:71)
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
com.mycom.webapp.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:42)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
com.mycom.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:63)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
root cause
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException
com.mycom.db.helper.annota.AnnotaEntityOper.doSet(AnnotaEntityOper.java:325)
com.mycom.db.helper.annota.AnnotaEntityOper.createObjByRs(AnnotaEntityOper.java:124)
com.mycom.db.dao.CommDbOperTool$CustomRowMap.mapRow(CommDbOperTool.java:71)
org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:600)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:538)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:617)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:625)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:657)
com.myapp.db.dao.AccountCashingDao.getAccountCashingBySiteUserID(AccountCashingDao.java:49)
com.mycom.myapp.user.manager.AccountManager.getAccountCashingBySiteUserID(AccountManager.java:158)
com.mycom.myapp.user.manager.AccountManager$$FastClassByCGLIB$$ab87176b.invoke()
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629)
com.mycom.myapp.user.manager.AccountManager$$EnhancerByCGLIB$$cdf0dc72.getAccountCashingBySiteUserID()
com.mycom.myapp.webapp.action.AccountCashingAction.listCashing(AccountCashingAction.java:85)
com.mycom.myapp.webapp.action.AccountCashingAction.execute(AccountCashingAction.java:54)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
com.mycom.webapp.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:42)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
com.mycom.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:63)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
root cause
java.lang.IllegalArgumentException
sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
java.lang.reflect.Field.set(Unknown Source)
com.mycom.db.helper.annota.AnnotaEntityOper.doSet(AnnotaEntityOper.java:322)
com.mycom.db.helper.annota.AnnotaEntityOper.createObjByRs(AnnotaEntityOper.java:124)
com.mycom.db.dao.CommDbOperTool$CustomRowMap.mapRow(CommDbOperTool.java:71)
org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:600)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:538)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:617)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:625)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:657)
com.myapp.db.dao.AccountCashingDao.getAccountCashingBySiteUserID(AccountCashingDao.java:49)
com.mycom.myapp.user.manager.AccountManager.getAccountCashingBySiteUserID(AccountManager.java:158)
com.mycom.myapp.user.manager.AccountManager$$FastClassByCGLIB$$ab87176b.invoke()
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629)
com.mycom.myapp.user.manager.AccountManager$$EnhancerByCGLIB$$cdf0dc72.getAccountCashingBySiteUserID()
com.mycom.myapp.webapp.action.AccountCashingAction.listCashing(AccountCashingAction.java:85)
com.mycom.myapp.webapp.action.AccountCashingAction.execute(AccountCashingAction.java:54)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
com.mycom.webapp.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:42)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
com.mycom.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:63)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.13
订阅:
博文 (Atom)