首页 新闻 会员 周边 捐助

上传代码后,出现发送邮件bug:Sealing violation loading ……

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-10-31 18:02

1.10点半上传之前:还可以发送邮件!  
2013-10-21 10:13:58,402 [Mail.Thank you for your order(number M1013NCA003003)] [com.bigning.mail.MailTransporter] [INFO] - Message (Thank you for your order(number M1013NCA003003)) has been transfered to :  943608716@qq.com, prettypet101@gmail.com  

2.可能是上传代码之后:出现bug?(但是在本地测试是好的,奇怪?!)  
2013-10-21 15:44:29,282 [TP-Processor25] [com.bigning.mail.MimeMessageFactory] [INFO] - Building MimeMessageFactory by com.bigning.mail.RbacMimeMessageFactory  
2013-10-21 15:44:29,300 [TP-Processor25] [com.bigning.mail.MimeMessageFactory] [ERROR] - Cannot load MimeMessageFactory by com.bigning.mail.RbacMimeMessageFactory  
java.lang .SecurityException: Sealing violation loading com.bigning.mail.RbacMimeMessageFactory : Package com.bigning.mail is sealed.   //注:查了一下,有的说是seal的原因(http://blog.csdn.net/lvhuiqing/article/details/3988099);有的说是  
这个异常一般是由于classpath中有多个jar包都包含同样的java包(http://gmwen.blog.163.com/blog/static/188007057201172515237957/)。  
——但感觉都不是太明白,我用eclipse打包时 试了一下seal jar和seal package,在本地都是正常的!  

    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1770)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)  
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)  
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)  
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)  
    at java.lang.Class.forName0(Native Method)  
    at java.lang.Class.forName(Class.java:164)  
    at com.bigning.mail.MimeMessageFactory.loadClass(MimeMessageFactory.java:51)  
    at com.bigning.mail.MimeMessageFactory.load(MimeMessageFactory.java:38)  
    at com.bigning.mail.MimeMessageFactory.getFactory(MimeMessageFactory.java:83)  
    at com.ppet.ord.SendMail.sendMailImpl(SendMail.java:31)  
    at com.ppet.ord.CustReconfirmOrderService.sendMail(CustReconfirmOrderService.java:136)  
    at com.ppet.ord.CustReconfirmOrderService.service(CustReconfirmOrderService.java:80)  
    at com.ppet.ord.CustReconfirmOrderService.service(CustReconfirmOrderService.java:1)  
    at com.ppet.ord.action.SalesOrderCustAction.service(SalesOrderCustAction.java:215)  
    at com.ppet.ord.action.SalesOrderCustAction.reconfirm(SalesOrderCustAction.java:141)  
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:585)  
    at com.bigning.fantastic.action.ActionInstMngr.invoke(ActionInstMngr.java:176)  
    at com.bigning.fantastic.action.FantasticActionInvoker.invokeImpl(FantasticActionInvoker.java:124) 
    at com.bigning.fantastic.action.FantasticActionInvoker.invoke(FantasticActionInvoker.java:112)  
    at com.bigning.fantastic.action.FantasticActionInvoker.invoke(FantasticActionInvoker.java:313)  
    at com.bigning.fantastic.filter.FantasticFilter.doFilter(FantasticFilter.java:59)  
    at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:585)  
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)  
    at java.security.AccessController.doPrivileged(Native Method)  
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)  
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)  
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)  
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197) 
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)  
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)  
    at java.security.AccessController.doPrivileged(Native Method)  
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)  
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)  
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)  
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)  
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)  
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)  
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)  
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)  
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)  
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)  
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)  
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)  
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)  
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)  
    at java.lang.Thread.run(Thread.java:595)  
2013-10-21 15:44:29,315 [TP-Processor25] [com.bigning.mail.MailSetting]  [ERROR] - Cannot obtain system Properties   
java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write) 
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)  
    at java.security.AccessController.checkPermission(AccessController.java:427)  
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)  
    at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1252)  
    at java.lang.System.getProperties(System.java:560)  
    at com.bigning.mail.MailSetting.  
(MailSetting.java:65)  
    at com.bigning.mail.MailSetting.  
(MailSetting.java:89)  
    at com.bigning.mail.DefaultMimeMessageFactory.  
