Problems with CF8

I'm experiencing a problem with cfdocument timing out when
trying to create a PDF document from html code. My research lead me
the hotfix 1. When I went to the hoffix website to download it, it
was gone.
Has anyone else experienced this problem and any direction
regarding hotfixes.

Check Livedocs. maxResultsDisplayed, autosuggestBindDelay,
autosuggestMinLength, showAutosuggestLoadingIcon and
typeahead
attributes of cfinput tag in cf8.
You may need to also put the style attribute in your cfinput
autosuggest form element and set the z-index higher than the
surrounding elements.
Example:
<cfinput type="text"
name="partnername"
autosuggest="cfc:get_partnername.lookup({cfautosuggestvalue},{SOURCE})"
size="35"
maxResultsDisplayed = "1000"
autosuggestminlength = "2" align="left"
style="z-index:1000;"
tabindex="0">
<cfinput type="button" name="Submit" value="Go!"
onClick="javascript:ColdFusion.navigate('get_tabdata.cfm?select=org','orgsection',orgcall Back,myerrorhandler,'POST','form1');
javascript:ColdFusion.navigate('get_tabdata.cfm?select=sales','salessection',salescallBack ,myerrorhandler,'POST','form1');
javascript:ColdFusion.navigate('get_tabdata.cfm?select=opps','oppssection',oppscallBack,my errorhandler,'POST','form1');
javascript:ColdFusion.navigate('get_controls.cfm','controlsection',controlscallBack,myerro rhandler,'POST','form1');"
tabindex="1"
style="position:absolute;left:0px;top:55px;z-index:-1">
Notice the z-index of the autosuggest element is 1000, and
the item immediately below has a z-index of -1. In IE, this puts
the autosuggest drop down on top.

