Mail Plugin not working in SmartClient

Hi all,
I’m having quite the problem with the mail plugin.

I’m working on a solution wich is going to run with the servoy smartclient.
If I run through developer works fine in smartclient.

But when I run it from the server it freezes. With this I mean that just the mail plugin hangs, it does not return either true nor false, but keeps in lopp. The application keeps runing fine, but only after I cancel the send operation.

The server is running in a CentOS 5.5 with Servoy 5.1.3

This happens only in smart client, even if I run the application in a Windows XP connecting to the CentOS server.
Also I’ve tried it in a webclient but there was no problem at all.

Is there some error case involving the mail plugin in Linux??
Could the plugin work different under a Linux OS than a Windows OS??
Ideas??

Any help would be appreciated.
Thanks in advance.
Cheers

how do you cancel the send operation?

If sendMail hangs then you really shouldnt be able to do anything anymore in the smart client.

Hi Johan,
Is a bit complicated to explain but here it goes.
At the moment the code I’m using to send an email is this one

var success = globals.sendMail(varEmail, globals.mailAdmin, subject, msgText, null, null, null)
setStatusBar(40)
return success

Wich follows to a global method who actually does the sendMail method setting all the missing properties.

function sendMail()
{
    var prop = new Array()
    prop[0] = globals.mailProperties[0];
    prop[1] = globals.mailProperties[1];
    prop[2] = globals.mailProperties[2];
    prop[3] = globals.mailProperties[3];
    prop[4] = globals.mailProperties[4];
    prop[5] = globals.mailProperties[5];
	
    var mailTo = arguments[0]
    if(mailTo == null)
		mailTo = ''
    var mailFrom = arguments[1]
    if(mailFrom == null)
		mailFrom = ''
	var subject = arguments[2]
	if(subject == null)
		subject = ''
	var msgText = arguments[3]
	if(msgText == null)
		msgText = ''
	var cc = arguments[4]
	var bcc = arguments[5]
	
	var attachments = arguments[6]   
	                            
	var success = plugins.mail.sendMail(mailTo, mailFrom, subject, msgText,cc, bcc, attachments, prop);
	
	return success
}

As I said, if I run it in my pc as a localhost everything goes ok, no error and no hangup.
But when I run it in the server (I don’t have developer installed as it is a production server so no debug is possible, and no error is shown in server log) it just stops working always on the same part. The ‘setStatusBar(40)’ line wich the only thing that does is change the amount of a progres bar to 40%, I’m using it somewere before this line many times with no problem whatsoever, so the problem is not there.

The bar is never updated to 40 so my guess was that the problem lies in the previous line.
So if you look in the sendMail method there is nothing that should present a problem either than the sendMail method itself.
And the way that the code is done, in the parent method that calls the sendMail, if the sendMail should fail the bar would be reseted to 0%, but is never done.
So i can only think the problem is that sendMail never returns anything, or the application should either send the mail or display an error.

The cancel button uses this code,

function cancel()
{
	databaseManager.rollbackEditedRecords()
	databaseManager.setAutoSave(true)
	close()
}

And the ‘close’ method just closes the dialog, and works no matter what.

As I said erlier this problem occurrs only in smartclient with a CentOS Server.
The CentOS configuration is no problem because I’ve tried it in another Linux, Ubuntu actually, and the problem happens too.
I’ve also tested firewalls and everything that could be stopping the conection but I didn’t find anything unusual.
All ports that should be open are and the proof is that if I run the application from any pc, even server itself, in browser works like a wonder.
Internet conection is up too.

Could it be a SMTP Server config problem??

Any help would be appreciated.
Thanks

if a client hangs (and we assume it really hangs in the call the the mail server plugin)
can you make a stack dump of the server at that time through the admin pages?
Maybe we see the call the client does and see what is going on.

Else we maybe have to see the stackdump of the client but that is a bit harder to get (you need java 6 jdk install and startup then jvisualjvm from the jdk\bin dir and then connect to the webstart app…)

Hi,
Here is the stack.

Current time: Fri Aug 20 11:35:50 UYT 2010

Server Information
Servoy version 5.1.3 -build 962
Port used by RMI Registry: 1099
Repository version 38

Current time: Fri Aug 20 11:35:50 UYT 2010

Uptime: 2 days 20 hours 49 minutes 53 seconds

JDK Information
java.vm.name=Java HotSpot™ Client VM
java.version=1.6.0_21
java.vm.info=mixed mode, sharing
java.vm.vendor=Sun Microsystems Inc.

Operating System Information
os.name=Linux
os.version=2.6.18-194.el5
os.arch=i386

System Information
Heap memory: allocated=91180K, used=37633K, max=253440K
None Heap memory: allocated=67392K, used=58118K, max=186368K

