Gui freezes during execution of a perl script which is never completed

Dear Java programmers,
I'm running a perl script which takes a few minutes to finish from a GUI. But when the execution reaches a point, it suddenly seems to stop and the GUI becomes irresponsive. Submitting the perl script to run as a separate thread to release the button doesn't make any different either. Is there any restriction in the time that swing allows external programs to run?
thanks in advance,
Tom

tevang2 wrote:
I'm running a perl script which takes a few minutes to finish from a GUI. But when the execution reaches a point, it suddenly seems to stop and the GUI becomes irresponsive. Then you're tying up the Swing EDT, the event dispatch thread, which is the single thread responsible for drawing the Swing app and responding to user input.
Submitting the perl script to run as a separate thread to release the button doesn't make any different either. Is there any restriction in the time that swing allows external programs to run?None that I know of. I still have to wonder if you are creating a background thread properly because even if your perl script gets locked, if you are running it on a background thread, the Swing app shouldn't lock up.

Similar Messages

  • In Web Server 6.0 during the execution of a Perl Script, the software send the error "Cannot execute CGI script......unable to sewt group".

     

    Hi Pablo,
    Its bcos Your web server has been misconfigured. It doesn't know that it should execute your Perl program, so it's just returning the error to the browser.
    Assuming that u use solaris 2.8. Generally the path for the perl in solaris is #!/usr/bin/perl .make sure u have included this in ur first line of the perl programs.[if not enter the exact location of the perl interpretor]
    Now follow these steps:
    *First Part
    First create a cgi folder mycgi-bin( follow this example please) say u create mycgi in /usr folder (solaris). so the path becomes '/usr/mycgi-bin'. set
    appropriate permissions say set chmod to 755. to make it executable. Then
    (1)Goto Programs tab in IWS (iplanet web server) .
    (2)choose cgi-directory drom left frame.
    (3)CGI Directory Add another CGI Directory
    URL prefix: mycgi-bin
    CGI directory: /usr/mycgi-bin
    (4) click 'OK' and click 'apply' to save changes and restart the server.
    * Second Part:
    1.In the Server Administrator, click Server preferences, then select 'MIME Types' from the frame on the left.
    2.If you want to use .pl as the extension for Perl scripts, find and remove the application/x-perl MIME type (this is mapped to .pl by default). (remove it).
    3.Add a new MIME Type with 'magnus-internal/mycgi-bin' (type this exactly ie magnus-internal/cgidirectory url prefix) as the Content Type, and pl as the File Suffix.
    4.Save and apply these changes, then re-start the server.
    5 .Put a sample perl file in mycgi-bin directory say sample.pl and access http://yourserver:port/mycgi-bin/sample. pl
    *If you are having trouble running Perl scripts on your iPlanet server, check the following:
    * Ensure that the script is readable by the account used by the iPlanet service.Generally, this means you should make the script readable by the Everyonegroup.
    * Ensure that all supporting files, like the perl binary files, the perl library files, and the modules that you use, are all readable by the account used by the iPlanet service (i.e., the Everyone group).
    It should work now,
    Regards,
    T.Raghulan

  • Under a GUI, I need to run a perl script, how to do this?

    Hi - I am writing a GUI for my clients and one of the things my program must do is run a perl script. I am able to run perl.exe but it seems like perl.exe is not running the script. I also tried to put the perl script in a batch file and then call the batch file from my java GUI program. I still get the same issue of just perl.exe running but thats not running the script. My last attempt was to write a small class to test if perl.exe can run the script under a command line. I got the perl.exe to run the perl script but how do I but implement that class in my GUI if my test class needs a command line? How can I run a command line in my GUI so the perl script can be run.
    The Runtime.getRuntime.exec(RunPerlScript) is not working like I want it.
    I also tried Runtime r = Runtime.getRuntime();
    Process p = r.exec(RunPerlScript);
    How can I run the MS-DOS prompt from my program if the Runtime Environment is running already. The Runtime Environment seems to not allow another prompt to be opened and from there I can run the perl script manually or automatically from my program.
    What does the "cmd /c start..." or "c:\\windows\\command.com..." do? I have seen that in the forum but it doesn't seem to be running the perl script. The perl.exe runs, but not the perl script. I need anyones help desperately. Damn microsoft, why did they remove completely the functionality of DOS. I have a feeling my program will run perfectly under a UNIX environment, because I needed to do was open another shell. Thats what I need in windows!
    Thank you for your help.
    Seigot

    hi
    I am working on this perl scripts do run on GUI's well the process command is fine try java 1.3 it works fine. if u need more help let me know
    all the best

  • Need a perl script which monitors a network folder and sends email when new files/folders arrived...

    I need a perl script (or something else better) which monitors a network folder and sends email when new files/folders arrived. I tried it in Automator but failed.
    Thanks!

    Yes. I tried it. But whenever I restart m Mac, the watch folder doesn't work until I reconnect to network or run the Automator... I need a simple system that automatically connects to the network and monitor the folder, even I restart the Mac.
    Thanks!

  • Execution of Perl Script from HTML DB page.

    Hi All,
    I have a Perl script which takes 5 parameters and fetches data from one database and insert that data into my database table which is a master table for my project.
    Is there any way to execute the perl script from a HTMLDB page by passing parameters.
    Pls. provide me inputs if any.
    Thanks & Regds.
    Kumaraswamy RJ.

    Check out MOS note 1515609.1.
    Regards,
    - Loc

  • Work-around for flash player hangs/freezes during initialisation...

    Hello all,
    Are you also facing the problem that the flash player hangs/freezes during execution of an xcelsius file? Try if the following work-around works also for you.
    I am (was) facing the same problem: a swf file about 1474 kb with many components, generated with Xcelsius 5.3.2.0., trying to view with flash player 10.1.82.76. Did also hang/freezed! The file was originally build with version 5.3.0 and worked o.k. then...
    The work-around which works for me is the following: I had all my components organized in groups. After ungrouping them all (which I think is a major drawback) and exporting it to swf, the report works! File size is more or less the same...
    Maybe you can give this work-around a try for your own work....
    So I think the SAP/Adobe bug has something to do with grouping of components or grouped components build in an earlier version of Xcelsius 2008... The following test that I will perform is ungrouping the components and then re-grouping them again in version 5.3.2.0....
    Greetings
    Erik-Jan Vriens

    Thank you for sharing this. Had a similar problem before and did some tinkering around with the file and all of a sudden it worked again. Fair bet it was exactly that as well.
    In general Xcelsius performance goes down the drain if you start using many components. It is to be expected, somewhat, I guess. Various bugs also pop up because components do not always seem to play nice.
    One thing I have found as well is that if you are doing a waterfall approach of constructing with a bunch of iterations in the implementation phase, you may end up with a bunch of components that were there early on. Sometimes they start messing up over time, because you've been playing with the data below or with the chart itself. E.g. on line charts label start distorting, or the frames flicker. In radiobutton boxes the boxes are not aligned properly. Checkbox labels are clipped at the end until you hover over them etc..
    Solution: remove the components, add anew. If not too many components with a tough spreadsheet below, export Excel, start a new.

  • X Server (10.3.9) GUI freezes with spinning wheel

    I have a problem with the GUI interface on an eMac running OS X Server v10.3.9 (Build 7W98, Security Update 2006-006).
    When I login locally (with any kind of user) it ever happens that the GUI freezes during common operations.
    I noticed (or better, it seems) that the problem could be related to the spinning wheel used to graphically inform the user to wait while the operation is progressing. In fact, the GUI freezes (as well as the wheel movement) when I call windows or applications that start the wheel spinning. After less than a couple of seconds everything is frozen except the mouse pointer that, sometimes but not too often, becomes a spinning beach ball. Then it seems it doesn't happen anything more. Only one to ten times, the system restarts after 5 to 10 minutes.
    NOTE WELL that even if the local user is frozen, the server services are working well, without any slowing down.
    I can get out of the problem only if I login as root via ssh with another terminal and launch the classic "shutdown -r now" (of course, also switching off the eMac).
    I've already tried either a permission repair with DiskUtility (booting the system via the original X Server DVD) and running DiskWarrior, but without any results.
    I also tried to unplug the Ethernet RJ45 connector to isolate the unit from the network, but again, no way.
    Any suggestion?
    Thank you very much in advance.
    Regards,
    MrMars96
    eMac   Mac OS X (10.3.9)  

    Hi Jeff,
    thank you for your post.
    What do you consider common operations?
    Browsing folders with Finder, running Software Update, DiskUtility, Server Admin and so on.
    Can you keep the Activity monitor open and see if there
    are any spikes?
    Yes, I can keep the Activity Monitor open (it doesn't have the spinning wheel, and that's another reason I suspect on it or something related to it).
    Sorry for my inexperience, unfortunately I don't know what "spikes" are. I'll surely look for some explanation.
    Have you checked the logs?
    Yes. As far as I saw, there isn't any important error. Have you perhaps any clue to which log should I inspect with big attention?
    Most important, how much RAM do you have. I'd never try an
    OS X Server with less than 2GB.
    Only 512MB. It's a server for 3 people. Mainly for IMAP service and a light Joomla site (so apache+mysql) still work in progress.
    The system worked well for more than a year and half (but Joomla has been installed for 3 months).
    Thank you very much for any kind of support,
    Michael

  • Folder Action to Launch Perl Script

    Hello.
    I wrote a perl script which I wanted to execute when a file was dropped into a folder. I added a folder action with a very simple applescript:
    on adding folder items to this_folder after receiving added_items
    do shell script ¬
    ("perl /Users/Alexander/Library/Scripts/gte2.pl")
    end adding folder items to
    The folder action didn't do anything, any thoughts on what I'm doing wrong? Note, the perl script works fine when I run it from the terminal.
    thanks.

    Thanks Camelot, I appreciate the help. My script below is trying to read data from a file in folder in my system. So I will try your suggestion, I didn't realize the environment and path my be different.
    Regards Alex
    #!/usr/bin/perl -w
    #This program is to convert files from gamin running GPS watch to text file which can be loaded into excel.
    # To make executable, remember to set: chmod u+x <file>
    #set all the flags. Note the flags are used to stop the matching
    $i = 1; $k = 0; $start = "no";
    #Open data file and find values
    open(DATA,"/Users/Alexander/Alex's Misc/Health/Garmin_Conversion/run.tcx") || die "Couldn't open file*\n";
    #read in the data line by line until "end of file"
    while (<DATA>){
    #start parsing for information to keep
    if (/.<Id>./) {
    @Idline=split(/>/);
    @Idbeat=split(/T/,$Idline[1]);
    $Id=$Idbeat[0];
    if (/.<Track>./){
    $start = "yes";
    if ($start eq "yes"){
    if (/.<Time>./) {
    @timeline=split(/T/);
    @timebeat=split(/Z/,$timeline[2]);
    $Time[$i]=$timebeat[0];
    elsif (/.<LatitudeDegrees>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $Latitude[$i]=$latbeat[0];
    elsif (/.<LongitudeDegrees>./) {
    @longline=split(/>/);
    @longbeat=split(/</,$longline[1]);
    $Longitude[$i]=$longbeat[0];
    elsif (/.<AltitudeMeters>./) {
    @altline=split(/>/);
    @altbeat=split(/</,$altline[1]);
    $Altitude[$i]=$altbeat[0];
    elsif (/.<DistanceMeters>./) {
    @distline=split(/>/);
    @distbeat=split(/</,$distline[1]);
    $Distance[$i]=$distbeat[0];
    elsif (/.<Value>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $HR[$i]=$HRbeat[0];
    $i++;
    } #string matching
    } #if start flag is yes
    } #while data loop
    close (DATA) || die "couldn't close file.\n";
    #write all data to file in space delimited format
    open (NEWFILE, ">/Users/Alexander/Alex's Misc/Health/Garmin_Converted/$Id run") || die "can't create file.\n";
    $Time[0]="Time"; $Latitude[0]="Latitude"; $Longitude[0]="Longitude"; $Altitude[0]="Altitude"; $Distance[0]="Distance"; $HR[0]="HR";
    print NEWFILE "0 $Time[0] $Latitude[0] $Longitude[0] $Altitude[0] $Distance[0] $HR[0]\n";
    for ($j = 1; $j <= $i; $j++) {
    $k=$j+1;
    print NEWFILE "$j $Time[$j] $Latitude[$j] $Longitude[$j] $Altitude[$j] $Distance[$j] $HR[$j]\n";
    } #for j loop
    close (NEWFILE) || die "couldn't close newfile.\n";
    #This is the end of the program

  • Recovering Permissions on /usr/lib - pkgchk or perl script?

    We have a SUN 280R running solaris 8 which accidently had a 'chmod-R 644 /usr/lib' run on it. The result was that on reboot, the system could not 'execute' or 'find' specific libraries such as ld.so.1 and some files associated with the veritas volume software we have installed on the system. We have been able to chmod most of /usr/lib 755 including ld.so.1. We would like to restore permissions to prevent any system stablity problems. so what is the better method to use here?
    1.) do a grep /usr/lib on /var/sadm/install/contents, pull out all the package names with an awk statement and then run them in a loop with pkgchk -fa?
    2.) Run a perl script which parses /var/sadm/install/contents, pulls out all the individual files in /usr/lib, and run a chmod <perm> $file on each file name?
    Which method would be less destructive? My concern is that running pkgchk on all packages associated with /usr/lib may 'fix' something, or modify something which would prevent the system from coming up.
    What key files in /usr/lib would prevent the system from coming back up, if permissions were incorrect? (i.e 644)? Should a chmod <perm> <file> for each file in the contents file for all files in /usr/lib resolve this problem completely?
    Any advice would be appreciated.

    If you don't already have a current backup, back up all data, then reinstall the OS. You don't need to erase the startup volume, and you won't need your backup unless something goes wrong. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade.
    If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it.

  • Unix style commandos in perl script OEM agent 10.2.05

    Hi,
    Is it possible to execute unix style command's like ps on a Windows server? Looking at the perl scripts in $OEM_AGENT/sysman/emd/scripts I see unix style command's. Is OEM converting those command's to Windows equivalents?
    I've a perl script which has to be run against Linux and Windows servers and I'm hoping the agent will execute those Unix command (it is only a ps command) on a Windows machine.
    regards,
    Ivan

    Ivan,
    Have you considered using Cygwin?
    http://www.cygwin.com
    Regards,
    - Loc

  • Perl script to list replicas

    Hello,
    i have written a perl script which lists all the replicas that reside on
    the eDirectory server. I use the function 'ListReplicas' in
    Net::LDAP::Extensions::eDirectory - but not all replicas are listed,
    from 6 replicas that reside on the server only 4 are listed in the script.
    any ideas or another solution?
    config:
    nw6.5/sp6
    perl v5.8.4
    Pete

    I was thinking about the following if you're just wanting services:
    systemctl list-units -t service --no-pager --no-legend | grep active
    edit: While I'm here, here's a script I wrote which allows you to manipulate services using a function and dmenu. The final output is piped in monospace font to gxmessage, but of course you can hack this around in lots of ways.
    #!/bin/bash
    services()
    sm="dmenu -l 20 -fn Monospace-8 -p"
    s1=$(systemctl list-unit-files -t service --no-legend | $sm Service); s1=${s1/%service*/service}; [[ -z $s1 ]] && exit
    s2=$(echo -e "status\nstart\nstop\nrestart\nenable\ndisable" | $sm "Action"); [[ -z $s2 ]] && exit
    if [[ $s2 == "status" ]]; then unset s3; else s3="gksudo --"; fi
    eval $s3 systemctl --no-pager $s2 $s1 2>&1 | gxmessage -file - -title Services -center -fn "Monospace 8"
    services
    Last edited by ninian (2012-11-23 00:46:46)

  • Problem in running Perl script through oracle

    Hi,
    I am facing one problem in perl script.
    " I have one perl script which is interact with sybase database.We have migrated the sybase database to oracle successfully.Now i wanna to change the perl script to interact with oracle database.
    I am using the code like that for interacting the oracle database
    Old Code with sybase database : use DBI::Sybase::GFAS;
    New code with oracle database : Use DBI::oracle::GFAS;
    When i am running the perl script,Its showing the below mentioned error:
    Can't locate DBI/oracle.pm in @INC (@INC contains: C:\oracle\product\10.2.0\db_1
    \perl\5.8.3\lib\MSWin32-x86 C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32
    -x86-multi-thread C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib C:\oracle\product
    \10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86 C:\oracle\product\10.2.0\db_1\perl\site\
    5.8.3 C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib/MSWin32-x86-multi-thread
    C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib C:\oracle\product\10.2.0\db_1
    \sysman\admin\scripts C:/Perl/lib C:/Perl/site/lib .) at hello.pl line 4.
    BEGIN failed--compilation aborted at hello.pl line 4.
    Anyone have any idea about this error.
    Thx in advance.

    If you look in the oracle home in the perl\site\5.8.3\lib\MSWin32-x86-multi-thread directory you will see two directories. Once is DBI and one is DBD.
    All you need in your perl program is a line 'use DBI'. It will use DBD automatically as and when required. You can specify the necessary connection information when you issue the DBI->connect statement.
    I have successfully managed to connect to Oracle databases and perform DML using the software installed by default. You don't need to download and install anything else.
    I'm no perl expert so maybe some functionality is missing using the interfaces provided by Oracle but for my needs it has sufficed.
    Hope this helps.

  • Running sql or perl script using DBMS_JOB

    Hi,
    Is there a way to run a sql or perl script using DBMS_JOB procedures? I have a perl script which checks out the table usage and emails the report to specific users. I want to run this script in a job scheduler, where I am using dbms_job to add the job. Please help. Any suggestions are greatly appreciated. Thanks.
    -Kristine

    You cannot run sql or perl scrips using DBMS_JOBS. You can run only Oracle procedures, functions, packages with DBMS_JOBS. They have to be stored in the database. You will have to create a Pro*C program that is listening on the pipe and push data to that pipe by using dbms_pipe. Then you can execute anything you want.

  • Stored Procedure freezing on execution

    Hi all
    I have an SP in the production system which intermittently freezes upon execution.  The only thing which seems to fix this is to halt execution and to run the ALTER PROCEDURE command on the SP - then it is fixed.  Two questions:
    why would this SP freeze?  The SP is run from a .net application so I don't know if this is one of the reasons why?
    How can I refresh the SP automatically when it freezes?
    Thanks in advance.

    "Freezing" can be due to two things: a) blocking b) "bad" execution plan.
    From what you describe, I would guess for the latter. Then again, if there is blocking and you wait long enough the problem goes away.
    Next time the procedure "freezes", use sp_who to see if there is blocking. Look in the Blk column. If there is a value, this is the spid that is blocking the spid on this line. If there is blocking, you should investigate what the blocker is up
    to.
    Once blocking has been ruled out, it is time to look at the execution plan. There can be a number of reasons why this happen. But the key is always that SQL Server caches execution plan, which sometimes is a very good thing, and sometimes it works against
    you.
    I have a longer article on my web site, that may help you to troubleshoot the problem:
    http://www.sommarskog.se/query-plan-mysteries.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Calling DLL API from Perl script

    Hi, I'd developed a Perl script which calls NI Visa DLL API to search for available resources. I am calling NI VISA DLL function viFindRsrc() in my Perl. My script successfully finds all the resources I am looking for and completing its executuion. At the very end, I am getting windows exception showing something wrong in ntdll.dll. Please find attached snapshot of the same. Note that this exception is showing up only if I am calling viFindRsrc() in my script, else script is just working fine. Can you please let me know the reason on solution to remove this exception?
    Attachments:
    exception.JPG ‏53 KB

    The "POST" is needed because we are posting an XML document as part of the HTTP request.
    I actually just got this issue resolved though.  We had a hostname alias issue.
    So, for the record, the format of the URL I posted does work.  I tried it using the XacuteLoginName/XacuteLoginPassword and j_username/j_password and both ways seemed to work.
    Thanks,
    Mike

Maybe you are looking for

  • MacBook Pro crashes on Windows 7 Boot

    Hey, I just bought a new 2010 13 inch macbook pro, and installed Windows 7 on it. When I boot Windows 7 I can use it for like 20 seconds and then later the mouse cursor gets stuck and nothing works. Both the keyboard and the mouse both dont respond t

  • Is the ability to center an inline object with a baseline shift gone in Pages 5.0?

    In the previous versions of pages I was able to center an inline object such as an imported equation with a baseline shift. I cannot find this in pages 5.0. It is gone?

  • I would like to change the Apple ID which is existing in my computer.

    I am using a Mac Book Pro with a Retina Display. The Version number is 8.0.2 Whenever i would like to update the new versions of iPhoto and iMovie, it asks for an Apple ID and password. However I have an Apple ID and password which is working properl

  • How do I split an album off??

    I just added three albums (parts 1,2 and 3) but iTunes saw fit to add them to an existing album. I now have four albums in one - one of them is Pop and the other three are religious. How do I split the Pop album off by itself?

  • Vertical lines iphone 4s, guaranteed

    Hello, My iphone 4s has vertical lines. The lines cover the display completely,  they are colorful and across the entire screen. I didn't even drop or something else. I bought my phone 6 months ago and I have 2 years guarentee in Turkey but the autho