Similar Messages

  • Problem with Math In Calculated Fields

    I am calculating a group incident rate for data returned from
    a query. The formula is Number of cases multiplied by 200000
    divided by number of hours worked. Cases in my report is the
    calculated field: calc.CaseSum (the sum of cases for the group)
    Hours is calc.SumHours (the sum of hours for the group). The actual
    values for these variables (for the first group are 48 and 29427171
    respectively. When I create the following calculated field called
    rate using the formula: (calc.CaseSum * 200000) / calc.SumHours,
    Cold Fusion Generates a Runtime Error:
    Invalid ColdFusion expression in report. If the expression is
    a string, ensure that it is within quotes. Error: (calc.CaseSum *
    200000) / calc.SumHours is not a valid ColdFusion expression.
    If I use the constant value "29427171" as the divisor, the
    report works albeit only for the first group. Any ideas; is this a
    bug, or am I misusing the product?
    Addition: I forgot to mention I am using CF8. Also this
    formula worked fine as a Report Total before I introduced grouping
    and modified the calculated fields to reset on the change of a
    group.

    Sorry, I've been on another project for awhile. This problem
    will certainly be a "show stopper" for me if I cannot resolve it.
    As I mentioned in my original post, I used a constant in the
    formula in lieu of the variable and the calculation worked. This
    would suggest that CF does not have a problem with a large number.
    In spite of that reasoning, I tried Tony's suggested (thanks
    by the way!) with the identical outcome, only difference is the new
    formula is displayed in the error message.
    Tony, you also suggested that I set the variables using
    CFSET... How would I do this within the report writer environment.
    I had tried a similar approach: to perform half the calculation
    i.e. that within the parenthesis, and assign that value to a
    separate "calculated field: and then perform the rest of the
    calculation on that variable with the same outcome.
    I think that I may be dealing with a CF bug here, I'd like to
    find a workaround... I've noticed that CF8 has a new patch, perhaps
    after I apply it, I may be able to get this thing to work. I'm on
    another project right now so it will be a few days before I can
    test this theory, I report the result.
    Should this fail, and no one can come up with a workaround, I
    will report this to Adobe.

  • Problem getting CF8 administrator to work on windows 2008 server

    When I create a file helloworld.cfm in root folder and browse to http://localhost/helloworld.cfm, it renders cfoutput fine <cfoutput>#now()#</cfoutput> shows the correct date and time.
    But, when I go to the CF Administrator and enter the password for the initial setup, I keep getting the following error. Anyone have any idea how to fix it? I have checked permission everything seems fine.
    If there is no solution, then I am thinking of upgrading to CF 10. If I buy and upgrade from CF8 to CF10, can I do a fresh install on a new 2008 server, or do i need to have CF8 installed correctly first?
    Server Error
    500 - Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed.
    500
    ROOT CAUSE: java.lang.IllegalArgumentException at coldfusion.filter.FormScope.parseQueryString(FormScope.java:321) at coldfusion.filter.FormScope.parsePostData(FormScope.java:293) at coldfusion.filter.FormScope.fillForm(FormScope.java:243) at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:430) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    javax.servlet.ServletException: ROOT CAUSE: java.lang.IllegalArgumentException at coldfusion.filter.FormScope.parseQueryString(FormScope.java:321) at coldfusion.filter.FormScope.parsePostData(FormScope.java:293) at coldfusion.filter.FormScope.fillForm(FormScope.java:243) at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:430) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)  at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    For CF 8 :  Enable the built-in port in jrun.xml like this : (C:\ColdFusion8\runtime\servers\coldfusion\SERVER-INF)
      <!-- ================================================================== -->
      <!-- This is the built-in JRun Web Server                               -->
      <!-- ================================================================== -->
      <service class="jrun.servlet.http.WebService" name="WebService">
        <attribute name="port">8500</attribute>
        <attribute name="interface">*</attribute>
        <attribute name="deactivated">false</attribute>
    For CF 10 :
    The installer of CF 10 is indepedent of CF 8.
    If you want to keep both CF 8 and CF 10 on the same server, then yes it is possible.
    If you just want CF 10, then you can uninstall CF 8 and install CF 10.
    However if you want to keep CF 10 only and migrate all CF 8 settings to CF 10 then make sure that when you install CF 10, the service of CF 8 should be running. At the end of CF 10 install, you will be asked : Do you want to migrate all the CF 8 settings to CF 10? Say yes and all CF 8 settings should be migrated to CF 10
    HTH
    Thanks
    VJ

  • Need help with CF8 Javascript error dealing with cfdiv

    Ok, so I'm currently working with CF8 because that is what my employer has...I'm having a problem with this error in IE:
    Error pocessing Javascript markup in element xxxxx.
    I had the error on two pages, but I fixed the first page by adding bindonload = "false"
    Here is the code for the second page:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    <cflayout type = "tab" tabposition= "left">
          <cflayoutarea title = "General Information">
          <cfdiv bind = "url:getforms.cfm?people={people.value}" bindonload = "false"  style = "padding: 0 10px;" />
          </cflayoutarea>
          <cflayoutarea title = "Degree Infomation">
          <cfdiv bind = "url:getdegforms.cfm?people={people.value}" bindonload = "false"  style = "padding: 0 2px;" />
          </cflayoutarea>
          <cflayoutarea title = "Documentation Infomation">
          <cfdiv bind = "url:getdocforms.cfm?people={people.value}" bindonload = "false" style = "padding: 0 2px;" />
          </cflayoutarea>
          </cflayout>
      </td>
    <td width="233" align="center" valign="top" class = "contenttd">
    <h3>Current Employees</h3>
    <cfajaximport tags = "cfform" />
    <cfajaximport tags = "cfgrid" />
    <!-- Query -->
    <cfquery name="getPeople" datasource="#sacsds#" username="#sacsuser#" password="#sacsuser#">
    SELECT  b.LastName + ', ' + b.FirstName AS FullName, p.IDNum FROM faculty.dbo.SACS_Person p, faculty.dbo.budPerson
      b WHERE p.DeptCode = '#session.deptcode#' AND p.IDNum = b.ID ORDER BY b.LastName,
      b.FirstName
    </cfquery>
    <!-- dynamic selection -->
    <cfform>
    <cfselect name="people"
            query="getPeople"
            display="FullName"
            value="IDNum"
            />
    </cfform>
    That is only a piece of the code, but basically I want a form where I can select an employee off a list and then their information + forms come up in the cflayoutarea tabs.
    An editable form is being called to these cfdivs... :\ i'm sure what else to do here...

    You might want to try a JavaScript forum. This one is for Java, which has nothing to do with JavaScript.

  • PDF manipulation with CF8

    I usually post questions here, but I wanted to post something cool about CF8 for a change...
    I was trying to utilize our newly acquired CF8 for dynamically generating invoices from a flex program I wrote. Creating a form and filling in the fields was easy enough, but I needed something a bit more. I needed to be able to place formatted text on the page in places that didn't have fields. Essentially what I needed to do was a merge, but not the type that takes two 1 page PDFs and makes one 2 page PDF, but one that takes one PDF and lays it on top of another PDF on the same page. Well, low and behold, after searching the Internet getting clues from here and there (can't remember exactly where, but I'll give general credit out to whoever helped), I figured it out.
    I can now take a template PDF form and fill it in with data from a query, place a HTML page over the top of that so I can use colors, images, whatever, then merge the whole thing together and deliver a flattened PDF document to the user. CF8 is turning out to be quite powerful!
    The trick was creating a PDF document in memory out of HTML using absolutely positioned DIVs to place the text where I wanted it on the final PDF. Then use a PDF form, filled in from my query as a watermark above the HTML pdf. This watermark is set at full opacity, but the background is transparent, so it lays over the HTML page perfectly. When the whole thing is flattened, saved and loaded back into the browser, I have my completed form with HTML text positioned exactly where I want it in whatever font, color, style or any other HTML element I need. Even these HTML elements can be driven from the query data.
    I know there are problems with this as the user could remove the watermark and the whole thing would be gone, but I couldn't figure out how to use an in memory PDF file as the watermark... (anybody know the answer to that one?)
    Fun stuff!
    Matt

    Interesting approach!
    TransoniqHacker wrote:
     I know there are problems with this as the user could remove the watermark and the whole thing would be gone, but I couldn't figure out how to use an in memory PDF file as the watermark... (anybody know the answer to that one?)  
    You mean cfpdf would not accept a pdf variable, it required a physical file? You could always use iText (java library used by cfdocument internally) if it is really needed..

  • Purchased ColdFusion 10: Having problem with session variables

    My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
    When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
    First I'm setting the session in my Application.cfc This way:
    <cfcomponent displayname="Application" output="true">
      <cfset THIS.Name ="MyNewApp"/>
      <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
      <cfset THIS.SessionManagement ="YES"/>
      <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
      <cfset THIS.SetClientCookies = false />
    <cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
    <cfset application.Main_DSN = "TESTDB">
    <cfreturn true />
    </cffunction>
    <cffunction name="onApplicationEnd" output="false">
          <cfargument name="applicationScope" required="true">
        </cffunction>
    <cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
    <cfset session.loggedin = "NO">
    <cfset session.username = "">
    <cfset session.userrights = "">
    <cfset session.usergroup = "">
    </cffunction>
    </cfcomponent>
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>
    In index.cfm, Before Login I got:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    After a successful Login:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    Have I done something wrong? These codes work on CF8. Please help.
    I need to mentioned:
    CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.

    On which page is the following code?
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>

  • Is there somebody NOT having problems with OS X Server?

    I fell into the trap of Apple marketing and bought XServe with the intent to replace our Windows Server 2003 with OS X Server. The problem with Windows was that its licensing is expensive and you need to keep track of many different licenses for every single thing you want (SQL Server, Exchange and the like). It is also somewhat complicated to manage.
    My first try was with Leopard 10.5. Oh boy, this didn't work out at all. There were so many problems that even after 10.5.2 I considered seriously moving over to 10.4, which I finally did. I admit that I made some mistakes of my own when I installed 10.5. Most notably of course was the DNS setup, which was not quite right. But there are other known issues (ACL not working for example). So I really trained the setup of 10.4 on my MacBook to the point where I got it right. Then I went forward and reinstalled the 10.4 server, moved over the files and user data.
    So, 10.4. It performs much better, less errors, most of the time it works, especially after all the updates. But still it feels very far from the quality of Windows 2003 Server. I hate to say this, but it is true. I am feeling betrayed by Apple, because after using Macs for several years at home and at work (my MacBook), I felt like this is a superior operating system. Not so when I look at the server. Sure, the security holes are there in Windows Server, but they are not so hard to fill and most of the time I could just forget about it. Not so with OS X Server. It is SOOOOO fragile, it almost feels like a china shop. I never know when it will break for no apparent reason. And the things that are so easy to accomplish in Windows (change your IP address or DNS name) are major tasks for OS X administrators and you never know if you will succeed or need to do a full reinstall. So the cost of administration for OS X will quickly become much bigger than the cost of Windows licenses.
    The last problem, still unresolved, is the VPN service. This should be a no-brainer, but no, not in the case of OS X. Starting VPN and connecting to it disrupts OD and Kerberos so that there is no other way but to restart the server.
    So I am kind of wondering if there are ANY users out there who use the server in a primarily Windows/Linux desktop environment so that OS X Server actually works as intended and doesn't need restarting every day? Now I feel very frustrated about all this.

    Hi there, sorry to hear you are having issues with your OS X Server installation.
    I have not used it with Windows Clients yet, although I have to say for our use, i.e. database (mySQL), mail, Adobe Coldfusion Application Server (CF8 Standard) and Web-Server use, it is the most stable and fastest performing machine ever. It smashes our previous DELL server with Windows 2003 Web Edition in every aspect.
    Also, instead of being prompted to install a patch and re-boot about every two weeks, it runs and runs and runs - and if it ever needs to reboot, all sites are up and running within 2 minutes, I kid you not, this is fantastic for us.
    So yes, there are MORE happy users out there!!
    But granted, you find more people asking for help than praising a running system in support forums, that's kinda obvious I suppose
    Good luck fixing your system! Perhaps worth checking for some professional help in the first round of setup in case you were not used to UNIX systems before? There's a lot to learn coming from Windows I feel, but worth it and in the end usually easily fixed, repaired or even re-installed in a fraction of the time it used to take on Windows, let alone it actually works in the end.
    Best regards,
    Jonas

  • Trying to configure a multi-homed IIS server with CF8 on local network

    I'm a bit lost trying to configure my development server in CF Builder (windows XP).  The server is Win2k with CF8.
    The server sits next to my workstation, and the workstation has drive mappings to the server.
    Websites on the server are under c:\websites\<sitename>
    Coldfusion is in c:\ColdFusion8
    Each website has its own IP address, and is represented in the workstation hosts file (i.e. www.site1.dev = 192.168.1.xx)
    The *default* website on the server is in c:\inetpub\wwwroot, and this is where cfide, etc resides
    This creates a situation where CF8 admin is at a different IP from each of the sites.
    So...  Do I set up each site as an RDS connection, or can I set it all up as a local server (using mappings)
    I read Ben Forta's intruduction article, and am kind of lost - it didn't match up well with the server config dialogs.
    I've been looking forward to seeing 'bolt'.  Any assistance is most appreciated!
    - Don

    I have to admit, I'm wondering if people use other configurations to accomplish what I seek to achieve...
    I am an independent developer with a number of clients.  In order to develop for them all in a setup that best duplicates their production configuration, I have set up multiple websites on a server machine, and access them from my 'workstation' computer on the same network.
    So, each website (client project) has its own IP address, and I set up a record in the HOSTS file on my workstation with a URL to access it as if on the public web.
    For instance, I have a very simple project, "AsiaFineConsultants" (project name, 'asiafine').
    The website root on the server is located on the disk at c:\websites\asiafine.
    On the server, IIS has that set up as a website, addressable at 192.168.1.42.
    My workstation hosts file has www.asiafine.dev directed to 192.168.1.42.
    So, on my workstation, I can browse to www.aisafine.dev and see the website.  Simple!
    I have many such projects, each with its own IP, root directory, IIS website, and entry in my workstation hosts file.
    ****  Doesn't everyone do it this way???? *****
    Ok, the server has coldfusion installed (of course), but in its own 'website' at 192.168.1.55, with root directory at c:\inetpub\wwwroot.
    This works just great.  There are no problems with this arrangement.  I've been using HomeSite and CFEclipse for years in this environment - without debugging.
    As I go to set up Bolt (er, Builder) I can't get the mappings to work.  The site mapping is different from the server mapping.  Perhaps this is an over-simplification, but I can get RDS, and I can get the project in the editor, but I can't browse it internally because of mapping problems.
    Problem!
    Got any ideas?

  • Problem installing CF8 on local IIS on XP

    Hello,
    I am trying to install CF8 developer on XP with IIS.
    I have tried literally a dozen times and always the same
    result - when I go to
    CFIDE/Administrator (
    http://127.0.0.1/CFIDE/Administrator/index.cfm)...
    the .cfm is not
    parsed and the system tries to open the file with a text
    editor. If I try and hit the
    directory (
    http://127.0.0.1/CFIDE/Administrator/)
    I get "Server Error" message.
    1> I have IIS installed no problem with the default
    website settings and select 127.0.0.1 as
    it's IP, I have also tried once leaving "All Unassigned"
    2> I have disabled and then went as far as uninstalling
    all antivirus, firewall etc before
    trying to install CF
    3> I have tried removing myself from all access to LAN's,
    routers, wireless etc.
    4> I have tried all three radio buttons on the install
    screen that comes up asking for a
    server configuration, and on the "specify" radio selection I
    have tried a few different
    configurations
    5> I redownloaded the install thinnking that perhaps
    something was wrong with that
    6> I even tried installing older version (MX) of CF bit
    same result.
    In the past (my last computer was Win 2000 Prof) I had no
    trouble... enabled IIS, left
    default settings, installed CF and just like that I was
    working....
    Any ideas on what the heck is going on or how I might correct
    this?
    Many thanks! :-)

    Check your configuration in IIS to verify that ColdFusion's
    file extensions (cfm,cfc,etc) are associated with the
    jrun_iis6.dll.
    In IIS right click your website and open the Properties page.
    On the Home Directory tab, click the Configuration button
    Check your settings on the Mappings tab
    In CF7 there are batch files installed at
    C:\CFusionMX7\bin\connectors\ that will automate the IIS
    configuration. You might look for a similar directory in CF8.
    You might also check that the changes the installation is
    making to IIS is not being blocked by security software.
    This link may help.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservmgmt_5.html

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with threads and camera.

    Hi everybody!
    I've a problem with taking snapshot.
    I would like to display a loading screen after it take snapshot ( sometimes i
    have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
    I was trying to use threads but i didn't succeed.
    I made this code:
    display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while((!performing.isShown()) && (backgroundCamera.isShown())){
                        Thread.yield();
                    notifyAll();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        this.wait();                   
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();This code is sometimes showing performing screen but sometimes no.
    I don't know why. In my opinion performing.isShown() method isn't working correctly.
    Does anyone have some idea how to use threads here?

    Hi,
    I've finally managed to work this fine.
    The code:
           Object o = new Object();
           display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while(!performing.isShown()){
                        Thread.yield();
                   synchronized(o) {
                      o.notify();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        synchronized(o) {
                           o.wait(1);
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with threads and ProgressMonitor

    Dear Friends:
    I have a little problem with a thread and a ProgressMonitor. I have a long time process that runs in a thread (the thread is in an separate class). The thread has a ProgressMonitor that works fine and shows the tasks progress.
    But I need deactivate the main class(the main class is the user interface) until the thread ends.
    I use something like this:
    LongTask myTask=new LongTask();
    myTask.start();
    myTask.join();
    Now, the main class waits for the task to end, but the progress monitor don`t works fine: it shows only the dialog but not the progress bar.
    What's wrong?

    Is the dialog a modal dialog? This can block other UI updates.
    In general, you should make sure that it isn't modal, and that your workThread has a fairly low priority so that the UI can do its updating

Maybe you are looking for