Thread: RMI RenewClean-[10.198.101.166:3005], state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: RMI TCP Connection(33)-10.198.101.166, state: RUNNABLE, total cpu time: 290.0ms, total user time: 270.0ms
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(Unknown Source)
com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
java.io.BufferedInputStream.fill(Unknown Source)
java.io.BufferedInputStream.read(Unknown Source)
com.servoy.j2db.util.rmi.compressing.Zc.Za(Zc.java:118)
com.servoy.j2db.util.rmi.compressing.Zc.read(Zc.java:115)
java.io.FilterInputStream.read(Unknown Source)
sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: RMI TCP Connection(32)-10.198.101.166, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(Unknown Source)
com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
java.io.BufferedInputStream.fill(Unknown Source)
java.io.BufferedInputStream.read(Unknown Source)
com.servoy.j2db.util.rmi.compressing.Zc.Za(Zc.java:118)
com.servoy.j2db.util.rmi.compressing.Zc.read(Zc.java:115)
java.io.FilterInputStream.read(Unknown Source)
sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: ClientExportNotifyListner[4], state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(Unknown Source)
com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
java.io.BufferedInputStream.fill(Unknown Source)
java.io.BufferedInputStream.read(Unknown Source)
com.servoy.j2db.util.rmi.compressing.Zc.Za(Zc.java:118)
com.servoy.j2db.util.rmi.compressing.Zc.read(Zc.java:115)
java.io.DataInputStream.readInt(Unknown Source)
com.servoy.j2db.util.rmi.Zj.run(Zj.java:30)

Thread: http-8080-15, state: WAITING, total cpu time: 10950.0ms, total user time: 10800.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-14, state: WAITING, total cpu time: 60.0ms, total user time: 50.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-13, state: WAITING, total cpu time: 90.0ms, total user time: 80.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-12, state: WAITING, total cpu time: 190.0ms, total user time: 160.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-11, state: WAITING, total cpu time: 2250.0ms, total user time: 2000.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-10, state: WAITING, total cpu time: 620.0ms, total user time: 550.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-9, state: WAITING, total cpu time: 1410.0ms, total user time: 1300.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-8, state: WAITING, total cpu time: 25580.0ms, total user time: 21350.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-7, state: WAITING, total cpu time: 870.0ms, total user time: 770.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: TaskExecuter[0], state: WAITING, total cpu time: 20.0ms, total user time: 20.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.servoy.j2db.util.Zid.run(Zid.java:13)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-6, state: WAITING, total cpu time: 700.0ms, total user time: 660.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-5, state: RUNNABLE, total cpu time: 3350.0ms, total user time: 3060.0ms
sun.management.ThreadImpl.getThreadInfo0(Native Method)
sun.management.ThreadImpl.getThreadInfo(Unknown Source)
sun.management.ThreadImpl.getThreadInfo(Unknown Source)
com.servoy.j2db.server.servlets.ConfigServlet.Zt(ConfigServlet.java:743)
com.servoy.j2db.server.servlets.ConfigServlet.service(ConfigServlet.java:707)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-4, state: WAITING, total cpu time: 660.0ms, total user time: 640.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-3, state: WAITING, total cpu time: 2250.0ms, total user time: 2020.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: FormCache Monitor, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Thread.sleep(Native Method)
com.servoy.j2db.server.headlessclient.dataui.Zz.run(Zz.java:9)
java.lang.Thread.run(Unknown Source)

Thread: ModificationWatcher Task, state: TIMED_WAITING, total cpu time: 141230.0ms, total user time: 119430.0ms
java.lang.Thread.sleep(Native Method)
org.apache.wicket.util.time.Duration.sleep(Duration.java:445)
org.apache.wicket.util.thread.Task$1.run(Task.java:130)
java.lang.Thread.run(Unknown Source)

Thread: RMI Scheduler(0), state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
java.util.concurrent.DelayQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: SocketAccepter[1], state: WAITING, total cpu time: 180.0ms, total user time: 170.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.servoy.j2db.util.Zid.run(Zid.java:13)
java.lang.Thread.run(Unknown Source)

Thread: SocketAccepter[0], state: WAITING, total cpu time: 120.0ms, total user time: 110.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.servoy.j2db.util.Zid.run(Zid.java:13)
java.lang.Thread.run(Unknown Source)

Thread: Java2D Disposer, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
sun.java2d.Disposer.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-2, state: WAITING, total cpu time: 5910.0ms, total user time: 5690.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: pool-1-thread-3, state: WAITING, total cpu time: 140.0ms, total user time: 100.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
java.util.concurrent.DelayQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: pool-1-thread-2, state: WAITING, total cpu time: 110.0ms, total user time: 70.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
java.util.concurrent.DelayQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: http-8080-1, state: WAITING, total cpu time: 31570.0ms, total user time: 26910.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)
java.lang.Thread.run(Unknown Source)

