Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
RUN("VirtualBox.exe")
WinWait("Sun VirtualBox Setup","The Setup Wizard wil")
If Not WinActive("Sun VirtualBox Setup","The Setup Wizard wil") Then WinActivate("Sun VirtualBox Setup","The Setup Wizard wil")
WinWaitActive("Sun VirtualBox Setup","The Setup Wizard wil")
Send("{ALTDOWN}n{ALTUP}")
WinWait("Sun VirtualBox License Agreement","I &accept the terms ")
If Not WinActive("Sun VirtualBox License Agreement","I &accept the terms ") Then WinActivate("Sun VirtualBox License Agreement","I &accept the terms ")
WinWaitActive("Sun VirtualBox License Agreement","I &accept the terms ")
ControlFocus("Sun VirtualBox License Agreement", "", "Button2")
Send("{ALTDOWN}n{ALTUP}")
WinWait("Sun VirtualBox Setup","")
If Not WinActive("Sun VirtualBox Setup","") Then WinActivate("Sun VirtualBox Setup","")
WinWaitActive("Sun VirtualBox Setup","")
Send("{ALTDOWN}n{ALTUP}")
sleep(1000)
ControlFocus("Sun VirtualBox Setup", "", "Button2")
Send("{space}")
Send("{ALTDOWN}n{ALTUP}")
WinWait("Sun VirtualBox ","Installing the Sun V")
If Not WinActive("Sun VirtualBox ","Installing the Sun V") Then WinActivate("Sun VirtualBox ","Installing the Sun V")
WinWaitActive("Sun VirtualBox ","Installing the Sun V")
Send("{ALTDOWN}y{ALTUP}")
WinWait("Sun VirtualBox Setup","")
If Not WinActive("Sun VirtualBox Setup","") Then WinActivate("Sun VirtualBox Setup","")
WinWaitActive("Sun VirtualBox Setup","")
Send("{ALTDOWN}i{ALTUP}")
WinWait("軟體安裝","繼續安裝這個軟體會在")
If Not WinActive("軟體安裝","繼續安裝這個軟體會在") Then WinActivate("軟體安裝","繼續安裝這個軟體會在")
WinWaitActive("軟體安裝","繼續安裝這個軟體會在")
Send("{ALTDOWN}c{ALTUP}")
WinWait("軟體安裝","")
If Not WinActive("軟體安裝","") Then WinActivate("軟體安裝","")
WinWaitActive("軟體安裝","")
Send("{ALTDOWN}c{ALTUP}")
WinWait("軟體安裝","")
If Not WinActive("軟體安裝","") Then WinActivate("軟體安裝","")
WinWaitActive("軟體安裝","")
Send("{ALTDOWN}c{ALTUP}")
WinWait("硬體安裝","您正要為這個硬體安裝")
If Not WinActive("硬體安裝","您正要為這個硬體安裝") Then WinActivate("硬體安裝","您正要為這個硬體安裝")
WinWaitActive("硬體安裝","您正要為這個硬體安裝")
Send("{ALTDOWN}c{ALTUP}")
WinWait("硬體安裝","您正要為這個硬體安裝")
If Not WinActive("硬體安裝","您正要為這個硬體安裝") Then WinActivate("硬體安裝","您正要為這個硬體安裝")
WinWaitActive("硬體安裝","您正要為這個硬體安裝")
Send("{ALTDOWN}c{ALTUP}")
Sleep(10000)
Send("{ALTDOWN}c{ALTUP}")
Sleep(3000)
Send("{ALTDOWN}n{ALTUP}")
WinWait("Sun VirtualBox Setup","Start Sun VirtualBox")
If Not WinActive("Sun VirtualBox Setup","Start Sun VirtualBox") Then WinActivate("Sun VirtualBox Setup","Start Sun VirtualBox")
WinWaitActive("Sun VirtualBox Setup","Start Sun VirtualBox")
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
Send("{SPACE}")
Send("{ALTDOWN}f{ALTUP}")
當我利用VirtualBox架設虛擬機器時,會發現沒辦法正常地使用註冊信的功能。這是因為虛擬機器內部的domain name並不是其他domain name server認可的名稱,只是我測試用的名字。此時可以自行在伺服器當中新增此domain name,對應到127.0.0.1,也就是本機端,就可以解決此問題。
以下詳述這個問題的發生與解決過程。
虛擬機器中DSpace的郵件設定
##### Email settings ######
# SMTP mail server
mail.server = 127.0.0.1
# SMTP mail server authentication username and password (if required)
# mail.server.username = myusername
# mail.server.password = mypassword
# SMTP mail server alternate port (defaults to 25)
mail.server.port = 25
# From address for mail
mail.from.address = dspace-noreply@dspace-dlll.nccu.edu.tw
# Currently limited to one recipient!
feedback.recipient = dspace-help@dspace-dlll.nccu.edu.tw
# General site administration (Webmaster) e-mail
mail.admin = dspace-help@dspace-dlll.nccu.edu.tw
必須說明到,上述設定當中的「dspace-dlll.nccu.edu.tw」完全沒有註冊在任何domain name server當中。因此執行時就會發生錯誤。
2009-10-02 23:58:27,828 INFO org.dspace.app.webui.servlet.RegisterServlet @ anonymous:session_id=29633B32BF10EEEF95FCF4DC71B5C7FD:ip_addr=10.0.2.2:sendtoken_register:email=puddingchen.35@gmail.com
2009-10-02 23:58:30,669 INFO org.dspace.app.webui.servlet.RegisterServlet @ anonymous:session_id=29633B32BF10EEEF95FCF4DC71B5C7FD:ip_addr=10.0.2.2:error_emailing:email=puddingchen.35@gmail.com
javax.mail.MessagingException: 501 5.0.0 HELO requires domain address
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1363)
at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:838)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:375)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at org.dspace.core.Email.send(Email.java:362)
at org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:296)
at org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:256)
at org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:101)
at org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail(RegisterServlet.java:287)
at org.dspace.app.webui.servlet.RegisterServlet.doDSPost(RegisterServlet.java:202)
at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147)
at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Comments