(DefaultMimeMessageFactory.java:23)  
    at java.lang.Class.forName0(Native Method)  
    at java.lang.Class.forName(Class.java:164)  
    at com.bigning.mail.MimeMessageFactory.loadClass(MimeMessageFactory.java:56)  
    at com.bigning.mail.MimeMessageFactory.load(MimeMessageFactory.java:38)  
    at com.bigning.mail.MimeMessageFactory.getFactory(MimeMessageFactory.java:83)  
    at com.ppet.ord.SendMail.sendMailImpl(SendMail.java:31)  
    at com.ppet.ord.CustReconfirmOrderService.sendMail(CustReconfirmOrderService.java:136)  
    at com.ppet.ord.CustReconfirmOrderService.service(CustReconfirmOrderService.java:80)  
    at com.ppet.ord.CustReconfirmOrderService.service(CustReconfirmOrderService.java:1)  
    at com.ppet.ord.action.SalesOrderCustAction.service(SalesOrderCustAction.java:215)  
    at com.ppet.ord.action.SalesOrderCustAction.reconfirm(SalesOrderCustAction.java:141)  
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:585)  
    at com.bigning.fantastic.action.ActionInstMngr.invoke(ActionInstMngr.java:176)  
    at com.bigning.fantastic.action.FantasticActionInvoker.invokeImpl(FantasticActionInvoker.java:124) 
    at com.bigning.fantastic.action.FantasticActionInvoker.invoke(FantasticActionInvoker.java:112)  
    at com.bigning.fantastic.action.FantasticActionInvoker.invoke(FantasticActionInvoker.java:313)  
    at com.bigning.fantastic.filter.FantasticFilter.doFilter(FantasticFilter.java:59)  
    at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:585)  
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)  
    at java.security.AccessController.doPrivileged(Native Method)  
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)  
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)  
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)  
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197) 
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)  
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)  
    at java.security.AccessController.doPrivileged(Native Method)  
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)  
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)  
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)  
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)  
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)  
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)  
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)  
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)  
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)  
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)  
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)  
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)  
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)  
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)  
    at java.lang.Thread.run(Thread.java:595)  
2013-10-21 15:44:29,515 [TP-Processor25] [com.bigning.mail.MailRecorderMngr] [INFO] - Total found 0 MailRecorders from /home/p-pet/public_html/WEB-INF/classes/application.setting.properties, record proxy is disabled 
2013-10-21 15:44:30,145 [Mail.Order Confirmation!(number U1013EFR003007)] [com.bigning.mail.MailTransporter] [ERROR] - Cannot send mail "Order Confirmation!(number U1013EFR003007)" by Original Factory because of Unknown Error; MailServer:mail.jhk.com.hk
 
java.security.AccessControlException: access denied (java.net.SocketPermission mail.jhk.com.hk resolve)  
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)  
    at java.security.AccessController.checkPermission(AccessController.java:427)  
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)  
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)  
    at java.net.InetAddress.getAllByName0(InetAddress.java:1117)  
    at java.net.InetAddress.getAllByName0(InetAddress.java:1098)  
    at java.net.InetAddress.getAllByName(InetAddress.java:1061)  
    at java.net.InetAddress.getByName(InetAddress.java:958)  
    at javax.mail.URLName.getHostAddress(URLName.java:455)  
    at javax.mail.URLName.hashCode(URLName.java:431)  
    at java.util.Hashtable.get(Hashtable.java:336)  
    at javax.mail.Session.getPasswordAuthentication(Session.java:793)  
    at javax.mail.Service.connect(Service.java:219)  
    at javax.mail.Service.connect(Service.java:137)  
    at javax.mail.Service.connect(Service.java:86)  
    at com.bigning.mail.TransportImpl.transportImpl(TransportImpl.java:108)  
    at com.bigning.mail.TransportImpl.transport(TransportImpl.java:44)  
    at com.bigning.mail.TransferThread.sendImpl(TransferThread.java:37)  
    at com.bigning.mail.TransferThread.run(TransferThread.java:27)  
2013-10-21 15:44:30,145 [Mail.Order Confirmation!(number U1013EFR003007)] [com.bigning.mail.MimeMessageFactory] [INFO] - Building MimeMessageFactory by com.bigning.mail.AlternativeMimeMessageFactory  
2013-10-21 15:44:30,147 [Mail.Order Confirmation!(number U1013EFR003007)] [com.bigning.mail.MailSetting] [ERROR] - Cannot obtain system Properties  
java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write) 

2013-10-21 15:44:30,905 [Mail.Order Confirmation!(number U1013EFR003007)] [com.bigning.mail.MailTransporter] [ERROR] - Cannot send mail "Order Confirmation!(number U1013EFR003007)" by Alternative Factory because of Unknown Error; MailServer:mail.syne-tech.com  
java.security.AccessControlException: access denied (java.net.SocketPermission mail.syne-tech.com resolve) 

B_yellow的主页 B_yellow | 初学一级 | 园豆:5
提问于:2013-10-22 13:23
< >
分享
所有回答(1)
0

eclipse使用export打包时,选择seal some package(而不是seal jar )

B_yellow | 园豆:5 (初学一级) | 2013-10-27 20:06
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册