Thread: DestroyJavaVM, state: RUNNABLE, total cpu time: 8120.0ms, total user time: 7720.0ms

Thread: http-8080-Acceptor-0, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.PlainSocketImpl.accept(Unknown Source)
java.net.ServerSocket.implAccept(Unknown Source)
java.net.ServerSocket.accept(Unknown Source)
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:317)
java.lang.Thread.run(Unknown Source)

Thread: ContainerBackgroundProcessor[StandardEngine[Catalina]], state: TIMED_WAITING, total cpu time: 90.0ms, total user time: 70.0ms
java.lang.Thread.sleep(Native Method)
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1579)
java.lang.Thread.run(Unknown Source)

Thread: pool-3-thread-1, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
java.util.concurrent.DelayQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: GC Daemon, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
sun.misc.GC$Daemon.run(Unknown Source)

Thread: RMI Reaper, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
sun.rmi.transport.ObjectTable$Reaper.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: pool-1-thread-1, state: WAITING, total cpu time: 1190.0ms, total user time: 1080.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
java.util.concurrent.DelayQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: RMI TCP Accept-1099, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
com.servoy.j2db.util.rmi.Zm.accept(Zm.java:38)
sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unknown Source)
sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: 2 way Server Acceptor, state: RUNNABLE, total cpu time: 40.0ms, total user time: 40.0ms
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.PlainSocketImpl.accept(Unknown Source)
java.net.ServerSocket.implAccept(Unknown Source)
com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(Unknown Source)
com.servoy.j2db.util.rmi.Zm.run(Zm.java:45)
java.lang.Thread.run(Unknown Source)

Thread: pool-2-thread-1, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
java.util.concurrent.DelayQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Thread: PingScanner, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
com.servoy.j2db.dataprocessing.Zy.run(Zy.java:33)
java.lang.Thread.run(Unknown Source)

Thread: MessageScheduler, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
com.servoy.j2db.dataprocessing.Zab.run(Zab.java:9)
java.lang.Thread.run(Unknown Source)

Thread: MessagePreHandler, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.servoy.j2db.dataprocessing.ClientMessagePreQueueHandler.run(ClientMessagePreQueueHandler.java:39)
java.lang.Thread.run(Unknown Source)

Thread: Signal Dispatcher, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms

Thread: Finalizer, state: WAITING, total cpu time: 900.0ms, total user time: 900.0ms
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

Thread: Reference Handler, state: WAITING, total cpu time: 430.0ms, total user time: 430.0ms
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

Didn’t notice anything weird, but I’m no guru… :lol:
Thanks for the help
Cheers

you are right, in that trace there is nothing already really doing the call or something in a plugin

Are you not sending a mail with a big attachment or something?

Currently the only way to really look at it is to try to get a stack dump of a client itself (through jvisualjvm tool in the jdk 1.6 installation)

Hi Johan,
I wasn’t attaching any file at all, actually not even a test mail was send.
For the moment I’ve managed to patch the solution using an older version of the mail plugin. :D
I changed the version that comes with Servoy 5.1.3 for the one used in Servoy 5.1.2.
I’m not sure they were any different, but I just tried it and it worked like magic. :shock:

I’m also having problems attaching files to a mail in web client. This time I’m using Windows XP and Servoy 5.1.3
Docs say I must use a callback method for the showFileOpenDialog, did it, but I don’t know what to do with the object it returns, it has no path, so no convert to JSFile neither read it is posible.

FileUpload[Add Substract days.txt, contenttype:text/plain,size:697]

Obviously I need to read it to create the binary attachment.
Do you have any docs for the object returned??
Also most properties/functions of the object are not working.

Thanks for the help
Cheers

PD: Should I open another post for this issue??

that what you get back is a JSFile
only not a real file on the filesystem but one in memory

call getBytes() on it to get your content of the file.

Can you test the mail plugin that comes with 5.2?
If there you still have the same problem then make a case telling that the 5.1.2 works but newer doesnt.

How is it supposed to be used the getBytes() method??
I used,

var att = attachment.getBytes()

But console said there was no public instance or method getBytes for JSFile
Java class “[Lcom.servoy.extensions.plugins.file.JSFile;” has no public instance field or method named “getBytes”

Maybe it has been deprecated??
Any tips??

Will try the mail plugin.
Thanks for the help
Cheers

its an array of JSFiles… (because you could have multi select)

so attachement[0].getBytes()

Worked great.
Thanks for the help