commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Melnikov (JIRA)" <>
Subject [jira] [Commented] (EMAIL-128) HtmlEmail doesn't close connection to smtp server
Date Sun, 21 Jul 2013 18:24:48 GMT


Ivan Melnikov commented on EMAIL-128:

I have this kind of thing in my .meta log file

-----------------log file exception-------------------------

!ENTRY org.eclipse.core.resources 4 1 2013-07-20 04:59:12.609
!MESSAGE Core exception while retrieving the content description
org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file
system: '/send-form-1.0/war/WEB-INF/deploy/com.myproject.send.form.SendForm/rpcPolicyManifest/manifests/0C94E687013CDDF67C90273A6230CE51.txt'.
	at org.eclipse.core.internal.resources.File.getContentDescription(
	at org.eclipse.core.internal.propertytester.FilePropertyTester.testContentType(
	at org.eclipse.core.internal.propertytester.FilePropertyTester.test(
	at org.eclipse.core.internal.expressions.Property.test(
	at org.eclipse.core.internal.expressions.TestExpression.evaluate(
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(
	at org.eclipse.core.internal.expressions.AndExpression.evaluate(
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(
	at org.eclipse.core.internal.expressions.OrExpression.evaluate(
	at org.eclipse.ui.internal.navigator.NavigatorPlugin$
	at org.eclipse.ui.internal.navigator.CustomAndExpression.evaluate(
	at org.eclipse.ui.internal.navigator.NavigatorPlugin$
	at org.eclipse.ui.internal.navigator.NavigatorPlugin.safeEvaluate(
	at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor.isTriggerPoint(
	at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.findDescriptors(
	at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.findDescriptorsForTriggerPoint(
	at org.eclipse.ui.internal.navigator.NavigatorContentService.findDescriptorsByTriggerPoint(
	at org.eclipse.ui.internal.navigator.NavigatorContentService.findContentExtensionsByTriggerPoint(
	at org.eclipse.ui.internal.navigator.NavigatorContentService.findContentExtensionsByTriggerPoint(
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(
	at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(
	at org.eclipse.jface.viewers.TreeViewer.isExpandable(
	at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(
	at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(
	at org.eclipse.jface.viewers.TreeViewer.updatePlus(
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(
	at org.eclipse.jface.viewers.AbstractTreeViewer$
	at org.eclipse.swt.custom.BusyIndicator.showWhile(
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(
	at org.eclipse.jface.viewers.TreeViewer.createChildren(
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(
	at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(
	at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(
	at org.eclipse.swt.widgets.TypedListener.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Tree.wmNotifyChild(
	at org.eclipse.swt.widgets.Control.wmNotify(
	at org.eclipse.swt.widgets.Composite.wmNotify(
	at org.eclipse.swt.widgets.Control.WM_NOTIFY(
	at org.eclipse.swt.widgets.Control.windowProc(
	at org.eclipse.swt.widgets.Display.windowProc(
	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(
	at org.eclipse.swt.widgets.Tree.callWindowProc(
	at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(
	at org.eclipse.swt.widgets.Control.windowProc(
	at org.eclipse.swt.widgets.Tree.windowProc(
	at org.eclipse.swt.widgets.Display.windowProc(
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.ui.internal.Workbench.runEventLoop(
	at org.eclipse.ui.internal.Workbench.runUI(
	at org.eclipse.ui.internal.Workbench.access$4(
	at org.eclipse.ui.internal.Workbench$
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(
	at org.eclipse.equinox.launcher.Main.basicRun(
!SUBENTRY 1 org.eclipse.core.resources 4 274 2013-07-20 04:59:12.609
!MESSAGE Resource is out of sync with the file system: '/send-form-1.0/war/WEB-INF/deploy/com.myproject.send.form.SendForm/rpcPolicyManifest/manifests/0C94E687013CDDF67C90273A6230CE51.txt'.


I am not pretty sure what exactly should I look for... I tried to extract exception concerning
the SendForm projects. Please lead me if you need some more information
> HtmlEmail doesn't close connection to smtp server
> -------------------------------------------------
>                 Key: EMAIL-128
>                 URL:
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>            Reporter: Ivan Melnikov
>            Priority: Blocker
> ***Prehistory:
> I tried to send html email to smtp server from my GWT application servlet by using this
official site user guide example
the "HtmlEmail" usage snippet...
> Sending message with smtp requires authentication and encryption so I combined two examples
and used code like a (see my snippets)
> snippet A : 
> ------------------------------------
> public class Send{
> public synchronized SendReport send(MyMessage msg){
> ...
> // Create the email message
> 		  HtmlEmail email = new HtmlEmail();
> 		  try {
> email.setHostName("");
> 			  email.setSmtpPort(465);
> 			  email.setAuthenticator(new DefaultAuthenticator(USER_NAME,PASSWORD));
> 			  email.setSSLOnConnect(true);			  
> 			  email.addTo(TO, "test");
> 			  email.setFrom(FROM, msg.getFrom());
> 			  email.setSubject(msg.getSubject());			  
> 			  String message=msg.getMessage();
> 			  email.setHtmlMsg(message);
> 			   email.setTextMsg("Your email client does not support HTML messages");
> 			   email.send();			  
> 		} catch (EmailException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		}
> }//method end...
> }//class end...
> ------------------------------------
> snippet B: the gwt/rpc servlet 	
> public class SendServiceImpl extends RemoteServiceServlet implements SendService {
> 	static Send send=new Send();
> 	@Override
> 	public SentReport sendMessage(MyMessage message) {
> 		return this.getMessageSend().sendMessage(message);
> 	}
> 	private synchronized Send getSend()
> 	{
> 		return this.send;
> 	}
> }
> ------------------------------------
> ***Problem description:
> Message sending works fine and I can see email in my inbox; The problem occurs when I
stop Tomcat and close the web application browser tab (FF for example); for some reason right
after that my web browser (FireFox) cannot download web pages (throws connection timeout error...)
though Internet connection is working fine :S I tried to download web pages with another internet
browser Chrome for example but it behaves all the same :( I tried to see opened ports with
"netstat -an" cmd and it shows me a long list of opened ports (which I don't have until send
email code as "email.send();" activated...); That makes me think that for some reason the
JavaMail connection to smtp server is NOT CLOSED or something similar?
> The problem disappears only after I restart my OS (Windows XP Pro SP3);  
> So I suspect some bug which prevents smtp server connection closing after message send;
I cannot say for sure but maybe socket connection doesn't close after message has been sent
and received... I am not sure what should I add to my code to solve the problem because I
followed all user guide examples which don't show how to close smtp server connection manually
or something so I am a confused how to fix it :( Maybe it is some kind of memory leak due
to JavaMail I don't know...
> I dearly need your help because it is quite complicated issue as for me that makes impossible
to use HtmlEmail class in my gwt application (its server side code)
> ***My project uses
> - IDE : Eclipse Indigo 3.7
> - GWT SDK 2.3
> - JavaMail API 1.4.5
> - commons-email-1.3.1
> - Tomcat 7/ Jetty - in eclipse
> - JRE: version 7 Update 25 build 1.7.0_25-b17
> - OS: Windows XP Pro SP3

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message